mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Cosmetics: fixed static analysis issues.
This commit is contained in:
@@ -145,7 +145,7 @@ void ModSecurityTest<T>::cmd_options(int argc, char **argv) {
|
||||
i++;
|
||||
m_count_all = true;
|
||||
}
|
||||
if (const char* env_p = std::getenv("AUTOMAKE_TESTS")) {
|
||||
if (std::getenv("AUTOMAKE_TESTS")) {
|
||||
m_automake_output = true;
|
||||
}
|
||||
|
||||
|
@@ -6,7 +6,7 @@ unusedFunction:src/utils/mbedtls/md5.c
|
||||
unusedFunction:src/utils/mbedtls/base64.c
|
||||
unusedFunction:src/modsecurity.cc
|
||||
unusedFunction:src/utils/msc_tree.cc
|
||||
unusedFunction:src/utils/acmp.cc
|
||||
*:src/utils/acmp.cc
|
||||
unusedFunction:src/macro_expansion.cc
|
||||
unusedFunction:src/rules.cc
|
||||
unusedFunction:test/optimization/optimization.cc
|
||||
@@ -43,8 +43,19 @@ 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/common.c
|
||||
*: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:199
|
||||
invalidScanfArgType_int:src/rules_properties.cc
|
||||
useStlAlgorithm:src/utils/shared_files.cc:41
|
||||
duplicateCondition:src/utils/geo_lookup.cc:82
|
||||
useStlAlgorithm:src/rule.cc
|
||||
variableScope:src/operators/verify_cpf.cc:45
|
||||
|
@@ -67,7 +67,7 @@ int main(int argc, char **argv) {
|
||||
std::cout << std::endl;
|
||||
|
||||
int nphases = modsecurity::Phases::NUMBER_OF_PHASES;
|
||||
for (int i = 0; i < nphases; i++) {
|
||||
for (int j = 0; j < nphases; j++) {
|
||||
std::vector<Rule *> rules = modsecRules->m_rules[i];
|
||||
if (rules.size() == 0) {
|
||||
continue;
|
||||
|
@@ -200,13 +200,13 @@ RegressionTest *RegressionTest::from_yajl_node(const yajl_val &node) {
|
||||
}
|
||||
}
|
||||
if (strcmp(key, "rules") == 0) {
|
||||
std::stringstream i;
|
||||
std::stringstream si;
|
||||
for (int j = 0; j < val->u.array.len; j++) {
|
||||
yajl_val val2 = val->u.array.values[ j ];
|
||||
const char *key = YAJL_GET_STRING(val2);
|
||||
i << key << "\n";
|
||||
const char *keyj = YAJL_GET_STRING(val2);
|
||||
si << keyj << "\n";
|
||||
}
|
||||
u->rules = i.str();
|
||||
u->rules = si.str();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user