Re: [PATCH] softmmu/device_tree: Silence compiler warning with --enable-sanitizers

2022-01-09 Thread Alistair Francis
On Fri, Jan 7, 2022 at 11:41 PM Thomas Huth wrote: > > If I configure my build with --enable-sanitizers, my GCC (v8.5.0) > complains: > > .../softmmu/device_tree.c: In function ‘qemu_fdt_add_path’: > .../softmmu/device_tree.c:560:18: error: ‘retval’ may be used uninitialized > in this function [-

Re: [PATCH] softmmu/device_tree: Silence compiler warning with --enable-sanitizers

2022-01-09 Thread wangyanan (Y)
On 2022/1/8 4:18, Richard Henderson wrote: On 1/7/22 5:38 AM, Thomas Huth wrote: diff --git a/softmmu/device_tree.c b/softmmu/device_tree.c index 3965c834ca..9e96f5ecd5 100644 --- a/softmmu/device_tree.c +++ b/softmmu/device_tree.c @@ -564,7 +564,7 @@ int qemu_fdt_add_path(void *fdt, const cha

Re: [PATCH] softmmu/device_tree: Silence compiler warning with --enable-sanitizers

2022-01-09 Thread wangyanan (Y)
On 2022/1/7 21:38, Thomas Huth wrote: If I configure my build with --enable-sanitizers, my GCC (v8.5.0) complains: .../softmmu/device_tree.c: In function ‘qemu_fdt_add_path’: .../softmmu/device_tree.c:560:18: error: ‘retval’ may be used uninitialized in this function [-Werror=maybe-uninitial

Re: [PATCH] softmmu/device_tree: Silence compiler warning with --enable-sanitizers

2022-01-07 Thread Alistair Francis
On Fri, Jan 7, 2022 at 11:41 PM Thomas Huth wrote: > > If I configure my build with --enable-sanitizers, my GCC (v8.5.0) > complains: > > .../softmmu/device_tree.c: In function ‘qemu_fdt_add_path’: > .../softmmu/device_tree.c:560:18: error: ‘retval’ may be used uninitialized > in this function [-

Re: [PATCH] softmmu/device_tree: Silence compiler warning with --enable-sanitizers

2022-01-07 Thread Richard Henderson
On 1/7/22 5:38 AM, Thomas Huth wrote: diff --git a/softmmu/device_tree.c b/softmmu/device_tree.c index 3965c834ca..9e96f5ecd5 100644 --- a/softmmu/device_tree.c +++ b/softmmu/device_tree.c @@ -564,7 +564,7 @@ int qemu_fdt_add_path(void *fdt, const char *path) return -1; } -

Re: [PATCH] softmmu/device_tree: Silence compiler warning with --enable-sanitizers

2022-01-07 Thread Andrew Jones
On Fri, Jan 07, 2022 at 02:38:44PM +0100, Thomas Huth wrote: > If I configure my build with --enable-sanitizers, my GCC (v8.5.0) > complains: > > .../softmmu/device_tree.c: In function ‘qemu_fdt_add_path’: > .../softmmu/device_tree.c:560:18: error: ‘retval’ may be used uninitialized > in this fun

Re: [PATCH] softmmu/device_tree: Silence compiler warning with --enable-sanitizers

2022-01-07 Thread Philippe Mathieu-Daudé
On 7/1/22 14:38, Thomas Huth wrote: If I configure my build with --enable-sanitizers, my GCC (v8.5.0) complains: .../softmmu/device_tree.c: In function ‘qemu_fdt_add_path’: .../softmmu/device_tree.c:560:18: error: ‘retval’ may be used uninitialized in this function [-Werror=maybe-uninitialized

[PATCH] softmmu/device_tree: Silence compiler warning with --enable-sanitizers

2022-01-07 Thread Thomas Huth
If I configure my build with --enable-sanitizers, my GCC (v8.5.0) complains: .../softmmu/device_tree.c: In function ‘qemu_fdt_add_path’: .../softmmu/device_tree.c:560:18: error: ‘retval’ may be used uninitialized in this function [-Werror=maybe-uninitialized] int namelen, retval;