Make wildcards work in -sem statements
Would allow single -sem statement for group of similarly named methods. Example:
//lint -sem(CTest::Pre*Post, pure)
int PreOnePost() const;
int PreTwoPost() const;
int PreThreePost() const;
Would cover all 3 methods in CTest.
A facility to achieve this effect is provided in the upcoming PC-lint Plus.
We often have an Init function in our classes. So it would be great if
would work for Init menber functions called in Constructor to get rid of
"1566 member ’Symbol’ (Location) might have been initialized by a
separate function but no ’-sem(Name,initializer)’ was seen"
The heartbeat-security-exploit currently making big waves in the press. My first tip:
Probably also the wildcard-suggestion would not detect the bug, but the heartbeat-issue
rises the importancy of this feature: Custom memory its done in critical software; the good advice
form some lint-users comes too often too late.
The suggestion would enable a line like this:
/*lint -function(malloc,*malloc) */
And, additionally to the original suggestion, I 'd suggest this line to be active by default!
Its simply too riksy to do without.
// somewhat "speculative checking"
// to get rid of possible false positive messages:
// bug-hunter-officers task: strengthen the checking:
// lint without/with and examine differences;
// fix bugs/do individual suppressions;
// then remove the global suppressions.
This would enable a "SpecialFunctionsWildcards.lnt":
-function(printf,*printf) // eg debug_printf()
// ... all other function listed in PC-Lint.pdf,
// cap 11.1.1. Special Functions
I've seen often functions like this:
When the "lint-officer" realizes this, its mostly too late
in the devlopment-cycle; development is done with lost warnings;
time has been wasted to fix the bugs the hard way.
I'd wish there would come more "out of the box".
Of cause this is speculative and can lead to false results.
But I'd expect the benefit would exceed the harm.