cppcheck icon indicating copy to clipboard operation
cppcheck copied to clipboard

Fix #10660 FP: overridden member functions of unknown abstract base classes reported as unused

Open chrchr-github opened this issue 1 year ago • 7 comments

chrchr-github avatar Jul 01 '24 21:07 chrchr-github

There are suppressions in .selfcheck_unused_suppressions which need to be removed.

firewave avatar Jul 01 '24 22:07 firewave

Since https://trac.cppcheck.net/ticket/10661 was also fixed quite a while ago that suppression can also be removed.

Let's hope this year we can finally enable unmatchedSuppression in our selfchecks...

firewave avatar Jul 01 '24 22:07 firewave

The remaining "false positive" from that file can probably moved to the source leaving just the intended suppressions.

firewave avatar Jul 01 '24 23:07 firewave

After modifying .selfcheck_unused_suppressions, we get analyzeEnumValue(symboldatabase, settings): 0.001s (avg. 0.0005s - 2 result(s))' on Windows but Tokenizer::createTokens: 0.001111s (avg. 0.001111s - 1 result(s)) elsewhere. Not sure why.

chrchr-github avatar Jul 02 '24 10:07 chrchr-github

After modifying .selfcheck_unused_suppressions, we get analyzeEnumValue(symboldatabase, settings): 0.001s (avg. 0.0005s - 2 result(s))' on Windows but Tokenizer::createTokens: 0.001111s (avg. 0.001111s - 1 result(s)) elsewhere. Not sure why.

That test is known to be flakey and needs to be looked into. I am not sure I have opened a ticket about it yet. Just xfail it without the Strict argument.

firewave avatar Jul 02 '24 10:07 firewave

Maybe the showtime result is just very sensitive on the execution environment/runner?

chrchr-github avatar Jul 02 '24 10:07 chrchr-github

Maybe the showtime result is just very sensitive on the execution environment/runner?

It is checking the number of invocations of timing steps i.e. the ValueFlow execution. That should be deterministic. I will take a look again later.

firewave avatar Jul 02 '24 11:07 firewave

The flakey test is already being tracked in https://trac.cppcheck.net/ticket/12106.

firewave avatar Jul 09 '24 07:07 firewave