]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* dwarf.c (display_debug_names): Initialize hash_prev.
authorHans-Peter Nilsson <hp@bitrange.com>
Tue, 18 Jul 2017 10:14:38 +0000 (12:14 +0200)
committerHans-Peter Nilsson <hp@bitrange.com>
Tue, 18 Jul 2017 10:14:38 +0000 (12:14 +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.

binutils/ChangeLog
binutils/dwarf.c

index f1400dcbb7b9129c985b38f7827527603f62374e..d36573665d883267226ff67a2bf4d3357fe61ab3 100644 (file)
@@ -1,3 +1,7 @@
+2017-07-18  Hans-Peter Nilsson  <hp@bitrange.com>
+
+       * dwarf.c (display_debug_names): Initialize hash_prev.
+
 2017-07-17  Nick Clifton  <nickc@redhat.com>
 
        PR 21433
index 5f8922eb8aad224fd7844b6fa44ecda3c39a4512..f6fa157fed40ae2d2fe1834cb620274ec1df76d7 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;