home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam    

UNIX in a Nutshell: System V Edition

UNIX in a Nutshell: System V EditionSearch this book
Previous: Reference: line Chapter 2
UNIX Commands
Next: Reference: ln







Detect bugs, portability problems, and other possible errors in the specified C programs. By default, lint uses definitions in the C library llib-lc.ln . If desired, output from .c files can be saved in "object files" having a .ln suffix. A second lint pass can be invoked on .ln files and libraries for further checking. lint also accepts the cc options -D , -I , -U , and -X . See also the Nutshell Handbook, Checking C Programs with lint . Note: This command checks programs written in ANSI C; use /usr/ucb/lint if you want to check programs written in Kernighan and Ritchie's C. Note also that options -a , -b , -h , and -x have exactly the opposite meaning in the versions for BSD and System V.



Ignore long values assigned to variables that aren't long.


Ignore break statements that cannot be reached.


Don't execute the second pass of lint ; save output from first pass in .ln files. (Same as BSD -i option.)

-C name

Create a lint library named llib-l name .ln .


Print files using full pathname, not just the filename.


Don't test for bugs, bad style, or extraneous information.


Re-enable warnings that are normally suppressed by directive /* LINTED [ message ] */ , and print the additional message (if specified).

-L dir

Search for lint libraries in directory dir before searching standard directories.

-l x

Use library llib-l x .ln in addition to llib-lc.ln.


Ignore extern declarations that could be static .


Do not check for compatibility.

-o lib

Create a lint library named llib-l. lib .ln from the output of the first pass of lint .


Check for portability to variants of C.

-R file

Place .ln output (from a .c file) in file , for use by cxref .


Produce short (one-line) diagnostics. Solaris 2.0 only.


Ignore functions or external variables that are undefined or unused.


Ignore unused arguments within functions; same as specifying the directive /* ARGSUSED */ .


Print product name and release on standard error.

-W file

Same as -R , except file is prepared for cflow .


Ignore unused variables referred to by extern declarations.


Same as using the directive /* LINTLIBRARY */ , which is the same as supplying options -v and -x .

Previous: Reference: line UNIX in a Nutshell: System V Edition Next: Reference: ln
Reference: line Book Index Reference: ln

The UNIX CD Bookshelf Navigation The UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System