Skip to content

Commit

Permalink
Remove no longer needed cppcheck inline suppressions.
Browse files Browse the repository at this point in the history
  • Loading branch information
eduar-hte committed Oct 21, 2024
1 parent c3cdbf5 commit 88af166
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion headers/modsecurity/transaction.h
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ class Transaction : public TransactionAnchoredVariables, public TransactionSecMa
size_t getRequestBodyLength();

#ifndef NO_LOGS
void debug(int, const std::string &) const; // cppcheck-suppress functionStatic
void debug(int, const std::string &) const;
#endif
void serverLog(const RuleMessage &rm);

Expand Down
4 changes: 2 additions & 2 deletions src/engine/lua.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ class Lua {
public:
Lua() { }

bool load(const std::string &script, std::string *err); // cppcheck-suppress functionStatic ; triggered when compiling without LUA
int run(Transaction *t, const std::string &str = ""); // cppcheck-suppress functionStatic ; triggered when compiling without LUA
bool load(const std::string &script, std::string *err);
int run(Transaction *t, const std::string &str = "");
static bool isCompatible(const std::string &script, Lua *l, std::string *error);

#ifdef WITH_LUA
Expand Down
2 changes: 1 addition & 1 deletion src/operators/validate_url_encoding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ bool ValidateUrlEncoding::evaluate(Transaction *transaction, RuleWithActions *ru
bool res = false;

if (input.empty() == true) {
return res; // cppcheck-suppress knownConditionTrueFalse
return res;
}

int rc = validate_url_encoding(input.c_str(), input.size(), &offset);
Expand Down
2 changes: 1 addition & 1 deletion src/operators/verify_cpf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ bool VerifyCPF::verify(const char *cpfnumber, int len) const {
c = cpf_len;

for (i = 0; i < 9; i++) {
sum += (cpf[i] * --c); // cppcheck-suppress uninitvar
sum += (cpf[i] * --c);
}

factor = (sum % cpf_len);
Expand Down
4 changes: 2 additions & 2 deletions src/operators/verify_svnr.cc
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ bool VerifySVNR::verify(const char *svnrnumber, int len) const {
}
//Laufnummer mit 3, 7, 9
//Geburtsdatum mit 5, 8, 4, 2, 1, 6
sum = svnr[0] * 3 + svnr[1] * 7 + svnr[2] * 9 + svnr[4] * 5 + svnr[5] * 8 + svnr[6] * 4 + svnr[7] * 2 + svnr[8] * 1 + svnr[9] * 6; // cppcheck-suppress uninitvar
sum = svnr[0] * 3 + svnr[1] * 7 + svnr[2] * 9 + svnr[4] * 5 + svnr[5] * 8 + svnr[6] * 4 + svnr[7] * 2 + svnr[8] * 1 + svnr[9] * 6;
sum %= 11;
if(sum == 10){
sum = 0;
Expand All @@ -84,7 +84,7 @@ bool VerifySVNR::evaluate(Transaction *t, RuleWithActions *rule,
int i;

if (m_param.empty()) {
return is_svnr; // cppcheck-suppress knownConditionTrueFalse
return is_svnr;
}

for (i = 0; i < input.size() - 1 && is_svnr == false; i++) {
Expand Down

0 comments on commit 88af166

Please sign in to comment.