01.01.2013 Views

AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

LINT ( l ) LINT ( 1 )<br />

NAME<br />

lint - a C program checker<br />

SYNOPSIS<br />

lint [ -abhlnpuvx ] file ...<br />

DESCRIPTION<br />

Lint attempts to detect features of the C program files which are<br />

likely to be bugs, non-portable, or wasteful. It also checks type<br />

usage more strictly than the compilers. Among the things which<br />

are currently detected are unreachable statements, loops not<br />

entered at the top, automatic variables declared and not used, and<br />

logical expressions whose value is constant. Moreover, the usage<br />

of functions is checked to find functions which return values in<br />

some places and not in others, functions called with varying<br />

numbers of arguments, and functions whose values are not used.<br />

It is assumed that all the files are to be loaded together; they are<br />

checked for mutual compatibility. By default, lint uses function<br />

definitions from the standard lint library llib-lc.ln; function<br />

definitions from the portable lint library llib-port.ln are used<br />

when lint is invoked with the -p option.<br />

Any number of lint options may be used, in any order. The following<br />

options are used to suppress certain kinds of complaints:<br />

-a Suppress complaints about assignments of long values to<br />

variables that are not long.<br />

-b Suppress complaints about break statements that cannot<br />

be reached. (Programs produced by lex or yacc will often<br />

result in a large number of such complaints.)<br />

-h Do not apply heuristic tests that attempt to intuit bugs,<br />

improve style, and reduce waste.<br />

-u Suppress complaints about functions and external variables<br />

used and not defined, or defined and not used. (This<br />

option is suitable for running lint on a subset of files of a<br />

larger program.)<br />

-v Suppress complaints about unused arguments in functions.<br />

-x Do not report variables referred to by external declarations<br />

but never used.<br />

The following arguments alter lint 's behavior:<br />

-lx Include additional lint library llib-lx.ln. You can include<br />

a lint version of the math library llib-lm.ln by inserting<br />

-lm on the command line. This argument does not<br />

suppress the default use of llib-lc.ln. This option can be<br />

used to keep local lint libraries and is useful in the<br />

development of multi-file projects.<br />

-n Do not check compatibility against either the standard or<br />

the portable lint library.<br />

-p Attempt to check portability to other dialects (IBM and<br />

GCOS) of C.<br />

- 1 -

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!