Skip to content

Fix 206: false positive: misra-c2012-2.5#7081

Merged
danmar merged 1 commit into
cppcheck-opensource:mainfrom
swasti16:swasti/206_2.5
Jan 1, 2025
Merged

Fix 206: false positive: misra-c2012-2.5#7081
danmar merged 1 commit into
cppcheck-opensource:mainfrom
swasti16:swasti/206_2.5

Conversation

@swasti16
Copy link
Copy Markdown
Contributor

@swasti16 swasti16 commented Dec 8, 2024

No description provided.

Comment thread addons/misra.py Outdated
@swasti16 swasti16 force-pushed the swasti/206_2.5 branch 2 times, most recently from 3a0ab8c to 2e319e3 Compare December 8, 2024 11:37
Copy link
Copy Markdown
Collaborator

@danmar danmar left a comment

Choose a reason for hiding this comment

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

As far as I see no macros are added to the used_macros isn't that a mistake..

This is a CTU check. The spec defines that it's a "System" check. So it should not be added to the misra-test.c.

Define a macro in misra-ctu-test.h
Undefine the macro in misra-ctu-1-test.c
Do not use the macro in misra-ctu-2-test.c

Then ensure that no warning is written because the macro is not used in misra-ctu-2-test.c

@swasti16 swasti16 force-pushed the swasti/206_2.5 branch 2 times, most recently from a2edfd0 to d4e1dd4 Compare December 8, 2024 15:36
Comment thread addons/misra.py Outdated
@swasti16 swasti16 force-pushed the swasti/206_2.5 branch 2 times, most recently from 8bfb350 to cefbc39 Compare December 10, 2024 11:42
Comment thread addons/misra.py
Comment thread addons/cppcheckdata.py Outdated
Comment thread addons/misra.py Outdated
Comment thread addons/misra.py
@danmar danmar merged commit d7c8ad3 into cppcheck-opensource:main Jan 1, 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.

2 participants