libdw: Enable building with -Og.
authorMark Wielaard <mark@klomp.org>
Fri, 23 Nov 2018 19:50:51 +0000 (20:50 +0100)
committerMark Wielaard <mark@klomp.org>
Fri, 23 Nov 2018 20:06:30 +0000 (21:06 +0100)
commitffbe89d87918559ee38c65be16d39b42608735e8
tree598794005c060a60da62799eb65fba13b503077b
parent628b4a93c6863b9982d817db6acaacbc4e116453
libdw: Enable building with -Og.

When building with -Og gcc is unable to see that __libdw_dieabbrev ()
will initialize what the second argument points to when no error occurs
as called by dwarf_child and dwarf_getattrs. Causing an possibly
uninitialized error. Just initialize readp/die_addr to NULL, which is
the value we would return if an error occurs anyway.

https://sourceware.org/bugzilla/show_bug.cgi?id=23914

Signed-off-by: Mark Wielaard <mark@klomp.org>
libdw/ChangeLog
libdw/dwarf_child.c
libdw/dwarf_getattrs.c