Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* macrotab.c -Werror
@ 2002-05-13 16:35 Andrew Cagney
  2002-05-13 17:28 ` Daniel Berlin
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Cagney @ 2002-05-13 16:35 UTC (permalink / raw)
  To: Jim blandy, gdb-patches

[second attempt at posting]

Jim,

FYI, I'm seeing:

gdb/macrotab.c:504: warning: `best_depth' might be used uninitialized in
this function
gmake: *** [macrotab.o] Error 1

for the code:

    /* It's not us.  Try all our children, and return the lowest.  */
    {
      struct macro_source_file *child;
      struct macro_source_file *best = 0;
      int best_depth;

      for (child = source->includes; child; child = child->next_included)
        {
          struct macro_source_file *result
            = macro_lookup_inclusion (child, name);

          if (result)
            {
              int result_depth = inclusion_depth (result);

              if (! best || result_depth < best_depth) <-- HERE
                {
                  best = result;
                  best_depth = result_depth;
                }
            }
        }

      return best;
    }

enjoy,
Andrew




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-05-14 20:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-13 16:35 macrotab.c -Werror Andrew Cagney
2002-05-13 17:28 ` Daniel Berlin
2002-05-14 12:55   ` Jim Blandy
2002-05-14 13:27     ` Andrew Cagney
2002-05-14 13:50     ` Daniel Berlin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox