macrotab.c -Werror

Andrew Cagney ac131313@cygnus.com
Mon May 13 16:35:00 GMT 2002


[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





More information about the Gdb-patches mailing list