[PATCH] Tests: Fix warning in show-die-info.c
Jan-Benedict Glaw
jbglaw@lug-owl.de
Tue Oct 5 15:36:40 GMT 2021
Hi!
My last email had a wrong subject, though the patch was correct.
Here's a second patch, this time *actally* for tests/show-die-info.c:
diff --git a/tests/show-die-info.c b/tests/show-die-info.c
index 34e27a3b..0823cc60 100644
--- a/tests/show-die-info.c
+++ b/tests/show-die-info.c
@@ -97,7 +97,7 @@ handle (Dwarf *dbg, Dwarf_Die *die, int n)
printf ("%*s Attrs :", n * 5, "");
for (cnt = 0; cnt < 0xffff; ++cnt)
if (dwarf_hasattr (die, cnt))
- printf (" %s", dwarf_attr_string (cnt));
+ printf (" %s", (dwarf_attr_string (cnt)? dwarf_attr_string (cnt): ""));
puts ("");
if (dwarf_hasattr (die, DW_AT_low_pc) && dwarf_lowpc (die, &addr) == 0)
Please keep me Cc'ed as I'm not subscribed!
Thanks,
Jan-Benedict
--
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/elfutils-devel/attachments/20211005/0d7e9c60/attachment.sig>
More information about the Elfutils-devel
mailing list