cppcheck: Organizes the suppression list

- cppcheck warnings will lead to build failure
This commit is contained in:
Felipe Zimmerle 2020-01-16 10:03:02 -03:00
parent 86a5f471a9
commit cd9b8aa93b
No known key found for this signature in database
GPG Key ID: E6DFB08CE8B11277
2 changed files with 55 additions and 55 deletions

View File

@ -56,13 +56,15 @@ parser:
cppcheck: cppcheck:
@cppcheck \ @cppcheck -U YYSTYPE \
--suppressions-list=./test/cppcheck_suppressions.txt \ --suppressions-list=./test/cppcheck_suppressions.txt \
--enable=all \ --enable=all \
--inconclusive \ --inconclusive \
--template="warning: {file},{line},{severity},{id},{message}" \ --template="warning: {file},{line},{severity},{id},{message}" \
--std=posix . 2> cppcheck.txt -I headers -I . -I others -I src -I others/mbedtls -I src/parser \
cat cppcheck.txt | grep -v "/ lalr1.cc" --error-exitcode=0 \
-i "src/parser/seclang-parser.cc" -i "src/parser/seclang-scanner.cc" \
.
check-static: cppcheck check-static: cppcheck

View File

@ -1,61 +1,59 @@
unusedFunction:test/regression/regression_test.cc constStatement:test/common/modsecurity_test.cc:81
unusedFunction:src/utils/string.cc duplicateCondition:src/utils/geo_lookup.cc:82
unusedFunction:src/transaction.cc initializerList:src/actions/action.h:90
unusedFunction:src/utils/mbedtls/sha1.c initializerList:src/actions/action.h:91
unusedFunction:src/utils/mbedtls/md5.c invalidScanfArgType_int:src/rules_properties.cc
unusedFunction:src/utils/mbedtls/base64.c knownConditionTrueFalse:test/regression/regression.cc:453
unusedFunction:src/modsecurity.cc leakReturnValNotUsed:src/debug_log_writer_agent.cc:31
unusedFunction:src/utils/msc_tree.cc nullPointerRedundantCheck:src/utils/msc_tree.cc:654
*:src/utils/acmp.cc
unusedFunction:src/macro_expansion.cc
unusedFunction:src/rules.cc
unusedFunction:test/optimization/optimization.cc
unusedFunction:src/utils.cc
*:src/parser/seclang-parser.hh
*:src/parser/seclang-scanner.cc
*:parser/seclang-parser.hh
*:parser/seclang-scanner.cc
*:seclang-parser.tab.hh
*:seclang-scanner.ll
*:seclang-scanner.cc
*:src/seclang-scanner.cc
*:src/parser/seclang-parser.cc
*:others/libinjection/src/libinjection_html5.c *:others/libinjection/src/libinjection_html5.c
*:others/libinjection/src/libinjection_sqli.c *:others/libinjection/src/libinjection_sqli.c
*:others/libinjection/src/libinjection_xss.c *:others/libinjection/src/libinjection_xss.c
*:others/libinjection/src/libinjection_xss.c
*:others/libinjection/src/reader.c *:others/libinjection/src/reader.c
*:others/libinjection/src/sqli_cli.c *:others/libinjection/src/sqli_cli.c
*:others/libinjection/src/testdriver.c
*:others/libinjection/src/test_speed_sqli.c *:others/libinjection/src/test_speed_sqli.c
*:others/libinjection/src/test_speed_xss.c *:others/libinjection/src/test_speed_xss.c
*:others/libinjection/src/testdriver.c *:others/mbedtls/base64.c
initializerList:src/actions/action.h:90 *:others/mbedtls/md5.c
initializerList:src/actions/action.h:91 *:others/mbedtls/sha1.c
*:parser/seclang-parser.hh
*:parser/seclang-scanner.cc
passedByValue:src/variables/time.h:34
postfixOperator:*
readdirCalled:test/common/modsecurity_test.cc:114
*:seclang-parser.tab.hh
*:seclang-scanner.cc
*:seclang-scanner.ll
shiftNegative:src/utils/msc_tree.cc
*:src/parser/seclang-parser.cc
*:src/parser/seclang-parser.hh
*:src/parser/seclang-scanner.cc
*:src/seclang-scanner.cc
*:src/utils/acmp.cc
*:src/utils/msc_tree.cc
*:test/benchmark/owasp-v3/util/av-scanning/runAV/*
unreadVariable:test/regression/regression.cc:380
unusedFunction:src/macro_expansion.cc
unusedFunction:src/modsecurity.cc
unusedFunction:src/rules.cc
unusedFunction:src/transaction.cc
unusedFunction:src/utils.cc
unusedFunction:src/utils/mbedtls/base64.c
unusedFunction:src/utils/mbedtls/md5.c
unusedFunction:src/utils/mbedtls/sha1.c
unusedFunction:src/utils/msc_tree.cc
unusedFunction:src/utils/string.cc
unusedFunction:test/optimization/optimization.cc
unusedFunction:test/regression/regression_test.cc
unusedFunction:test/unit/unit_test.cc:33
unusedLabel:src/unique_id.cc:222 unusedLabel:src/unique_id.cc:222
unusedLabel:src/unique_id.cc:224 unusedLabel:src/unique_id.cc:224
leakReturnValNotUsed:src/debug_log_writer_agent.cc:31 useStlAlgorithm:src/rule.cc
postfixOperator:*
*:others/mbedtls/base64.c
*:others/mbedtls/sha1.c
*:others/mbedtls/md5.c
readdirCalled:test/common/modsecurity_test.cc:114
missingInclude:*
unreadVariable:test/regression/regression.cc:380
shiftNegative:src/utils/msc_tree.cc
nullPointerRedundantCheck:src/utils/msc_tree.cc:654
*:test/benchmark/owasp-v3/util/av-scanning/runAV/*
passedByValue:src/variables/time.h:34
knownConditionTrueFalse:test/regression/regression.cc:453
unusedFunction:test/unit/unit_test.cc:33
useStlAlgorithm:test/unit/unit.cc:174
useStlAlgorithm:test/unit/unit.cc:209
useStlAlgorithm:test/regression/regression.cc:493
constStatement:test/common/modsecurity_test.cc:81
*:src/utils/msc_tree.cc
useStlAlgorithm:src/rules_exceptions.cc:193 useStlAlgorithm:src/rules_exceptions.cc:193
useStlAlgorithm:src/rules_exceptions.cc:199 useStlAlgorithm:src/rules_exceptions.cc:199
invalidScanfArgType_int:src/rules_properties.cc
useStlAlgorithm:src/utils/shared_files.cc:41 useStlAlgorithm:src/utils/shared_files.cc:41
duplicateCondition:src/utils/geo_lookup.cc:82 useStlAlgorithm:test/regression/regression.cc:493
useStlAlgorithm:src/rule.cc useStlAlgorithm:test/unit/unit.cc:174
useStlAlgorithm:test/unit/unit.cc:209
variableScope:src/operators/verify_cpf.cc:45 variableScope:src/operators/verify_cpf.cc:45