HP Code Advisor
Example 6-1 Generating summary reports
$cadvise report -summary -pdb testpdb -noheader
=============================== SUMMARY REPORT =================================
Unique warnings: 2
Duplicate warnings: 0
Sev. Count Diagnostic Message
--------------------------------------------------------------------------------
5 1 warning #4228-D: 64 bit migration: conversion from %t1 to a more strictly aligned type %t2 may cause
misaligned access
5 1 warning #4230-D: 64 bit migration: conversion from %t1 to %t2 may cause target of pointers to have
a different size
NOTE: When the -all option is used along with -summary option, cadvise report first prints
the summary followed by the -all output.
6.3 Generating File Summary Report
The -file_summary option prints the summary information for each source file. All the
diagnostic messages generated for a file are considered and the count for each file is reported.
The following example shows the summary for a source file. The following example shows the
summary information for a source file.
Example 6-2 Generating file summary report
$cadvise report -file_summary -pdb testpdb
----------------------------------------------------------------------
Count Duplicate Filename
-----------------------------------------------------------------------
2 0 example.C
-----------------------------------------------------------------------
6.4 Generating Detailed Report
The -all option prints all messages in the log-file that are above the specified severity level,
sorted by severity. If no severity level is specified then all messages with severity >= 5 are printed.
The following example shows the usage of -all report:
Example 6-3 Generating detailed report
$ cadvise report -pdb testpdb -all
============================== SEVERITY LEVEL 8 ===============================
"example.C", line 13: warning #2549-D: variable "i" is used before its value is set
i++;
^
6.5 Generating HTML Report
The -html[=<dir>] option generates report in HTML format from specified PDB. This option
can be used in the following ways:
• To only view the HTML reports in the web browser, run the following command:
$ cadvise report -pdb mypdb -html
The HTML report will be displayed on the browser. The browser is invoked as specified in
the BROWSER environment variable. If this environment variable is not specified, it uses the
38 Generating Reports