No. of Macros Used: 3

No. of Locals: 3

No. of Statics: 0

No. of Ifs: 0

No. of Returns: 1

No. of Loops: 1 Loop Nesting Levels: 3

No. of Indirect Calls: 0

No. of Direct Calls: 1 Functions called: print_output() Cyclomatic Complexity: 4

Cyclomatic complexity without switches: 4

Cyclomatic complexity without eh: 4

Cyclomatic complexity without switches and eh: 4

No. of Thread Local Variables: 0

No. of Mutexes: 0

No. of Lock Calls: 0

No. of Unlock Calls: 0

End Function: matrix_multiply

==================================================================

End program complexity data for /tmp/example.c

==================================================================

NOTE: The +metrics option can be used with the cadvise reporting option for reporting program complexity metrics from the PDB.

2.8 Detecting violation of pre-defined or user-defined coding guidelines

The coding guidelines checker diagnoses violations to the coding guidelines and emits appropriate diagnostic messages.

Syntax:

+wcodeguide[=<rules-library>]

Where:

rules-librarydenotes the library that defines the coding guideline rules.

You can modify the default set of rules or write your own set of rules to enforce coding guidelines. Cadvise has the appropriate API header files and a set of sample files along with the corresponding makefile to rebuild the rules library.

Table 2 lists the source structure provided for (re)building the rules library.

2.8 Detecting violation of pre-defined or user-defined coding guidelines

17