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