This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[gold commit] Fix "may be used uninitialized" warning
- From: ccoutant at gmail dot com
- To: binutils at sourceware dot org
- Date: Sat, 23 Jun 2018 00:28:11 -0700
- Subject: [gold commit] Fix "may be used uninitialized" warning
I committed this trivial patch to fix a "may be used uninitialized" warning.
-cary
2018-06-23 Cary Coutant <ccoutant@gmail.com>
gold/
PR gold/22914
* x86_64.cc (Target_x86_64::record_gnu_property): Initialize val.
diff --git a/gold/x86_64.cc b/gold/x86_64.cc
index 9b725970f0..27f273d64b 100644
--- a/gold/x86_64.cc
+++ b/gold/x86_64.cc
@@ -1583,7 +1583,7 @@ Target_x86_64<size>::record_gnu_property(
size_t pr_datasz, const unsigned char* pr_data,
const Object* object)
{
- uint32_t val;
+ uint32_t val = 0;
switch (pr_type)
{