Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Add false positive cppcheck-suppress for compatibility with upda… #3307

Merged

Conversation

gberkes
Copy link

@gberkes gberkes commented Nov 23, 2024

…ted cppcheck version

what

  • Added a cppcheck-suppress directive to handle a false positive detected by cppcheck 2.16.

why

  • This change addresses an issue caused by the recent Homebrew update on macOS CI runner, which upgraded cppcheck from version 2.15 to 2.16.

references

    172/201 files checked 86% done
    Checking src/utils/system.cc ...
    Defines:MS_CPPCHECK_DISABLED_FOR_PARSER=1
    Undefines: MBEDTLS_MD5_ALT; MBEDTLS_SHA1_ALT; YYSTYPE; YY_USER_INIT
    Includes: -Iheaders/ -I./ -Iothers/ -Isrc/ -Iothers/mbedtls/include/
    Platform:native
    Checking src/utils/system.cc: MS_CPPCHECK_DISABLED_FOR_PARSER=1...
    Checking src/utils/system.cc: MS_CPPCHECK_DISABLED_FOR_PARSER=1;NO_LOGS...
    Checking src/utils/system.cc: MS_CPPCHECK_DISABLED_FOR_PARSER=1;S_IFMT;S_IFREG;S_ISREG...        
    warning: src/utils/system.cc,213,error,syntaxError,syntax error                              <<<
    Checking src/utils/system.cc: MS_CPPCHECK_DISABLED_FOR_PARSER=1;WIN32...
    Checking src/utils/system.cc: MS_CPPCHECK_DISABLED_FOR_PARSER=1;_MSC_VER...
    Checking src/utils/system.cc: MS_CPPCHECK_DISABLED_FOR_PARSER=1;__GNUC__...
    Checking src/utils/system.cc: MS_CPPCHECK_DISABLED_FOR_PARSER=1;__OpenBSD__...
    173/201 files checked 87% done

warning: src/utils/system.cc,213,error,syntaxError,syntax error

…ted cppcheck version

- Added a cppcheck-suppress directive to handle a false positive detected
  by cppcheck 2.16.
- This change addresses an issue caused by the recent Homebrew update
  on macOS CI runner, which upgraded cppcheck from version 2.15 to 2.16.
@airween
Copy link
Member

airween commented Nov 23, 2024

Thanks, just FYI: check this comment.

@airween airween merged commit fd45641 into owasp-modsecurity:v3/master Nov 23, 2024
49 checks passed
@marcstern marcstern added 3.x Related to ModSecurity version 3.x and removed 3.x Related to ModSecurity version 3.x labels Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants