Options and directives
lint is a static analyzer, which means that it cannot
evaluate the run-time consequences of the dependencies
it detects.
Certain programs may contain hundreds of unreachable break
statements, and lint will give a warning for each of them.
The number of lint messages issued can be distracting.
lint, however,
provides command line options and directives
to help suppress warnings you consider to be spurious.
NOTE:
Directives are special comments embedded in the source text.
For the example we've cited here,
-
you can invoke lint with the -b option
to suppress all complaints about
unreachable break statements;
-
for a finer-grained control, you can precede
any unreachable statement with the comment
/ NOTREACHED / to suppress the diagnostic
for that statement.
The
``Usage''
section details options and directives and introduces
the lint filter technique, which lets you tailor lint's
behavior even more finely to your project's
needs.
It also shows you how to use lint
libraries to check your program for compatibility
with the library functions you have called in it.
Next topic:
lint and the compiler
Previous topic:
Why lint is an important tool
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005