-nobuild

The cross-file analysis is disabled when you use the -nobuildoption. You can use the

-crossfile=deferoption to enable cross-file analysis. The default is -build. The syntax for determining the invocation of the compile or link command after the cadvise static analysis is as mentioned below:

$ cadvise -nobuild <compilation path> -w <filename>

The following example shows the usage of -[no]buildoption.

Example 49 Using -nobuild option

$ cadvise -nobuild /opt/ansic/bin/cc -w t1.c

This results in the compile command line /opt/ansic/bin/cc -w t1.c not getting executed.

-target[=.extfilename]

This option creates an empty file called filename or <objectfile>.ext in the current directory, which is used as an updated makefile target. When cadvise is called with the -nobuildoption from a makefile, the compiler is not invoked and hence a .o file is not created. When this happens, the makefile target is not updated. In the absence of a target update, a second call to make invokes cadvise for all the targets again, instead of only the ones that have been modified.

NOTE: If filename is not specified, cadvise creates objfile.cadv.

The following example shows the usage of -target[=.extfilename]option. Example 50 Using -target[=.extfilename] option

The following command creates the file foo.cadv:

$ cadvise -nobuild -target cc foo.c -o foo.o

The following command creates the file cadv_dir/foo.cad:

$ cadvise -nobuild -target=cadv_dir/foo.cad cc foo.c

-tee

You also have the choice of looking at the errors and the diagnostic messages immediately with the -teeoption, or generate a report later from the PDB.

The following example shows the usage of -teeoption.

Example 51 Using -tee option

$ cadvise -compiler cc -tee +wall -pdb 1.pdb /opt/ansic/bin/cc -w t1.c

+opts <filename>

This option reduces the clutter at the command line and provides a single place to specify the customizations. Comment lines can also be inserted in the +opts configuration file. You can use this option to read reporting options from the specified filename.

The following example shows the usage of +opts <filename> option.

43