summaryrefslogtreecommitdiffstats
path: root/src/import/hwpf/fapi2/include
diff options
context:
space:
mode:
authorZach Clark <zach@ibm.com>2019-06-06 12:15:01 -0500
committerChristian R. Geddes <crgeddes@us.ibm.com>2019-06-17 14:50:08 -0500
commitcffebe48c7b15e67c07fe6e805d240ee9ba6f93b (patch)
tree56a1b5a46528b89172430d25584832e76a400e99 /src/import/hwpf/fapi2/include
parentb3996f56863f07cd6fa2f5a392c5c2497d177b35 (diff)
downloadtalos-hostboot-cffebe48c7b15e67c07fe6e805d240ee9ba6f93b.tar.gz
talos-hostboot-cffebe48c7b15e67c07fe6e805d240ee9ba6f93b.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/78513 Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Diffstat (limited to 'src/import/hwpf/fapi2/include')
-rw-r--r--src/import/hwpf/fapi2/include/variable_buffer.H4
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 0c1414486..5b31937d4 100644
--- a/src/import/hwpf/fapi2/include/variable_buffer.H
+++ b/src/import/hwpf/fapi2/include/variable_buffer.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot 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)
OpenPOWER on IntegriCloud