cpc-lint

How can I use PC-Lint Plus's -esym with multiple message numbers?


I want to suppress warnings arising from including code with unused functions (I cannot change this code but need to use parts of it). I know that I could do this with several -esym statements each but I have a number of these to suppress and I think it will be clearer if they can be written as a single statement each. Is there a way to do this?

The PC-Lint Plus manual contains the following prototype for the -esym option:

-esym(# [# ...], Symbol [,Symbol ...]) inhibits the message #s parameterized by Symbol

This looks to me like the correct format would be:

-esym(765 759 714, ModuleName_*)

However, after adding this to my .lnt file I get the following error when linting:

LintFile.lnt(156): Error 72: Bad option '-esym(765 759 714, ModuleName_*)'

Putting commas between the message numbers (which doesn't seem to be what the manual specifies) does not result in an Error 72 but also does not suppress the messages. My PC-Lint version is:

PC-lint for C/C++ (NT) Vers. 9.00L, Copyright Gimpel Software 1985-2014


Solution

  • First of all, please note that PC-Lint Version 9.00L is not a PC-Lint Plus version but the last version of the "classic" PC-Lint (predecessor of PC-Lint Plus). Therefore you should refer to the corresponding manual.

    In the "old" manual the option -esym() is documented as follows:

    -esym( #, Symbol [, Symbol] ... ) inhibits [...] error message # for the indicated symbols.

    Looks like the option unfortunately accepts only a single error code to be inhibited for a list of symbols.