Perform additional checking as specified by l. The default is -errchk=%none. Specifying -errchk is equivalent to specifying -errchk=%all. l is a comma-separated list of checks that consists of one or more of the following. For example, -errchk=longptr64,structarg.
Table 4–1 The -errchk Flags
Value |
Meaning |
---|---|
%all |
Perform all of -errchk’s checks. |
%none |
Perform none of -errchk’s checks. This is the default. |
[no%]locfmtchk |
Check for printf-like format strings during the first pass of lint. Regardless of whether or not you use -errchk=locfmtchk, lint always checks for printf-like format strings in its second pass. |
[no%]longptr64 |
Check portability to environment for which the size of long integers and pointers is 64 bits and the size of plain integers is 32 bits. Check assignments of pointer expressions and long integer expressions to plain integers, even when explicit cast is used. |
[no%]structarg |
Check structural arguments passed by value and report the cases when formal parameter type is not known. |
[no%]parentheses |
Check the clarity of precedence within your code. Use this option to enhance the maintainability of code. If -errchk=parentheses returns a warning, consider using additional parentheses to clearly signify the precedence of operations within the code. |
[no%]signext |
Check for situations in which the normal ISO C value-preserving rules allow the extension of the sign of a signed-integral value in an expression of unsigned-integral type. This option only produces error messages when you specify -errchk=longptr64 as well. |
[no%]sizematch |
Check for the assignment of a larger integer to a smaller integer and issue a warning. These warnings are also issued for assignment between same size integers that have different signs (unsigned int gets a signed int). |