Skip to content

Commit aca93f5

Browse files
committed
Remove no longer needed cppcheck inline suppressions.
1 parent 7ec50eb commit aca93f5

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

headers/modsecurity/transaction.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ class Transaction : public TransactionAnchoredVariables, public TransactionSecMa
405405
size_t getRequestBodyLength();
406406

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

src/engine/lua.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ class Lua {
6767
public:
6868
Lua() { }
6969

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

7474
#ifdef WITH_LUA

src/operators/validate_url_encoding.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ bool ValidateUrlEncoding::evaluate(Transaction *transaction, RuleWithActions *ru
7474
bool res = false;
7575

7676
if (input.empty() == true) {
77-
return res; // cppcheck-suppress knownConditionTrueFalse
77+
return res;
7878
}
7979

8080
int rc = validate_url_encoding(input.c_str(), input.size(), &offset);

src/operators/verify_cpf.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ bool VerifyCPF::verify(const char *cpfnumber, int len) const {
7474
c = cpf_len;
7575

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

8080
factor = (sum % cpf_len);

src/operators/verify_svnr.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ bool VerifySVNR::verify(const char *svnrnumber, int len) const {
6464
}
6565
//Laufnummer mit 3, 7, 9
6666
//Geburtsdatum mit 5, 8, 4, 2, 1, 6
67-
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
67+
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;
6868
sum %= 11;
6969
if(sum == 10){
7070
sum = 0;
@@ -84,7 +84,7 @@ bool VerifySVNR::evaluate(Transaction *t, RuleWithActions *rule,
8484
int i;
8585

8686
if (m_param.empty()) {
87-
return is_svnr; // cppcheck-suppress knownConditionTrueFalse
87+
return is_svnr;
8888
}
8989

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

0 commit comments

Comments
 (0)