]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
dwarflint: Only report "cause by this" messages when --ref is given
authorPetr Machata <pmachata@redhat.com>
Fri, 20 Mar 2009 17:03:49 +0000 (18:03 +0100)
committerPetr Machata <pmachata@redhat.com>
Fri, 20 Mar 2009 16:59:43 +0000 (17:59 +0100)
src/dwarflint.c

index 2fdf3339e877a6063eb1bfd29a7d3a491a93bb1f..023625e90d466fb84903bca042878182ad025e0f 100644 (file)
@@ -954,7 +954,7 @@ where_fmt (const struct where *wh, char *ptr)
 void
 where_fmt_chain (const struct where *wh, const char *severity)
 {
-  if (wh != NULL)
+  if (wh != NULL && show_refs)
     for (struct where *it = wh->next; it != NULL; it = it->next)
       printf ("%s: %s: caused by this reference.\n",
              severity, where_fmt (it, NULL));
@@ -4259,7 +4259,7 @@ check_loc_or_range_ref (const struct read_ctx *parent_ctx,
   uint64_t base = cu->base;
   while (!read_ctx_eof (&ctx))
     {
-      struct where where = WHERE (sec, show_refs ? wh : NULL);
+      struct where where = WHERE (sec, wh);
       where_reset_1 (&where, read_ctx_get_offset (&ctx));
 
 #define HAVE_OVERLAP                                           \