[2]
CERT-INT02_C (REC) Understand integer conversion rules (CERT_C-INT02)
|
[2]
Implicit conversions from wider to narrower integral type which may result in a loss of information shall not be used (CERT_C-INT02-a-2)
|
[4]
CERT-MEM02_C (REC) Immediately cast the result of a memory allocation function call into a pointer to the allocated type (CERT_C-MEM02)
|
[2]
Assignment operator should have operands of compatible types (CERT_C-MEM02-a-3)
|
[2]
Do not assign function return value to a variable of incompatible type (CERT_C-MEM02-b-3)
|
[3]
CERT-MSC01_C (REC) Strive for logical completeness (CERT_C-MSC01)
|
[3]
All 'if...else-if' constructs shall be terminated with an 'else' clause (CERT_C-MSC01-a-2)
|
[1]
CERT-MSC09_C (REC) Character encoding: Use subset of ASCII for safety (CERT_C-MSC09)
|
[1]
Only use characters defined in ISO C standard (CERT_C-MSC09-a-3)
|
[4]
CERT-FIO41_C (RULE) Do not call getc(), putc(), getwc(), or putwc() with a stream argument that has side effects (CERT_C-FIO41)
|
[4]
A full expression containing an increment (++) or decrement (--) operator should have no other potential side effects (CERT_C-FIO41-e-3)
|
[57]
CERT-MSC41_C (RULE) Never hard code sensitive information (CERT_C-MSC41)
|
[57]
Do not hard code string literals (CERT_C-MSC41-a-1)
|
[41]
CERT-API00_C (REC) Functions should validate their parameters (CERT_C-API00)
|
[41]
The validity of parameters must be checked inside each function (CERT_C-API00-a-3)
|
[3]
CERT-EXP00_C (REC) Use parentheses for precedence of operation (CERT_C-EXP00)
|
[3]
Use parenthesis to clarify expression order if operators with precedence lower than arithmetic are used (CERT_C-EXP00-a-3)
|
[2]
CERT-DCL19_C (REC) Minimize the scope of variables and functions (CERT_C-DCL19)
|
[2]
Declare variables as locally as possible (CERT_C-DCL19-a-3)
|
[1]
CERT-DCL15_C (REC) Declare file-scope objects or functions that do not need external linkage as static (CERT_C-DCL15)
|
[1]
Objects or functions with external linkage shall be declared in a header file (CERT_C-DCL15-a-3)
|
[7]
CERT-EXP12_C (REC) Do not ignore values returned by functions (CERT_C-EXP12)
|
[7]
The value returned by a function having non-void return type shall be used (CERT_C-EXP12-a-3)
|
[3]
CERT-EXP19_C (REC) Use braces for the body of an if, for, or while statement (CERT_C-EXP19)
|
[3]
The statement forming the body of a 'switch', 'while', 'do...while' or 'for' statement shall be a compound statement (CERT_C-EXP19-a-2)
|
[7]
CERT-POS54_C (RULE) Detect and handle POSIX library errors (CERT_C-POS54)
|
[7]
The value returned by a function having non-void return type shall be used (CERT_C-POS54-a-1)
|
[7]
CERT-ERR33_C (RULE) Detect and handle standard library errors (CERT_C-ERR33)
|
[7]
The value returned by a function having non-void return type shall be used (CERT_C-ERR33-a-1)
|
[1]
CERT-DCL01_C (REC) Do not reuse variable names in subscopes (CERT_C-DCL01)
|
[1]
Identifiers declared in an inner local scope should not hide identifiers declared in an outer local scope (CERT_C-DCL01-b-3)
|
[7]
CERT-DCL00_C (REC) Const-qualify immutable objects (CERT_C-DCL00)
|
[7]
Declare parameters or local variable as const whenever possible (CERT_C-DCL00-a-3)
|
[1]
CERT-ERR50_CPP (RULE) Do not abruptly terminate the program (CERT_CPP-ERR50)
|
[1]
Exceptions shall be raised only after start-up and before termination of the program (CERT_CPP-ERR50-f-3)
|
[1]
CERT-ERR59_CPP (RULE) Do not throw an exception across execution boundaries (CERT_CPP-ERR59)
|
[1]
Do not throw an exception across execution boundaries (CERT_CPP-ERR59-a-1)
|
[1]
CERT-ERR58_CPP (RULE) Handle all exceptions thrown before main() begins executing (CERT_CPP-ERR58)
|
[1]
Exceptions shall be raised only after start-up and before termination of the program (CERT_CPP-ERR58-a-2)
|
[1]
CERT-STR53_CPP (RULE) Range check element access (CERT_CPP-STR53)
|
[1]
Guarantee that container indices are within the valid range (CERT_CPP-STR53-a-2)
|
[1]
CERT-EXP60_CPP (RULE) Do not pass a nonstandard-layout type object across execution boundaries (CERT_CPP-EXP60)
|
[1]
Do not pass a nonstandard-layout type object across execution boundaries (CERT_CPP-EXP60-a-1)
|
[1]
CERT-EXP61_CPP (RULE) A lambda object must not outlive any of its reference captured objects (CERT_CPP-EXP61)
|
[1]
Never capture local objects from an outer lambda by reference (CERT_CPP-EXP61-b-2)
|
[1]
CERT-CTR50_CPP (RULE) Guarantee that container indices and iterators are within the valid range (CERT_CPP-CTR50)
|
[1]
Guarantee that container indices are within the valid range (CERT_CPP-CTR50-a-2)
|
[1]
Coding Conventions for C++ (CODSTA-CPP)
|
[1]
Constructors allowing for conversion should be made explicit (CODSTA-CPP-04-1)
|
[15]
Metric (METRIC)
|
[4]
McCabe Cyclomatic Complexity (METRIC.CC-3)
|
[11]
Nested Blocks Depth (METRIC.NBD-3)
|
[14]
Optimization (OPT)
|
[14]
Pass objects by reference instead of by value (OPT-14-3)
|