diff options
author | Zach Clark <zach@ibm.com> | 2019-06-06 12:15:01 -0500 |
---|---|---|
committer | RAJA DAS <rajadas2@in.ibm.com> | 2019-06-14 13:47:14 -0500 |
commit | 8384a9660449b237d492f5a953e3e12d9deaaf49 (patch) | |
tree | 53a1f4a963c3701520177ac42c52267f47982967 | |
parent | 8ec1c8aac612a6166218f6f5856b85ec238f8059 (diff) | |
download | talos-sbe-8384a9660449b237d492f5a953e3e12d9deaaf49.tar.gz talos-sbe-8384a9660449b237d492f5a953e3e12d9deaaf49.zip |
Fix "possibly uninitialized variable"
Compiling with GCOV causes the variable_buffer::flipBit() function
to be analyzed differently than without, resulting in a warning for
the possibly-uninitialized variable and causing compilation failure
when the -Werror option is enabled. This commit explicitly initializes
the variable.
Change-Id: Idc59ba411cc1f9200888bba6c215e48bb7051b7c
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/78485
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com>
Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Reviewed-by: Ilya Smirnov <ismirno@us.ibm.com>
Reviewed-by: Jennifer A Stofer <stofer@us.ibm.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/78514
Reviewed-by: RAJA DAS <rajadas2@in.ibm.com>
-rw-r--r-- | src/import/hwpf/fapi2/include/variable_buffer.H | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/import/hwpf/fapi2/include/variable_buffer.H b/src/import/hwpf/fapi2/include/variable_buffer.H index c96f83a9..761ee27b 100644 --- a/src/import/hwpf/fapi2/include/variable_buffer.H +++ b/src/import/hwpf/fapi2/include/variable_buffer.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER sbe Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2017 */ +/* Contributors Listed Below - COPYRIGHT 2015,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -475,7 +475,7 @@ class variable_buffer /// inline fapi2::ReturnCodes flipBit( bits_type SB, bits_type L = 1) { - ReturnCodes rc; + ReturnCodes rc = FAPI2_RC_SUCCESS; // make sure we are within our container if((SB + L) <= this->iv_perceived_bit_length) |