Example 52 Using +opts <filename> option

$cat warnings_config

#warnings_config

#change warning about use of undefined variable to an error +We2549

#enable warning about redeclaration of variable

+Ww3348

#disable warning: statement is unreachable +W2111

$ cadvise +opts warnings_config +wlint cc -c uninit.c at the command

line generates the following messages:

"uninit.c", line 6: warning #3348-D: declaration hides variable "i" (declared at line 3)

int i;

^

"uninit.c", line 9: error #2549-D: variable "i" is used before its value is set

if (i) j = 3;

^

1 error detected in the compilation of "uninit.c".

44 Miscellaneous driver options

Page 44
Image 44
HP UX Web Development Tools manual Example 52 Using +opts filename option, Line generates the following messages