From add4131108de4b4a0f3003cb542e9548914fbed1 Mon Sep 17 00:00:00 2001 From: Cary Coutant Date: Sat, 23 Jun 2018 00:26:07 -0700 Subject: [PATCH] Fix "may be used uninitialized" warning. gold/ PR gold/22914 * x86_64.cc (Target_x86_64::record_gnu_property): Initialize val. --- gold/ChangeLog | 5 +++++ gold/x86_64.cc | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gold/ChangeLog b/gold/ChangeLog index 88ee9a53b0b..1e64eb6e02d 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,8 @@ +2018-06-23 Cary Coutant + + PR gold/22914 + * x86_64.cc (Target_x86_64::record_gnu_property): Initialize val. + 2018-06-23 Cary Coutant PR gold/22915 diff --git a/gold/x86_64.cc b/gold/x86_64.cc index 9b725970f03..27f273d64b3 100644 --- a/gold/x86_64.cc +++ b/gold/x86_64.cc @@ -1583,7 +1583,7 @@ Target_x86_64::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) { -- 2.30.2