Skip to content

Commit

Permalink
Replace final three suppressions entries with line numbers
Browse files Browse the repository at this point in the history
- These were initially not included in these changes, as they were
other PRs (owasp-modsecurity#3104 & owasp-modsecurity#3132) that address them.
  • Loading branch information
eduar-hte committed Apr 30, 2024
1 parent 95ce3a7 commit 9f5dc20
Show file tree
Hide file tree
Showing 4 changed files with 3 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 @@ -310,7 +310,7 @@ class TransactionSecMarkerManagement {
if (m_marker) {
return m_marker;
} else {
throw;
throw; // cppcheck-suppress rethrowNoCurrentException
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/rule_with_actions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ RuleWithActions::RuleWithActions(
delete a;
std::cout << "General failure, action: " << a->m_name;
std::cout << " has an unknown type." << std::endl;
throw;
throw; // cppcheck-suppress rethrowNoCurrentException
}
}
delete actions;
Expand Down
2 changes: 1 addition & 1 deletion src/utils/shared_files.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class SharedFiles {
bool toBeCreated(false);
bool err = false;

m_memKeyStructure = ftok(".", 1);
m_memKeyStructure = ftok(".", 1); // cppcheck-suppress useInitializationList
if (m_memKeyStructure < 0) {
err = true;
goto err_mem_key;
Expand Down
4 changes: 0 additions & 4 deletions test/cppcheck_suppressions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ shiftNegative:src/utils/msc_tree.cc
//
// ModSecurity v3 code...
//
useInitializationList:src/utils/shared_files.h:87
rethrowNoCurrentException:headers/modsecurity/transaction.h:313
rethrowNoCurrentException:src/rule_with_actions.cc:127

variableScope:src/operators/rx.cc
variableScope:src/operators/rx_global.cc

Expand Down

0 comments on commit 9f5dc20

Please sign in to comment.