Skip to content

Commit 9f5dc20

Browse files
committed
Replace final three suppressions entries with line numbers
- These were initially not included in these changes, as they were other PRs (owasp-modsecurity#3104 & owasp-modsecurity#3132) that address them.
1 parent 95ce3a7 commit 9f5dc20

File tree

4 files changed

+3
-7
lines changed

4 files changed

+3
-7
lines changed

headers/modsecurity/transaction.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ class TransactionSecMarkerManagement {
310310
if (m_marker) {
311311
return m_marker;
312312
} else {
313-
throw;
313+
throw; // cppcheck-suppress rethrowNoCurrentException
314314
}
315315
}
316316

src/rule_with_actions.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ RuleWithActions::RuleWithActions(
124124
delete a;
125125
std::cout << "General failure, action: " << a->m_name;
126126
std::cout << " has an unknown type." << std::endl;
127-
throw;
127+
throw; // cppcheck-suppress rethrowNoCurrentException
128128
}
129129
}
130130
delete actions;

src/utils/shared_files.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class SharedFiles {
8484
bool toBeCreated(false);
8585
bool err = false;
8686

87-
m_memKeyStructure = ftok(".", 1);
87+
m_memKeyStructure = ftok(".", 1); // cppcheck-suppress useInitializationList
8888
if (m_memKeyStructure < 0) {
8989
err = true;
9090
goto err_mem_key;

test/cppcheck_suppressions.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ shiftNegative:src/utils/msc_tree.cc
3030
//
3131
// ModSecurity v3 code...
3232
//
33-
useInitializationList:src/utils/shared_files.h:87
34-
rethrowNoCurrentException:headers/modsecurity/transaction.h:313
35-
rethrowNoCurrentException:src/rule_with_actions.cc:127
36-
3733
variableScope:src/operators/rx.cc
3834
variableScope:src/operators/rx_global.cc
3935

0 commit comments

Comments
 (0)