Skip to content

Partial fix for #11599 false negative: constParameter#4901

Merged
firewave merged 4 commits intocppcheck-opensource:mainfrom
chrchr-github:chr_Fix11599
Mar 19, 2023
Merged

Partial fix for #11599 false negative: constParameter#4901
firewave merged 4 commits intocppcheck-opensource:mainfrom
chrchr-github:chr_Fix11599

Conversation

@chrchr-github
Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread test/testother.cpp Outdated
Comment thread test/testother.cpp
" f(x[0]);\n"
"}");
ASSERT_EQUALS("", errout.str());
ASSERT_EQUALS("[test.cpp:3]: (style) Variable 'x' can be declared as const array\n", errout.str());
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.

Const on local variables should use a different ID.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The ID is constVariable, which seems correct.

@firewave firewave merged commit 19eef2c into cppcheck-opensource:main Mar 19, 2023
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