User's Manual
6.15.1 Generating summary diff report
Using the PDB comparison option along with the -summary option displays the difference between
the summary reports of 2 PDBs. The following example shows the usage of -basepdb
<basepdbname> summary difference report:
Example 33 Generating summary diff report without the header
$ cadvise report -pdb test.pdb -basepdb test0.pdb -summary -noheader
Sev. OldCount Count Diagnostic Message
---------------------------------------------------------------------------------
6 1 0 warning #20048-D:%s "%s" has incompatible type with previous declaration at line %s in
file "%s"
5 1 1 warning #20111-D: (SECURITY) Tainted data may be used in data length computation%s
5 4 4 warning #20200-D: Potential null pointer dereference %s%s is detected %s
5 12 12 warning #20112-D: (SECURITY) Tainted data may be copied to the target buffer%s
5 12 12 warning #20118-D: Tainted value may be used in pointer arithmetic expression%s
5 30 30 warning #20117-D: (SECURITY) Tainted value may be used in array index expression%s
5 45 45 warning #20114-D: (SECURITY) Tainted value may be used in loop exit condition computation%s
3 1 1 remark #2193-D: zero used for undefined preprocessing identifier
3 2 2 remark #4315-D: %s loop without body, did you insert an extra ';'?
...
6.15.2 Generating detailed diff report
Using the PDB comparison option along with the -all option displays the detailed difference
between the reports of 2 PDBs. The first part of the report shows the header on top and then shows
the difference in warning summary. The second part of the report displays all regressions and
improvements in detail. The following example shows the usage of -basepdb <basepdbname>
detailed diff report with the -all option:
Example 34 Generating detailed diff report with the header
$ cadvise report -pdb tmp.pdb -basepdb tmp1.pdb -all
Report generated using "HP Code Advisor C.XX.XX [Release Date]" on <Machine Name> at <Time>
Report command line: "Report Command Line"
New Pdb: tmp.pdb
Base Pdb: tmp1.pdb
Regressions: 2 =>2549(2)
Improvements: 1 =>20200(1)
=======================[ REGRESSIONS ]===========================
"/home/solankib/TESTING/b.c", line 6: warning #2549-D: variable "a" is used before its value is set
c = a;
^
"/home/solankib/TESTING/b.c", line 9: warning #2549-D: variable "b" is used before its value is set
a = b;
^
=======================[ IMPROVEMENTS ]===========================
"/home/solankib/TESTING/a1.c", line 11, procedure main: warning #20200-D: Potential null pointer dereference
You also have the flexibility of using the filtering options with this feature. If you use any filtering
option in the command line, then the first step report is filtered and then the diff report is generated
as shown in the following examples.
The following example shows the usage of -basepdb <basepdbname> detailed diff report with
the -diag option:
6.15 Generating PDB comparison report 35