Broad Mapping: Power of Ten

This table contains broad mappings between Power of Ten rule numbers and CodeSonar warning classes.

The close mapping from Power of Ten rule numbers to CodeSonar warning classes is shown in "Power of Ten" Checks.

A CSV version of this table is provided in POW10-mapping-broad.csv

POW10 C/C++ Warning Classes
POW10:1 Restrict to simple control flow constructs.
closely mapped
POW10:2 Give all loops a fixed upper-bound.
closely mapped
POW10:3 Do not use dynamic memory allocation after initialization.
closely mapped
POW10:4 Limit functions to no more than 60 lines of text.
closely mapped
POW10:5 Use minimally two assertions per function on average.
closely mapped
POW10:6 Declare data objects at the smallest possible level of scope.
closely mapped
POW10:7 Check the return value of non-void functions, and check the validity of function parameters.
closely mapped
POW10:8 Limit the use of the preprocessor to file inclusion and simple macros.
closely mapped
also related
POW10:9 Limit the use of pointers. Use no more than two levels of dereferencing per expression.
closely mapped
POW10:10 Compile with all warnings enabled, and use one or more source code analyzers.
closely mapped