]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* dwarf.c (display_debug_names): Initialize hash_prev.
authorHans-Peter Nilsson <hp@bitrange.com>
Thu, 14 Sep 2017 02:52:20 +0000 (04:52 +0200)
committerHans-Peter Nilsson <hp@bitrange.com>
Thu, 14 Sep 2017 02:52:20 +0000 (04:52 +0200)
gcc-4.3.0 warns that it may be used uninitialized.  It takes a look
and a half at the code to understand that it's false.

Import from mainline.

binutils/ChangeLog
binutils/dwarf.c

index cffc49a66ea1aee878663bece8900031ee052202..1df592163ebe38057090520cce45b8827001fe4f 100644 (file)
@@ -1,3 +1,8 @@
+2017-07-18  Hans-Peter Nilsson  <hp@bitrange.com>
+
+       Import from mainline:
+       * dwarf.c (display_debug_names): Initialize hash_prev.
+
 2017-09-05  Nick Clifton  <nickc@redhat.com>
 
        Import from mainline:
index 419839b581edf66cd8c74fbeb66772b5454200eb..3842ffdf118f63f0b40ce84625e6ac6950899155 100644 (file)
@@ -7816,7 +7816,7 @@ display_debug_names (struct dwarf_section *section, void *file)
       printf (_("Used %zu of %lu buckets.\n"), buckets_filled,
              (unsigned long) bucket_count);
 
-      uint32_t hash_prev;
+      uint32_t hash_prev = 0;
       size_t hash_clash_count = 0;
       size_t longest_clash = 0;
       size_t this_length = 0;