On 07/24/2017 04:48 PM, Philippe Mathieu-Daudé wrote: > On 07/24/2017 06:09 PM, Peter Maydell wrote: >> On 24 July 2017 at 19:27, Philippe Mathieu-Daudé <f4...@amsat.org> wrote: >>> Use error_report() + exit() instead of error_setg(&error_fatal). >>> >>> hw/arm/sysbus-fdt.c:322:9: warning: Array access (from variable >>> 'node_path') results in a null pointer dereference >>> if (node_path[1]) { >>> ^~~~~~~~~~~~ >> >> I don't understand what this warning is trying to say. >> We can't get to this point with a NULL node_path, >> because of the previous conditional, which is using >> error_setg(&error_fatal). > > Ok I see, Clang is unaware than error_setg(&error_fatal) is a noreturn.
Indeed, and that's because error_setg(&error_fatal) is not in preferred form. > > Patch dropped. That's a shame. Rather, we should patch this file (and others) to avoid all the inconsistent uses of error_setg(&error_*), to comply with the error.h documentation. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature