HP Code Advisor
</FunctionLevel>
...
<IndirectCallTarget>
...
</IndirectCallTarget>
</Metrics>
Following example shows the command to generate XML report.
Example 6-4 Generating an XML report
$ cadvise report -pdb testpdb +metrics -xml=metricsreport.xml
6.7 Printing Diagnostics with Specific Diagnostic Number(s)
Each distinct type of diagnostic message generated by cadvise has a number associated with it.
The -diag N1,N2,N3,...,Nn option prints only those diagnostics with the specified diagnostic
number(s). This allows you to focus on specific diagnostic messages.
NOTE: You can use the -diag option along with other filtering options, such as -exclude,
-include, and -severity. For more information, see “Report Options Interoperability”
(page 48).
The following example shows the report for a specific diagnostic number.
Example 6-5 Printing report for a specific diagnostic number(s)
$ cadvise report -pdb testpdb -diag 2549
Report generated using "HP Code Advisor C.XX.XX [Release Time]" on <machine> at
<Report Time>
Report command line: " cadvise report -pdb testpdb -diag 2549"
"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;
^
6.8 Generating Reports Based on Severity
The -severity N option is used to emit messages with severity >= N. The valid values for N
are 1 to 9, where 9 indicates the highest severity. If this option is not specified, the default severity
is taken as 5. This option does not affect the output of -summary, which still prints the complete
summary.
NOTE: You can use the -severity option along with other filtering options, such as -exclude,
-diag, and -include. For more information, see “Report Options Interoperability” (page 48).
The following example shows the command to generate report based on severity.
40 Generating Reports