diff options
author | Megan <megan.teo@ibm.com> | 2019-06-25 15:17:40 -0500 |
---|---|---|
committer | Daniel M Crowell <dcrowell@us.ibm.com> | 2019-09-11 10:53:06 -0500 |
commit | 1d4530dac35a6baddf60a3bfd454aac1949f69b6 (patch) | |
tree | 5322e1e18208364078d0e0a5f54ecdf48402fe50 /src/build/beam | |
parent | bafe5de9d8b538d978d9955386b5f1fd0ae1d82b (diff) | |
download | talos-hostboot-1d4530dac35a6baddf60a3bfd454aac1949f69b6.tar.gz talos-hostboot-1d4530dac35a6baddf60a3bfd454aac1949f69b6.zip |
Implement Static Analysis with cppcheck
Cppcheck static analysis tool can now be run when compiling
by running: make cppcheck
And it will always run when committing without stopping the
commit if an error is found.
This commit suppresses some false positives found in the code.
A false positive can be suppressed inline by placing
“// cppcheck-suppress syntaxError” in a line before the false
positive., e.g.:
char arr[5];
// cppcheck-suppress arrayIndexOutOfBounds
arr[10] = 0;
Change-Id: I9e833a153d6b04df2f8a72cd994e43922c61c2fe
RTC: 201451
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/79629
Reviewed-by: Zachary Clark <zach@ibm.com>
Reviewed-by: Nicholas E Bofferding <bofferdn@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/build/beam')
-rw-r--r-- | src/build/beam/core/assert.C | 6 | ||||
-rw-r--r-- | src/build/beam/core/pagemgr.C | 5 | ||||
-rw-r--r-- | src/build/beam/core/stacksegment.C | 5 | ||||
-rw-r--r-- | src/build/beam/hwp/mvpdRingFuncs.C | 5 | ||||
-rw-r--r-- | src/build/beam/i2c/i2c.C | 6 | ||||
-rw-r--r-- | src/build/beam/prdf/prdfBitKey.C | 5 | ||||
-rw-r--r-- | src/build/beam/prdf/prdfPegasusConfigurator.C | 5 | ||||
-rw-r--r-- | src/build/beam/targeting/targetservice.C | 5 |
8 files changed, 34 insertions, 8 deletions
diff --git a/src/build/beam/core/assert.C b/src/build/beam/core/assert.C index c7186668f..183e1847d 100644 --- a/src/build/beam/core/assert.C +++ b/src/build/beam/core/assert.C @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2014 */ +/* Contributors Listed Below - COPYRIGHT 2014,2019 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -20,5 +22,7 @@ /* permissions and limitations under the License. */ /* */ /* IBM_PROLOG_END_TAG */ +// cppcheck-suppress syntaxError >>>ERROR5___assert_d9b551657c952063 + >>>ERROR5___assert_941b08c17c952063 diff --git a/src/build/beam/core/pagemgr.C b/src/build/beam/core/pagemgr.C index 54779d750..2cde4394d 100644 --- a/src/build/beam/core/pagemgr.C +++ b/src/build/beam/core/pagemgr.C @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2014 */ +/* Contributors Listed Below - COPYRIGHT 2014,2019 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -20,5 +22,6 @@ /* permissions and limitations under the License. */ /* */ /* IBM_PROLOG_END_TAG */ +// cppcheck-suppress syntaxError >>>MISTAKE5__initialize_7639026bb95510e7 >>>MISTAKE5__initialize_2d381016b95510e7 diff --git a/src/build/beam/core/stacksegment.C b/src/build/beam/core/stacksegment.C index cfc2cf308..e7bd9eb21 100644 --- a/src/build/beam/core/stacksegment.C +++ b/src/build/beam/core/stacksegment.C @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2014 */ +/* Contributors Listed Below - COPYRIGHT 2014,2019 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -20,4 +22,5 @@ /* permissions and limitations under the License. */ /* */ /* IBM_PROLOG_END_TAG */ +// cppcheck-suppress syntaxError >>>ERROR8_~StackSegment_b791f4a2ac177b6 diff --git a/src/build/beam/hwp/mvpdRingFuncs.C b/src/build/beam/hwp/mvpdRingFuncs.C index 5c113e990..50f58dc83 100644 --- a/src/build/beam/hwp/mvpdRingFuncs.C +++ b/src/build/beam/hwp/mvpdRingFuncs.C @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2019 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -20,5 +22,6 @@ /* permissions and limitations under the License. */ /* */ /* IBM_PROLOG_END_TAG */ +// cppcheck-suppress syntaxError >>>MISTAKE17_mbvpdValidateRecordKeyword_d149f58f1505 >>>MISTAKE5_mbvpdRingFunc_b48fca4f6c313e21 diff --git a/src/build/beam/i2c/i2c.C b/src/build/beam/i2c/i2c.C index 6bc1a97f4..1d2632b8f 100644 --- a/src/build/beam/i2c/i2c.C +++ b/src/build/beam/i2c/i2c.C @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2014 */ +/* Contributors Listed Below - COPYRIGHT 2014,2019 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -20,4 +22,6 @@ /* permissions and limitations under the License. */ /* */ /* IBM_PROLOG_END_TAG */ +// cppcheck-suppress syntaxError >>>MISTAKE17_i2cSetupMasters_8697e17e1505 + diff --git a/src/build/beam/prdf/prdfBitKey.C b/src/build/beam/prdf/prdfBitKey.C index b1618ebe9..0d9d67938 100644 --- a/src/build/beam/prdf/prdfBitKey.C +++ b/src/build/beam/prdf/prdfBitKey.C @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2014 */ +/* Contributors Listed Below - COPYRIGHT 2014,2019 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -20,5 +22,6 @@ /* permissions and limitations under the License. */ /* */ /* IBM_PROLOG_END_TAG */ +// cppcheck-suppress syntaxError >>>MISTAKE17_operator==_f7028aed1505 >>>MISTAKE17_operator==_70cd34271505 diff --git a/src/build/beam/prdf/prdfPegasusConfigurator.C b/src/build/beam/prdf/prdfPegasusConfigurator.C index 956ed90b2..e19a1b881 100644 --- a/src/build/beam/prdf/prdfPegasusConfigurator.C +++ b/src/build/beam/prdf/prdfPegasusConfigurator.C @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2014 */ +/* Contributors Listed Below - COPYRIGHT 2014,2019 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -20,5 +22,6 @@ /* permissions and limitations under the License. */ /* */ /* IBM_PROLOG_END_TAG */ +// cppcheck-suppress syntaxError >>>MISTAKE17_addPllDomainsToSystem_954f5e401505 >>>MISTAKE17_addPllDomainsToSystem_c01c04751505 diff --git a/src/build/beam/targeting/targetservice.C b/src/build/beam/targeting/targetservice.C index 4e069351d..029876273 100644 --- a/src/build/beam/targeting/targetservice.C +++ b/src/build/beam/targeting/targetservice.C @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2014 */ +/* Contributors Listed Below - COPYRIGHT 2011,2019 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -20,5 +22,6 @@ /* permissions and limitations under the License. */ /* */ /* IBM_PROLOG_END_TAG */ +// cppcheck-suppress syntaxError >>>MISTAKE5_queryMasterProcChipTargetHandle_2745d8d11505 >>>MISTAKE5_queryMasterProcChipTargetHandle_da38b67e1505 |