Example 41 Report options file

$ cat my_opts -diag 3348

$ cadvise

report -pdb

test.pdb +opts my_opts

"test.c",

line 1320: remark #3348-D: declaration hides variable "ifd" (declared at line 237)

int

ifd;

/*

input file descriptor */

 

^

 

 

"test.c", line 1321: remark #3348-D: declaration hides variable "method" (declared at line 216) int method; /* compression method */

^

"unlzw.c", line 337:

remark #3348-D: declaration hides variable "i" (declared at line 247)

REG1

int

i;

 

 

^

"unzip.c", line 130: remark #3348-D: declaration hides variable "n" (declared at line 104) register ulg n = LG(inbuf + LOCLEN);

^

6.17 Generate report for migration related warnings

You can generate a report of the migration related issues in the application using the -migrationoption. The report prints only those messages that are related to migration, such as endian and

32-bit to 64-bit migration related diagnostics. You can use the -migrationfilter along with other filtering options such as -severity, -diag, -include, and so on, and only diagnostics that meet all the filtering criteria will be reported.

Example 42 Generating a report using -migration option

$ cadvise report -pdb my.pdb -noheader

=============================== SUMMARY REPORT =================================

Unique warnings: 7

Duplicate warnings: 0

Sev. Count

Diagnostic Message

--------------------------------------------------------------------------------

5

3

warning #2223-D: function %sq declared implicitly

5

1

warning #4291-D: endian porting: the read/write of the buffer may be endian dependent

3

3

remark #4242-D: no prototype or definition in scope for call to %sq

$ cadvise report -pdb my.pdb -migration -severity 5 -noheader

=============================== SUMMARY REPORT =================================

Unique warnings: 1

Duplicate warnings: 0

Sev. Count Diagnostic Message

--------------------------------------------------------------------------------

51 warning #4291-D: endian porting: the read/write of the buffer may be endian dependent

6.18Generating consolidated report from multiple PDBs

You can generate a consolidated cadvise report from multiple PDBs. Multiple PDBs can be passed

to report in one of the following ways:

cadvise report -pdb pdb1:pdb2:...

cadvise report -pdb pdb1,pdb2,...

cadvise report -pdb pdb1 -pdb pdb2 ...

The following example demonstrates the usage of this option:

6.17 Generate report for migration related warnings 39