DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Analyzing your code with lint

Options and directives listed

These options suppress specific messages:


-a
Suppress:

-b
For unreachable break and empty statements, suppress:

-h
Suppress:

-m
Suppress:

-u
Suppress:

-v
Suppress:

-x
Suppress:

These options enable specific messages:


-p
Enable:

-Xc
Enable:

Other options:


-c
Create a .ln file consisting of information relevant to lint's second pass for every .c file named on the command line. The second pass is not executed.

-F
When referring to the .c files named on the command line, print their path names as supplied on the command line rather than only their base names.

-Idir
Search the directory dir for included header files.

-k
When used with the directive /* LINTED [msg] */, print info: msg.

-lx
Access the lint library llib-lx.ln.

-Ldir
When used with -l, search for a lint library in the directory dir.

-n
Suppress checks for compatibility with the default lint standard C library.

-ox
Create the file llib-lx.ln, consisting of information relevant to lint's second pass, from the .c files named on the command line. Generally used with -y or /* LINTLIBRARY */ to create lint libraries.

-s
Convert compound messages into simple ones.

-y
Treat every .c file named on the command line as if it began with the directive /* LINTLIBRARY */.

-V
Write the product name and release to standard error.

Directives:


/* ARGSUSEDn */
Suppress:

for every argument but the first n in the function definition it precedes. Default is 0.


/* CONSTCOND */
Suppress:

for the constructs it precedes. Also
/* CONSTANTCONDITION */.


/* EMPTY */
Suppress:

when inserted between the else and semicolon;

when inserted between the controlling expression of the if and semicolon.


/* FALLTHRU */
Suppress:

for the case statement it precedes. Also
/* FALLTHROUGH */.


/* LINTED [msg] */
When -k is not invoked, suppress every warning pertaining to an intrafile problem except:

for the line of code it precedes. msg is ignored.


/* LINTLIBRARY */
When -o is invoked, write to a library .ln file only definitions in the .c file it heads.

/* NOTREACHED */
Suppress:

for the unreached statements it precedes;

for the case it precedes that cannot be reached from the preceding case;

for the closing curly brace it precedes at the end of the function.


/* PRINTFLIKEn */
Treat the nth argument of the function definition it precedes as a [fs]printf format string and issue:

for invalid conversion specifications in that argument, and

for mismatches between the remaining arguments and the conversion specifications. lint issues these warnings by default for errors in calls to [fs]printf functions provided by the standard C library.


/* PROTOLIBn */
When n is 1 and /* LINTLIBRARY */ is used, write to a library .ln file only function prototype declarations in the .c file it heads. Default is 0, canceling the process.

/* SCANFLIKEn */
Same as /* PRINTFLIKEn */ except that the nth argument of the function definition is treated as a [fs]scanf format string. By default, lint issues warnings for errors in calls to [fs]scanf functions provided by the standard C library.

/* VARARGSn */
For the function whose definition it precedes, suppress:

for calls to the function with n or more arguments.


Next topic: lint-specific messages
Previous topic: lint filters

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004