HP Code Advisor

2 Using Cadvise
This chapter addresses the following topics:
“Getting Started” (page 15)
“Steps in Using Cadvise” (page 15)
“Invoking Cadvise” (page 16)
“Using Cadvise as a Wrapper around Compiler or Linker (page 17)
“Integrating Cadvise with the Makefiles and Build Process” (page 17)
“Enabling Different Categories of Diagnostic Messages” (page 18)
“Generating Code Complexity Metrics” (page 18)
“Detecting Violation of Pre-defined or User-defined Coding Guidelines” (page 22)
2.1 Getting Started
This section addresses the following topics:
“Supported Platforms” (page 15)
“Installing Cadvise” (page 15)
2.1.1 Supported Platforms
You can install and use cadvise on the following platforms:
HP-UX 11i v3 (B.11.31) PA-RISC (HP 9000) and HP Integrity systems
HP-UX 11i v2 (B.11.23) PA-RISC (HP 9000) and HP Integrity systems
HP-UX 11i v1 (B.11.11) PA-RISC (HP 9000) systems
2.1.2 Installing Cadvise
To install cadvise, complete the following steps:
1. Download cadvise for your platform through the website http://www.hp.com/go/cadvise.
2. Install cadvise using the swinstall command. For more information on using the
swinstall command, see Software Distributor Administration Guide.
Cadvise is installed in the /opt/cadvise/bin/cadvise directory by default.
2.2 Steps in Using Cadvise
Cadvise is part of an iterative process of building, analyzing, reporting, and removing the potential
coding errors in an application, as shown in Figure 2-1.
2.1 Getting Started 15