Address some cppcheck complaints

This commit is contained in:
Martin Vierula 2022-08-31 13:19:45 -07:00
parent b0b459d3a1
commit 648cad380e
No known key found for this signature in database
GPG Key ID: F2FC4E45883BCBA4
4 changed files with 1 additions and 6 deletions

View File

@ -97,7 +97,6 @@ int main (int argc, char **argv)
{
int ret;
const char *error = NULL;
int i = 0;
pid_t pid;
int f;

View File

@ -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);

View File

@ -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

View File

@ -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;
}
}