C++ Audits

From RAD Studio
Jump to: navigation, search

Go Up to C++ Audits Configuration dialog box


The following table lists C++ source code audits with short descriptions.

C++ Audits

Audit Description
Core:
AdjustedReturnValue

Function call returns a value different from the expected value.

AttributeNonNull

Check for null pointers passed as arguments to a function whose arguments are marked with the nonnull attribute.

BoolAssignment

Warn about assigning non - {0,1} values to Boolean variables.

CastSize

Check, when casting a malloc'ed symbolic region to type T, whether the size is a multiple of the size of T.

CastToStruct

Check for cast from non-struct pointer to struct pointer.

FixedAddr

Check for assignment of a fixed address to a pointer.

PointerArithm

Check for pointer arithmetic on locations other than array elements.

PointerSub

Check for pointer subtractions on two pointers pointing to different memory chunks.

SizeofPtr

Warn about unintended use of sizeof() on pointer expressions.

NullDereference

Check for dereferences of null pointers.

DivideZero

Check for division by zero.

NoReturnFunctions

Check for functions that do not return to the caller.

UndefReturn

Check for uninitialized values being returned to the caller.

Branch

Check for uninitialized values used as branch conditions.

ArraySubscript

Check for uninitialized values used as array subscripts.

Assign

Check for assigning uninitialized values.

StackAddressEscape

Check that addresses to stack memory do not escape the function.

UndefinedBinaryOperatorResult

Check for undefined results of non-assignment binary operators.

VLASize

Check for declarations of Variable-Length Arrays of undefined or zero size.

Security:
ArrayBound

Warn about buffer overflows (older checker).

ArrayBoundV2

Warn about buffer overflows (newer checker).

ReturnPtrRange

Check for an out-of-bound pointer being returned to callers.

FloatLoopCounter

Warn on using a floating-point value as a loop counter.

Deadcode:
DeadStores

Check for values stored to variables that are never read afterwards.

IdempotentOperations

Warn about idempotent operations.

UnreachableCode

Check unreachable code.

Misc(ellaneous):
CFPV

Comparing floating-point values.

CVFCD

Calling virtual functions from constructors and destructor.

DCPC

Define copy constructor.

IVNU

Iteration variable is not used in loop body.

OPM

Overriding private method.

RINF

Redefining an inherited nonvirtual function.

SFS

Suspicious for statement.

SSSIDC

switch statement should include the default case.

NC

Naming conventions.

OROT

Overwrite related operators together.

PVD

Provide virtual destructor.

UCSC

Use C++ style casts.

PMSNT

Place methods with same name together.

RCD

Restricted class declaration.

ASO

Assignment operator.

CIUCFL

Complex Initialization or Update Clause in for Loop.

CIL

Constructor Initialization List.

See Also