Lint Code Inspection Tool
Very Good Lint Example
[root@xe30-1][~/tmp]$ cat lint.c main(void) { int i;
for (i = 0; i < 10l; i++)
{
printf("%d\n",i);
}
}
=================================== (gdb) disassemble Dump of assembler code for function main: 0x08048368
================================= Splint 3.1.1 — 15 Jun 2004
lint.c: (in function main) lint.c:19:14: Operands of < have incompatible types (int, long int): i < 10l To ignore type qualifiers in type comparisons use +ignorequals. lint.c:23:2: Path with no return in function declared to return int There is a path through a function declared to return a value on which there is no return statement. This means the execution may fall through without returning a meaningful result to the caller. (Use -noret to inhibit warning)
Finished checking — 2 code warnings