C++ Audits
Go Up to C++ Audits Configuration dialog box
The following table lists C++ source code audits with short descriptions.
C++ Audits
| Audit | Description |
|---|---|
| Core: | |
|
Function call returns a value different from the expected value. | |
|
Check for null pointers passed as arguments to a function whose arguments are marked with the nonnull attribute. | |
|
Warn about assigning non - {0,1} values to Boolean variables. | |
|
Check, when casting a malloc'ed symbolic region to type T, whether the size is a multiple of the size of T. | |
|
Check for cast from non-struct pointer to struct pointer. | |
|
Check for assignment of a fixed address to a pointer. | |
|
Check for pointer arithmetic on locations other than array elements. | |
|
Check for pointer subtractions on two pointers pointing to different memory chunks. | |
|
Warn about unintended use of sizeof() on pointer expressions. | |
|
Check for dereferences of null pointers. | |
|
Check for division by zero. | |
|
Check for functions that do not return to the caller. | |
|
Check for uninitialized values being returned to the caller. | |
|
Check for uninitialized values used as branch conditions. | |
|
Check for uninitialized values used as array subscripts. | |
|
Check for assigning uninitialized values. | |
|
Check that addresses to stack memory do not escape the function. | |
|
Check for undefined results of non-assignment binary operators. | |
|
Check for declarations of Variable-Length Arrays of undefined or zero size. | |
| Security: | |
|
Warn about buffer overflows (older checker). | |
|
Warn about buffer overflows (newer checker). | |
|
Check for an out-of-bound pointer being returned to callers. | |
|
Warn on using a floating-point value as a loop counter. | |
| Deadcode: | |
|
Check for values stored to variables that are never read afterwards. | |
|
Warn about idempotent operations. | |
|
Check unreachable code. | |
| Misc(ellaneous): | |
|
Comparing floating-point values. | |
|
Calling virtual functions from constructors and destructor. | |
|
Define copy constructor. | |
|
Iteration variable is not used in loop body. | |
|
Overriding private method. | |
|
Redefining an inherited nonvirtual function. | |
|
Suspicious for statement. | |
|
switch statement should include the default case. | |
|
Naming conventions. | |
|
Overwrite related operators together. | |
|
Provide virtual destructor. | |
|
Use C++ style casts. | |
|
Place methods with same name together. | |
|
Restricted class declaration. | |
|
Assignment operator. | |
|
Complex Initialization or Update Clause in for Loop. | |
|
Constructor Initialization List. |