Skip to content

Fix #13153 FN: constStatement (Local Lambda Expression)#7170

Merged
orbitcowboy merged 2 commits intocppcheck-opensource:mainfrom
chrchr-github:chr_13176
Jan 3, 2025
Merged

Fix #13153 FN: constStatement (Local Lambda Expression)#7170
orbitcowboy merged 2 commits intocppcheck-opensource:mainfrom
chrchr-github:chr_13176

Conversation

@chrchr-github
Copy link
Copy Markdown
Collaborator

No description provided.

@orbitcowboy orbitcowboy merged commit 445bc7a into cppcheck-opensource:main Jan 3, 2025
@chrchr-github chrchr-github deleted the chr_13176 branch January 3, 2025 11:57
@danmar
Copy link
Copy Markdown
Collaborator

danmar commented Jan 5, 2025

@chrchr-github I think there is some more low hanging fruit for this checker. Here is code from the Misra C example suite:

void R_2_2(uint16_t v)
{
   v >> 3;
}

A constStatement warning would be nice, wouldn't it? :-)

@chrchr-github
Copy link
Copy Markdown
Collaborator Author

Here's what I get:

test.cpp:3:7: warning: inconclusive: Found suspicious operator '>>', result is not used. [constStatement]
    v >> 3;
      ^

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