|
|
The lint(CP) program examines source code to identify sections of code that the compiler may flag as incorrect. In many cases, lint identifies as incorrect sections of code that the compiler accepts but that uses poor programming practice that may affect portability and robustness.
To find out how portable and robust our sample program is, run testcase.c through lint with the command:
lint testcase.clint produces the following display:
static unused (61) __cThe warning messages indicate that several functions could have been declared. It also points that variable '__c' has been declared but never used. This is the result of the variable being declared in the system header file ctype.h but never used by testcase.c. We also never use the macro defined in ctype.h in testcase.c, which references that symbol. For more information on using lint, see ``lint analyzer'' and lint(CP).declared global, could be static PrintWords testcase.c(21) GetWords testcase.c(43) Words testcase.c(12) WordCount testcase.c(13)