Skip to content

chore: fix cppcheck issues with v2.21.0#3593

Merged
fzipi merged 3 commits into
owasp-modsecurity:v2/masterfrom
airween:v2/cppcheck260701
Jul 1, 2026
Merged

chore: fix cppcheck issues with v2.21.0#3593
fzipi merged 3 commits into
owasp-modsecurity:v2/masterfrom
airween:v2/cppcheck260701

Conversation

@airween

@airween airween commented Jul 1, 2026

Copy link
Copy Markdown
Member

what

Fix cppcheck issues with the newest cppcheck version (2.21.0).

I think this warning is a false positive, and caused some wrong macro expansion.

why

Recent PRs' cppcheck were failed, eg. this.

@airween airween requested a review from Copilot July 1, 2026 18:59
@airween airween added the 2.x Related to ModSecurity version 2.x label Jul 1, 2026
@airween airween requested a review from fzipi July 1, 2026 18:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses new cppcheck (v2.21.0) style warnings in the standalone/ Apache-compat shim code by adding inline suppression directives, aiming to restore green CI for static analysis runs.

Changes:

  • Added // cppcheck-suppress funcArgNamesDifferentUnnamed annotations to hook/filter declarations that trigger funcArgNamesDifferentUnnamed warnings.
  • Adjusted a couple of multi-line declarations to include the suppressions where cppcheck reports the issues.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
standalone/hooks.c Adds cppcheck suppression comments to hook macro invocations that trigger funcArgNamesDifferentUnnamed.
standalone/filters.c Adds cppcheck suppression comments to filter registration function signatures that trigger funcArgNamesDifferentUnnamed.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread standalone/hooks.c Outdated
Comment thread standalone/filters.c Outdated
Comment thread standalone/filters.c Outdated
airween and others added 2 commits July 1, 2026 21:03
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@sonarqubecloud

sonarqubecloud Bot commented Jul 1, 2026

Copy link
Copy Markdown

@fzipi fzipi merged commit d27c982 into owasp-modsecurity:v2/master Jul 1, 2026
92 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.x Related to ModSecurity version 2.x

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants