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

A1-1-2: does not detect compilations that suppress warnings with -w flag #693

Closed
MichaelRFairhurst opened this issue Sep 17, 2024 · 0 comments · Fixed by #688
Closed

A1-1-2: does not detect compilations that suppress warnings with -w flag #693

MichaelRFairhurst opened this issue Sep 17, 2024 · 0 comments · Fixed by #688
Assignees
Labels
Difficulty-Low A false positive or false negative report which is expected to take <1 day effort to address false positive/false negative An issue related to observed false positives or false negatives. Impact-Medium Standard-AUTOSAR

Comments

@MichaelRFairhurst
Copy link
Contributor

MichaelRFairhurst commented Sep 17, 2024

Affected rules

  • A1-1-2

Description

Currently, A1-1-2 reports compilations that do not specify at least one flag of type -Wfoo. However, clang and gcc both give priority to -w (the flag to suppress errors). Therefore, -w -Wfoo will not show warnings, and should be captured by A1-1-2, but it currently is not.

Note, codeql run test seems to automatically and unconditionally extract with a -w flag. Therefore, it seems that creating a set of compliant/non compliant tests cannot be done with the current test infrastructure.

Example

g++ -w -Wformat test.cpp
clang++ -w -Wformat test.cpp
@MichaelRFairhurst MichaelRFairhurst added Difficulty-Low A false positive or false negative report which is expected to take <1 day effort to address false positive/false negative An issue related to observed false positives or false negatives. Impact-Medium labels Sep 17, 2024
@MichaelRFairhurst MichaelRFairhurst self-assigned this Sep 17, 2024
@MichaelRFairhurst MichaelRFairhurst linked a pull request Sep 17, 2024 that will close this issue
30 tasks
@lcartey lcartey changed the title A1-1-2: does not detect compilations that suppress warnings with -w flag A1-1-2: does not detect compilations that suppress warnings with -w flag Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty-Low A false positive or false negative report which is expected to take <1 day effort to address false positive/false negative An issue related to observed false positives or false negatives. Impact-Medium Standard-AUTOSAR
Projects
Development

Successfully merging a pull request may close this issue.

1 participant