09.06.2013 Views

Intel XENIX 286 Programmers Guide (86) - Tenox.tc

Intel XENIX 286 Programmers Guide (86) - Tenox.tc

Intel XENIX 286 Programmers Guide (86) - Tenox.tc

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.

Programming Commands <strong>XENIX</strong> Programming<br />

lint - Checks C language usage and syntax.<br />

Syntax<br />

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

Description<br />

lint attempts to detect features of the C program file that are likely to be bugs or to be<br />

nonportable or wasteful. It also checks type usage more strictly than the compilers.<br />

Among the items currently detected are unreachable statements, loops not entered at<br />

the top, automatic variables declared and not used, and logical expressions whose value<br />

is constant. Moreover, the usage of functions is checked to find functions that return<br />

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

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

If more than one file is given, it is assumed that all files are to be loaded together; they<br />

are checked for mutual compatibility. If routines from the standard library are called<br />

from file, lint checks the function definitions using the standard lint library llibc.ln. If<br />

lint is invoked with the -p option, it checks function definitions from the portable lint<br />

library llibport.ln.<br />

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

certain kinds of complaints:<br />

-a Suppresses complaints about assignments of long values to variables that are not<br />

long.<br />

-b Suppresses complaints about break statements that cannot be reached.<br />

(Programs produced by lex or yacc will often result in a large number of such<br />

complaints.)<br />

-c Suppresses complaints about casts that have questionable portability.<br />

-h Does not apply heuristic tests that attempt to intuit bugs, improve style, and<br />

reduce waste.<br />

-u Suppresses complaints about functions and external variables that are used and<br />

not defined or that are defined and not used. (This option is suitable for running<br />

lint on a subset of files of a larger program.)<br />

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

-x Does not report variables referred to by external declarations but never used.<br />

B-80

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

Saved successfully!

Ooh no, something went wrong!