HP Code Advisor
Following is an example for emitting diagnostics from a specific file.
Example 5-2 Emitting diagnostics from a specific file
$cadvise report -pdb test.pdb –summary -include file1.c
5.4 Suppressing Warnings Selectively
The +Warg1[,arg2,...,argn] option selectively suppresses any specified warning messages.
NOTE: arg1 through argn must be valid warning message numbers.
Following is the syntax for selectively suppressing warnings.
$cadvise +wall -pdb <pdbname> +Warg1[,arg2,...,argn] compile-cmd <filename>
Following is an example for selectively suppressing warnings.
Example 5-3 Suppressing warnings selectively
$cadvise +wall -pdb testpdb +W600 cc -c foo.c
5.5 Enabling Warnings Selectively
The +Wwarg1[,arg2,..,argn] option selectively enables generation of cadvise warning
messages that are not enabled by default.
NOTE: arg1 through argn must be valid warning message numbers.
Following is the syntax for selectively enabling warnings.
$cadvise +wall -pdb <pdbname> +Wwarg1[,arg2,...,argn] compile-cmd <filename>
Following is an example for selectively enabling warnings.
Example 5-4 Enabling warnings selectively
$cadvise +wall -pdb testpdb +Ww600 cc -c foo.c
5.6 Interpreting Selective Warnings as Errors
The +Wearg1[,arg2,..,argn] option selectively interprets specified warning messages as
errors. arg1 through argn must be valid warning message numbers. This option allows you to
enforce a policy to disallow specific warnings by forcing an error at compile time.
+Wearg1[,arg2,..,argn]
Following is the syntax for selectively enabling warnings.
$cadvise +wall -pdb <pdbname> +Wearg1[,arg2,...,argn] compile-cmd <filename>
Following is an example for selectively enabling warnings.
Example 5-5 Interpreting selective warnings as errors
$cadvise +wall -pdb testpdb +We600 cc -c foo.c
5.7 Disabling Warnings in a Macro
The +Wmacro:MACRONAME:d1,d2,d3,..dn option disables specified warnings in a macro.
MACRONAME is the name of the macro and d1, d2, d3, ..., dn are warning numbers.
Specifying -1 suppresses all warnings. This option is not applicable to warning numbers greater
than 20000.
34 Configuring Diagnostic Messages