[Bug general/21011] "may be used uninitialized" error with -Werror=maybe-uninitialized

luizluca at gmail dot com sourceware-bugzilla@sourceware.org
Fri Dec 30 23:14:00 GMT 2016


--- Comment #1 from Luiz Angelo Daros de Luca <luizluca at gmail dot com> ---
Another case:

i386_disasm.c: In function 'i386_disasm':
error: 'str' may be used uninitialized in this function
      (__s < __d && __s + __n > __d))

i386_disasm.c:709:17: note: 'str' was declared here
     const char *str;

This is because of missing:

--- a/libcpu/i386_disasm.c
+++ b/libcpu/i386_disasm.c
@@ -822,6 +822,7 @@ i386_disasm (Ebl *ebl __attribute__((unu
              /* Fallthrough */
              assert (! "INVALID not handled");
+             str = "";

You are receiving this mail because:
You are on the CC list for the bug.

More information about the Elfutils-devel mailing list