User's Manual
Example 44 Reporting options interoperability
$ cadvise report -pdb test.pdb -diag 2549 -exclude b.c
Report generated using "HP Code Advisor C.XX.XX [Release Time]" on <machine> at <Report Time>
Report command line: " cadvise report -pdb test.pdb -diag 2549 -exclude b.c"
"a.c", line 14: warning #2549-D: variable "struct_obj" is used before its value is set LocalVar = struct_obj.a
;
$ cadvise report -pdb test.pdb -include "a.c:b.c"
Report generated using "HP Code Advisor C.XX.XX [Release Time]" on <machine> at <Report Time>
Report command line: " cadvise report -pdb test.pdb -summary -include a.c:b.c "
"a.c", line 14: warning #2549-D: variable "struct_obj" is used before its value is set
LocalVar = struct_obj.a ;
^
"b.c", line 6: warning #2549-D: variable "b" is used before its value is set
c = b;
^
"b.c", line 7: warning #2549-D: variable "a" is used before its value is set
b = a;
^
In this example if any option, such as -summary, -file_summary, or -all is given in the same
command line, then the -include filtering option is ignored. The following example shows this
behaviour:
Example 45 Ignoring the -include option
$ cadvise report -pdb test.pdb -summary -include "a.c:b.c"
report: warning: Filtering options do not affect -summary and -file_summary
Report generated using "HP Code Advisor C.XX.XX [Release Time]" on <machine> at <Report Time>
Report command line: " cadvise report -pdb test.pdb -summary -include "a.c:b.c"
=============================== SUMMARY REPORT==================================
Unique warnings: 257
Duplicate warnings: 0
Sev. Count Diagnostic Message
--------------------------------------------------------------------------------
5 1 warning #20111-D: (SECURITY) Tainted data may be used in data length computation%s
5 4 warning #20200-D: Potential null pointer dereference %s%s is detected %s
5 10 warning #20118-D: Tainted value may be used in pointer arithmetic expression%s
5 12 warning #20112-D: (SECURITY) Tainted data may be copied to the target buffer%s
5 20 warning #20117-D: (SECURITY) Tainted value may be used in array index expression%s
5 23 warning #20114-D: (SECURITY) Tainted value may be used in loop exit condition computation%s
3 1 remark #2193-D: zero used for undefined preprocessing identifier
3 2 remark #4315-D: %s loop without body, did you insert an extra ';'?
6.21 Report options interoperability 41