HP Code Advisor
1. See a summary report using cadvise report. This gives an overview of the diagnostic
messages that have been generated for the application.
2. Analyze all high severity ( >= 7) diagnostic messages generated by cadvise. These diagnostic
messages have a very low false positive rate and are likely to point out defects in the
application.
3. Each distinct type of diagnostic message generated by the code advisor has a number
associated with it. From the summary, identify particular diagnostic messages that are of
importance to the application, and then generate a detailed report only for those diagnostic
messages. This allows you to focus on a few selected diagnostic messages.
4. Individual developers can analyze the diagnostic messages generated for a particular portion
of the code by filtering the report for a particular set of files. This can be done using
-file_summary and -file options.
6.18 Report Options Interoperability
Filtering options such as -diag, -exclude, -include, and -severity can be used with one
another to generate a report filtered on the criterion.
NOTE: These filtering options are ignored when used with -all, -summary, and
-file_summary options. However, the -all and -severity options can be used together to
create a detailed report of diagnostics with severity above the specified severity level.
The following examples shows the usage of multiple options simultaneously.
Example 6-20 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:
48 Generating Reports