[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH RESEND 2/3] device_tree: fix compiler warnings (
From: |
Marc-André Lureau |
Subject: |
Re: [Qemu-devel] [PATCH RESEND 2/3] device_tree: fix compiler warnings (clang 5) |
Date: |
Wed, 22 Mar 2017 22:35:52 +0000 |
On Thu, Mar 23, 2017 at 12:49 AM Philippe Mathieu-Daudé <address@hidden>
wrote:
> static code analyzer complain:
>
> device_tree.c:155:18: warning: Null pointer passed as an argument to a
> 'nonnull' parameter
> while ((de = readdir(d)) != NULL) {
> ^~~~~~~~~~
>
> Reported-by: Clang Static Analyzer
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
>
Reviewed-by: Marc-André Lureau <address@hidden>
> ---
> device_tree.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/device_tree.c b/device_tree.c
> index 6e06320830..a24ddff02b 100644
> --- a/device_tree.c
> +++ b/device_tree.c
> @@ -148,6 +148,7 @@ static void read_fstree(void *fdt, const char *dirname)
> d = opendir(dirname);
> if (!d) {
> error_setg(&error_fatal, "%s cannot open %s", __func__, dirname);
> + return;
> }
>
> while ((de = readdir(d)) != NULL) {
> --
> 2.11.0
>
>
> --
Marc-André Lureau
- [Qemu-devel] [PATCH RESEND 0/3] easy-to-fix clang warnings, Philippe Mathieu-Daudé, 2017/03/22
- [Qemu-devel] [PATCH RESEND 1/3] usb-ccid: make ccid_write_data_block() cope with null buffers, Philippe Mathieu-Daudé, 2017/03/22
- Re: [Qemu-devel] [PATCH RESEND 1/3] usb-ccid: make ccid_write_data_block() cope with null buffers, Markus Armbruster, 2017/03/23
- Re: [Qemu-devel] [PATCH RESEND 1/3] usb-ccid: make ccid_write_data_block() cope with null buffers, Gerd Hoffmann, 2017/03/23
- Re: [Qemu-devel] [PATCH RESEND 1/3] usb-ccid: make ccid_write_data_block() cope with null buffers, Marc-André Lureau, 2017/03/23
- Re: [Qemu-devel] [PATCH RESEND 1/3] usb-ccid: make ccid_write_data_block() cope with null buffers, Gerd Hoffmann, 2017/03/23
- Re: [Qemu-devel] [PATCH RESEND 1/3] usb-ccid: make ccid_write_data_block() cope with null buffers, Markus Armbruster, 2017/03/23
- Re: [Qemu-devel] [PATCH RESEND 1/3] usb-ccid: make ccid_write_data_block() cope with null buffers, Gerd Hoffmann, 2017/03/23
- Re: [Qemu-devel] [PATCH RESEND 1/3] usb-ccid: make ccid_write_data_block() cope with null buffers, Markus Armbruster, 2017/03/23
[Qemu-devel] [PATCH RESEND 2/3] device_tree: fix compiler warnings (clang 5), Philippe Mathieu-Daudé, 2017/03/22
- Re: [Qemu-devel] [PATCH RESEND 2/3] device_tree: fix compiler warnings (clang 5),
Marc-André Lureau <=
[Qemu-devel] [PATCH RESEND 3/3] qga: fix compiler warnings (clang 5), Philippe Mathieu-Daudé, 2017/03/22