Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can this cppcheck inline suppression be added #326

Open
killerbot242 opened this issue Nov 25, 2023 · 1 comment
Open

can this cppcheck inline suppression be added #326

killerbot242 opened this issue Nov 25, 2023 · 1 comment

Comments

@killerbot242
Copy link

in the method trace_exception a (re) throw correctly occurs. Cppcheck tries to find 'empty' throws in a non-rethrown scenario and warns about them (aka this equals to std::terminate).
It gives a false positive on the line in 'trace_exception'.

The solution is very trivial:

change the line into:
throw; // cppcheck-suppress rethrowNoCurrentException

@rollbear
Copy link
Owner

Is there any other way of suppressing this than to clutter the sources?

I feel very uneasy about this kind of "fix", because there are many static checkers, and they all have their false positives and their ways of suppressing them, and I fear where this may lead.

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

No branches or pull requests

2 participants