Skip to content
There could be many reasons for this. If you run lint with the option
-voif, you will receive information of every option that lint processes and this may help track down the problem. Incidentally, a neat way of doing this is by setting the
LINT environment variable to
-voif. Since the environment variable is processed first it will display all your options, even those within the batch file that you may be running from. Some of the common mistakes in message suppression are:
- The option is incorrect. For example, you're using
-620, instead of
- Lint options are processed in order. Make sure the names of your modules come after the appropriate error suppression files (.lnt) and options.
- There is an ill-advised turn-off turn-on sequence within the program. Any such sequence should be done with a save-restore. For example, the following sequence is good:
/*lint -save -e620 */
some code that would trigger a 620
/*lint -restore */
Whereas, the following sequence:
same code as before
/*lint +e620 */
is not good because it would interfere with an attempt to turn off message 620 from the command line.
- You turn off a message, but inadvertently turn it back on. Use
-voif and then check your output to see which options are being used.
- You're using lint comments within your source code but they have no effect. Make sure to include the word 'lint' with no space before it.
//lint -e620 - OK
//-e620 - won't work
// lint -e620 - won't work
- You're trying to turn off a message with the wrong option. For example, you use
to turn off message 744 for
switch_one, but message 744 is not parameterized by symbol, so you will need to do either a
-e744 to turn off the message globally, or you can put
//lint !e744 into your source code for one line error suppression of this message. Also don't forget the handy