mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Cosmetic changes: applies changes suggested by static analysis
This commit is contained in:
@@ -11,6 +11,8 @@ 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
|
||||
*:others/libinjection/src/libinjection_html5.c
|
||||
*:others/libinjection/src/libinjection_sqli.c
|
||||
*:others/libinjection/src/libinjection_xss.c
|
||||
@@ -20,5 +22,16 @@ unusedFunction:src/utils.cc
|
||||
*:others/libinjection/src/test_speed_sqli.c
|
||||
*:others/libinjection/src/test_speed_xss.c
|
||||
*:others/libinjection/src/testdriver.c
|
||||
|
||||
|
||||
initializerList:src/actions/action.h:90
|
||||
initializerList:src/actions/action.h:91
|
||||
unusedLabel:src/unique_id.cc:222
|
||||
unusedLabel:src/unique_id.cc:224
|
||||
leakReturnValNotUsed:src/debug_log_writer_agent.cc:31
|
||||
postfixOperator:*
|
||||
*:src/utils/mbedtls/base64.c
|
||||
*:src/utils/mbedtls/sha1.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
|
||||
|
@@ -55,6 +55,7 @@ int main(int argc, char **argv) {
|
||||
if (modsecRules->loadFromUri(x.c_str()) < 0) {
|
||||
std::cout << "Not able to load the rules" << std::endl;
|
||||
std::cout << modsecRules->getParserError() << std::endl;
|
||||
delete modsecRules;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@@ -145,7 +146,7 @@ int main(int argc, char **argv) {
|
||||
std::cout << std::endl;
|
||||
std::cout << std::endl;
|
||||
|
||||
|
||||
delete modsecRules;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@@ -310,7 +310,9 @@ void perform_unit_test(ModSecurityTest<RegressionTest> *test,
|
||||
}
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
end:
|
||||
#endif
|
||||
modsec_transaction->processLogging();
|
||||
|
||||
CustomDebugLog *d = reinterpret_cast<CustomDebugLog *>
|
||||
@@ -416,7 +418,7 @@ int main(int argc, char **argv) {
|
||||
for (std::string &a : keyList) {
|
||||
test_number++;
|
||||
if ((test.m_test_number == 0)
|
||||
|| (test.m_test_number != 0 && test_number == test.m_test_number)) {
|
||||
|| (test_number == test.m_test_number)) {
|
||||
std::vector<RegressionTest *> *tests = test[a];
|
||||
perform_unit_test(&test, tests, &res, &counter);
|
||||
}
|
||||
|
Reference in New Issue
Block a user