mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-13 13:26:01 +03:00
Address some cppcheck complaints
This commit is contained in:
parent
b0b459d3a1
commit
648cad380e
@ -97,7 +97,6 @@ int main (int argc, char **argv)
|
||||
{
|
||||
int ret;
|
||||
const char *error = NULL;
|
||||
int i = 0;
|
||||
pid_t pid;
|
||||
int f;
|
||||
|
||||
|
@ -329,7 +329,6 @@ int Lua::setvar(lua_State *L) {
|
||||
std::string collection;
|
||||
std::string variableName;
|
||||
int nargs = lua_gettop(L);
|
||||
char *chr = NULL;
|
||||
size_t pos;
|
||||
void *z(NULL);
|
||||
|
||||
|
@ -64,6 +64,7 @@ passedByValue:src/variables/global.h:110
|
||||
passedByValue:src/parser/driver.cc:45
|
||||
passedByValue:test/common/modsecurity_test.cc:49
|
||||
passedByValue:test/common/modsecurity_test.cc:98
|
||||
unreadVariable:src/rule_with_operator.cc:219
|
||||
|
||||
uninitvar:src/operators/verify_cpf.cc:77
|
||||
uninitvar:src/operators/verify_svnr.cc:67
|
||||
@ -91,7 +92,6 @@ cstyleCast
|
||||
functionStatic
|
||||
variableScope
|
||||
shadowFunction
|
||||
unreadVariable
|
||||
|
||||
|
||||
// Examples
|
||||
|
@ -83,7 +83,6 @@ int main(int argc, char **argv) {
|
||||
|
||||
for (int i = 0; i < rules->size(); i++) {
|
||||
auto z = rules->at(i);
|
||||
std::string key;
|
||||
if (z == NULL) {
|
||||
continue;
|
||||
}
|
||||
@ -95,7 +94,6 @@ int main(int argc, char **argv) {
|
||||
} else {
|
||||
operators[op] = 1;
|
||||
}
|
||||
key = op;
|
||||
}
|
||||
|
||||
if (dynamic_cast<modsecurity::RuleWithOperator *>(z.get()) != nullptr) {
|
||||
@ -107,7 +105,6 @@ int main(int argc, char **argv) {
|
||||
} else {
|
||||
operators[op] = 1;
|
||||
}
|
||||
key = op;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user