Technical Briefs
ROHAN help Files
![]()
lint
The lint program checks for parts of a C program that may be incorrect, non-portable, or unnecessary. It can often find problems that the C compiler doesn't catch such as:
- Non-portable usage of code, particularly problems with chars that should be ints
- Unnecessary code, such as unused variables and functions.
- Inconsistent use of function arguments and return values.
- Inconsistent use of types and type casting.
- Use of automatic variables before assignment.
- Inconsistent or incorrect use of library functions.
To use lint, at the ROHAN prompt type:
rohan% lint filename.cWhen lint is called, it checks the file twice. The first time, it lists problems found within each routine. The second time it lists the inconsistencies between the various routines in the program and between those routines and library routines that they call.
![]()