Skip to content

Conversation

@chrchr-github
Copy link
Collaborator

No description provided.

" return s;\n"
"}\n", dinit(CheckOptions, $.inconclusive = true));
ASSERT_EQUALS("", errout_str());
TODO_ASSERT_EQUALS("",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We already warn without the negation: if (r) ..., so I'm not sure if this should even be a TODO.
In the original ticket, g() was a library function, so maybe we could extend the configuration options there.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you file a ticket about this with the todoassert keyword? Otherwise these things tend to rot.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Turned into an ASSERT. I think we intend to warn if there are unknown functions that just might modify their arguments (hence inconclusive). As said above, #9827 is probably a library issue.

@firewave
Copy link
Collaborator

Those are some nice true positives.

@sonarqubecloud
Copy link

@chrchr-github
Copy link
Collaborator Author

This seems to fix multiple tickets, see https://trac.cppcheck.net/search?q=d30f42e0da85ef23cd5efb46225a8be29b90b5f8

@chrchr-github chrchr-github marked this pull request as ready for review January 30, 2026 20:01
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