Skip to content

Fix #13648: False positive: Misra C 16.3: warn on default in pragma#7314

Merged
danmar merged 6 commits into
cppcheck-opensource:mainfrom
olabetskyi:fix_13648
Feb 25, 2025
Merged

Fix #13648: False positive: Misra C 16.3: warn on default in pragma#7314
danmar merged 6 commits into
cppcheck-opensource:mainfrom
olabetskyi:fix_13648

Conversation

@olabetskyi
Copy link
Copy Markdown
Collaborator

No description provided.

@olabetskyi olabetskyi changed the title Fix #13648: False positive: Misra C 16.5: warn on default in macro Fix #13648: False positive: Misra C 16.5: warn on default in pragma Feb 21, 2025
Comment thread addons/misra.py Outdated
@olabetskyi olabetskyi changed the title Fix #13648: False positive: Misra C 16.5: warn on default in pragma Fix #13648: False positive: Misra C 16.3: warn on default in pragma Feb 24, 2025
Comment thread addons/misra.py Outdated
if token.linenr != define.linenr:
define = None
if simpleMatch(token, '# define') or simpleMatch(token, '# pragma'):
macro = token
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

the code now says that pragma is a "macro" I feel that is unfortunate. Maybe "directive" would be better.

@danmar danmar merged commit 6e6296d into cppcheck-opensource:main Feb 25, 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