Checker | Guideline |
---|
-q & Name Check | MSC53-CPP. Do not modify the standard namespaces |
-wc strtok | STR06-CPP. Do not assume that strtok() leaves the parse string unchanged |
0600 | PRE05-CPP. Understand macro replacement when concatenating tokens or performing stringification |
0601 | PRE05-CPP. Understand macro replacement when concatenating tokens or performing stringification |
1000 | PRE06-CPP. Enclose header files in an inclusion guard |
1001 | PRE06-CPP. Enclose header files in an inclusion guard |
1020 | PRE00-CPP. Avoid defining macros |
1021 | PRE00-CPP. Avoid defining macros |
1025 | DCL00-CPP. Const-qualify immutable objects |
1025 | PRE00-CPP. Avoid defining macros |
1026 | DCL00-CPP. Const-qualify immutable objects |
1026 | PRE00-CPP. Avoid defining macros |
1030 | PRE01-CPP. Use parentheses within macros around parameter names |
1031 | PRE02-CPP. Macro replacement lists should be parenthesized |
1038 | MSC14-CPP. Do not introduce unnecessary platform dependencies |
1038 | PRE05-CPP. Understand macro replacement when concatenating tokens or performing stringification |
1039 | MSC14-CPP. Do not introduce unnecessary platform dependencies |
1039 | PRE05-CPP. Understand macro replacement when concatenating tokens or performing stringification |
1067 | MSC52-CPP. Obey the one-definition rule |
1092 | PRE07-CPP. Avoid using repeated question marks |
1095 | MSC09-CPP. Character encoding: Use subset of ASCII for safety |
1100 | MSC14-CPP. Do not introduce unnecessary platform dependencies |
14 | DCL52-CPP. Never qualify a reference type with const or volatile |
150 | STR04-CPP. Use plain char for characters in the basic character set |
1500 | MSC13-CPP. Detect and remove unused values |
1502 | MSC13-CPP. Detect and remove unused values |
1504 | DCL07-CPP. Minimize the scope of variables and methods |
1504 | DCL15-CPP. Declare file-scope objects or functions that do not need external linkage in an unnamed namespace |
1505 | DCL07-CPP. Minimize the scope of variables and methods |
1505 | DCL15-CPP. Declare file-scope objects or functions that do not need external linkage in an unnamed namespace |
1509 | MSC52-CPP. Obey the one-definition rule |
1514 | DCL15-CPP. Declare file-scope objects or functions that do not need external linkage in an unnamed namespace |
1515 | PRE08-CPP. Guarantee that header file names are unique |
1516 | PRE08-CPP. Guarantee that header file names are unique |
1517 | PRE08-CPP. Guarantee that header file names are unique |
1520 | MEM05-CPP. Avoid large stack allocations |
1521 | MEM05-CPP. Avoid large stack allocations |
1530 | MEM08-CPP. Use new and delete rather than raw memory allocation and deallocation |
1531 | DCL07-CPP. Minimize the scope of variables and methods |
1531 | DCL15-CPP. Declare file-scope objects or functions that do not need external linkage in an unnamed namespace |
1532 | DCL15-CPP. Declare file-scope objects or functions that do not need external linkage in an unnamed namespace |
1533 | DCL07-CPP. Minimize the scope of variables and methods |
1533 | DCL15-CPP. Declare file-scope objects or functions that do not need external linkage in an unnamed namespace |
1550 | DCL14-CPP. Avoid assumptions about the initialization order between translation units |
1551 | DCL14-CPP. Avoid assumptions about the initialization order between translation units |
1552 | DCL14-CPP. Avoid assumptions about the initialization order between translation units |
1553 | DCL14-CPP. Avoid assumptions about the initialization order between translation units |
1554 | DCL14-CPP. Avoid assumptions about the initialization order between translation units |
1555 | DCL14-CPP. Avoid assumptions about the initialization order between translation units |
1556 | DCL14-CPP. Avoid assumptions about the initialization order between translation units |
1557 | DCL14-CPP. Avoid assumptions about the initialization order between translation units |
1558 | DCL14-CPP. Avoid assumptions about the initialization order between translation units |
1559 | DCL14-CPP. Avoid assumptions about the initialization order between translation units |
1710 | DCL02-CPP. Use visually distinct identifiers |
1808 | DCL04-CPP. Do not declare more than one variable per declaration |
2001 | MEM13-CPP. Use smart pointers instead of raw pointers for resource management |
2009 | DCL17-CPP. Declare function parameters that are large data structures and are not changed by the function as const references |
2010 | DCL17-CPP. Declare function parameters that are large data structures and are not changed by the function as const references |
2012 | DCL50-CPP. Do not define a C-style variadic function |
2019 | OOP04-CPP. Prefer not to give virtual functions default argument initializers |
2070 | DCL11-CPP. Preserve operator semantics when overloading operators |
2071 | DCL11-CPP. Preserve operator semantics when overloading operators |
2072 | DCL11-CPP. Preserve operator semantics when overloading operators |
2073 | DCL11-CPP. Preserve operator semantics when overloading operators |
2074 | DCL11-CPP. Preserve operator semantics when overloading operators |
2075 | MSC14-CPP. Do not introduce unnecessary platform dependencies |
2076 | MSC14-CPP. Do not introduce unnecessary platform dependencies |
2077 | DCL10-CPP. Do not overload the ampersand, comma, logical AND or logical OR operators |
2078 | DCL10-CPP. Do not overload the ampersand, comma, logical AND or logical OR operators |
2079 | DCL10-CPP. Do not overload the ampersand, comma, logical AND or logical OR operators |
2081 | DCL11-CPP. Preserve operator semantics when overloading operators |
2082 | DCL11-CPP. Preserve operator semantics when overloading operators |
2085 | MSC14-CPP. Do not introduce unnecessary platform dependencies |
2090 | DCL11-CPP. Preserve operator semantics when overloading operators |
2092 | DCL10-CPP. Do not overload the ampersand, comma, logical AND or logical OR operators |
2097 | DCL11-CPP. Preserve operator semantics when overloading operators |
2100 | OOP00-CPP. Declare data members private |
2101 | OOP00-CPP. Declare data members private |
2110 | OOP06-CPP. Create a private copy constructor and assignment operator for non copyable objects |
2112 | OOP06-CPP. Create a private copy constructor and assignment operator for non copyable objects |
2113 | OOP06-CPP. Create a private copy constructor and assignment operator for non copyable objects |
2114 | MSC14-CPP. Do not introduce unnecessary platform dependencies |
2116 | OOP52-CPP. Do not delete a polymorphic object without a virtual destructor |
2120 | OOP03-CPP. Prefer not to overload virtual functions |
2121 | OOP02-CPP. Do not hide inherited non-virtual member functions |
2125 | MSC14-CPP. Do not introduce unnecessary platform dependencies |
2139 | MSC14-CPP. Do not introduce unnecessary platform dependencies |
2159 | OOP07-CPP. Do not inherit from multiple classes that have distinct objects with the same name |
2160 | DCL54-CPP. Overload allocation and deallocation functions as a pair in the same scope |
2161 | DCL54-CPP. Overload allocation and deallocation functions as a pair in the same scope |
2178 | MSC14-CPP. Do not introduce unnecessary platform dependencies |
2180 | OOP09-CPP. Ensure that single-argument constructors are marked "explicit" |
2181 | OOP01-CPP. Be careful with the definition of conversion operators |
2200 | MSC14-CPP. Do not introduce unnecessary platform dependencies |
2201 | MSC14-CPP. Do not introduce unnecessary platform dependencies |
2202 | MSC14-CPP. Do not introduce unnecessary platform dependencies |
2300 | DCL15-CPP. Declare file-scope objects or functions that do not need external linkage in an unnamed namespace |
2304 | INT12-CPP. Do not make assumptions about the type of a plain int bit-field when used in an expression |
2306 | INT12-CPP. Do not make assumptions about the type of a plain int bit-field when used in an expression |
2307 | INT12-CPP. Do not make assumptions about the type of a plain int bit-field when used in an expression |
2308 | INT12-CPP. Do not make assumptions about the type of a plain int bit-field when used in an expression |
2309 | INT12-CPP. Do not make assumptions about the type of a plain int bit-field when used in an expression |
2310 | DCL14-CPP. Avoid assumptions about the initialization order between translation units |
2313 | DCL15-CPP. Declare file-scope objects or functions that do not need external linkage in an unnamed namespace |
2314 | DCL15-CPP. Declare file-scope objects or functions that do not need external linkage in an unnamed namespace |
2410 | CTR00-CPP. Understand when to prefer vectors over arrays |
2411 | CTR00-CPP. Understand when to prefer vectors over arrays |
2413 | MSC14-CPP. Do not introduce unnecessary platform dependencies |
2422 | INT09-CPP. Ensure enumeration constants map to unique values |
2423 | INT09-CPP. Ensure enumeration constants map to unique values |
2426 | DCL05-CPP. Use typedefs to improve code readability |
2427 | PRE03-CPP. Prefer typedefs to defines for encoding types |
2428 | PRE03-CPP. Prefer typedefs to defines for encoding types |
2500 | DCL01-CPP. Do not reuse variable names in subscopes |
2501 | DCL01-CPP. Do not reuse variable names in subscopes |
2502 | DCL01-CPP. Do not reuse variable names in subscopes |
2503 | DCL01-CPP. Do not reuse variable names in subscopes |
2504 | DCL01-CPP. Do not reuse variable names in subscopes |
2505 | DCL01-CPP. Do not reuse variable names in subscopes |
2510 | DCL53-CPP. Do not write syntactically ambiguous declarations |
2624 | OOP04-CPP. Prefer not to give virtual functions default argument initializers |
2625 | DCL50-CPP. Do not define a C-style variadic function |
2640 | MSC14-CPP. Do not introduce unnecessary platform dependencies |
2761 | CTR54-CPP. Do not subtract iterators that do not refer to the same container |
2762 | CTR54-CPP. Do not subtract iterators that do not refer to the same container |
2763 | CTR54-CPP. Do not subtract iterators that do not refer to the same container |
2766 | CTR54-CPP. Do not subtract iterators that do not refer to the same container |
2767 | CTR54-CPP. Do not subtract iterators that do not refer to the same container |
2768 | CTR54-CPP. Do not subtract iterators that do not refer to the same container |
2771 | CTR54-CPP. Do not subtract iterators that do not refer to the same container |
2772 | CTR54-CPP. Do not subtract iterators that do not refer to the same container |
2773 | CTR54-CPP. Do not subtract iterators that do not refer to the same container |
2800 | INT08-CPP. Verify that all integer values are in range |
2801 | INT08-CPP. Verify that all integer values are in range |
2802 | INT08-CPP. Verify that all integer values are in range |
2803 | INT08-CPP. Verify that all integer values are in range |
2840 | EXP03-CPP. Do not assume the size of a class or struct is the sum of the sizes of its members |
2841 | EXP03-CPP. Do not assume the size of a class or struct is the sum of the sizes of its members |
2842 | EXP03-CPP. Do not assume the size of a class or struct is the sum of the sizes of its members |
2843 | EXP03-CPP. Do not assume the size of a class or struct is the sum of the sizes of its members |
2844 | EXP03-CPP. Do not assume the size of a class or struct is the sum of the sizes of its members |
2910 | INT08-CPP. Verify that all integer values are in range |
2911 | INT08-CPP. Verify that all integer values are in range |
2912 | INT08-CPP. Verify that all integer values are in range |
2913 | INT08-CPP. Verify that all integer values are in range |
2940 | INT16-CPP. Do not make assumptions about representation of signed integers |
2941 | INT16-CPP. Do not make assumptions about representation of signed integers |
2942 | INT16-CPP. Do not make assumptions about representation of signed integers |
2943 | INT16-CPP. Do not make assumptions about representation of signed integers |
2945 | INT16-CPP. Do not make assumptions about representation of signed integers |
2946 | INT16-CPP. Do not make assumptions about representation of signed integers |
2947 | INT16-CPP. Do not make assumptions about representation of signed integers |
2948 | INT16-CPP. Do not make assumptions about representation of signed integers |
2980 | MSC13-CPP. Detect and remove unused values |
2981 | MSC13-CPP. Detect and remove unused values |
2982 | MSC13-CPP. Detect and remove unused values |
2983 | MSC13-CPP. Detect and remove unused values |
2984 | MSC13-CPP. Detect and remove unused values |
2985 | MSC13-CPP. Detect and remove unused values |
2986 | MSC13-CPP. Detect and remove unused values |
3000 | INT02-CPP. Understand integer conversion rules |
3001 | INT02-CPP. Understand integer conversion rules |
3001 | STR07-CPP. Don't assume numeric values for expressions with type plain character |
3002 | INT02-CPP. Understand integer conversion rules |
3003 | INT02-CPP. Understand integer conversion rules |
3003 | INT13-CPP. Use bitwise operators only on unsigned operands |
3004 | INT13-CPP. Use bitwise operators only on unsigned operands |
3005 | INT02-CPP. Understand integer conversion rules |
3006 | INT02-CPP. Understand integer conversion rules |
3007 | INT02-CPP. Understand integer conversion rules |
3010 | INT02-CPP. Understand integer conversion rules |
3011 | FLP05-CPP. Convert integers to floating point for floating point operations |
3011 | INT02-CPP. Understand integer conversion rules |
3012 | INT02-CPP. Understand integer conversion rules |
3015 | INT02-CPP. Understand integer conversion rules |
3016 | INT02-CPP. Understand integer conversion rules |
3017 | EXP11-CPP. Do not apply operators expecting one type to data of an incompatible type |
3017 | MSC14-CPP. Do not introduce unnecessary platform dependencies |
3030 | EXP11-CPP. Do not apply operators expecting one type to data of an incompatible type |
3044 | INT11-CPP. Take care when converting from pointer to integer or integer to pointer |
3045 | INT11-CPP. Take care when converting from pointer to integer or integer to pointer |
3058 | MSC02-CPP. Avoid errors of omission |
3063 | STR05-CPP. Use pointers to const when referring to string literals |
3064 | STR05-CPP. Use pointers to const when referring to string literals |
3072 | CTR56-CPP. Do not use pointer arithmetic on polymorphic objects |
3072 | OOP51-CPP. Do not slice derived objects |
3073 | CTR56-CPP. Do not use pointer arithmetic on polymorphic objects |
3073 | OOP51-CPP. Do not slice derived objects |
3076 | EXP13-CPP. Prefer dynamic_cast over static_cast over reinterpret_cast |
3080 | EXP05-CPP. Do not use C-style casts |
3082 | EXP05-CPP. Do not use C-style casts |
3090 | EXP14-CPP. Do not use reinterpret_cast on pointers to class objects with multiple inheritence |
3220 | EXP50-CPP. Do not depend on the order of evaluation for side effects |
3221 | EXP50-CPP. Do not depend on the order of evaluation for side effects |
3222 | EXP50-CPP. Do not depend on the order of evaluation for side effects |
3223 | EXP50-CPP. Do not depend on the order of evaluation for side effects |
3224 | ERR01-CPP. Use ferror() rather than errno to check for FILE stream errors |
3230 | EXP02-CPP. Be aware of the short-circuit behavior of the logical AND and OR operators |
3231 | EXP02-CPP. Be aware of the short-circuit behavior of the logical AND and OR operators |
3242 | MSC03-CPP. Avoid errors of addition |
3243 | MSC03-CPP. Avoid errors of addition |
3244 | MSC03-CPP. Avoid errors of addition |
3244 | MSC12-CPP. Detect and remove code that has no effect |
3245 | MSC03-CPP. Avoid errors of addition |
3245 | MSC12-CPP. Detect and remove code that has no effect |
3247 | MSC14-CPP. Do not introduce unnecessary platform dependencies |
3248 | MSC14-CPP. Do not introduce unnecessary platform dependencies |
3249 | MSC14-CPP. Do not introduce unnecessary platform dependencies |
3250 | MSC14-CPP. Do not introduce unnecessary platform dependencies |
3290 | EXP18-CPP. Prefer the prefix forms of ++ and -- |
3292 | EXP18-CPP. Prefer the prefix forms of ++ and -- |
3301 | OOP05-CPP. Avoid deleting this |
3320 | MSC14-CPP. Do not introduce unnecessary platform dependencies |
3332 | MEM08-CPP. Use new and delete rather than raw memory allocation and deallocation |
3334 | MEM08-CPP. Use new and delete rather than raw memory allocation and deallocation |
3400 | MSC14-CPP. Do not introduce unnecessary platform dependencies |
3401 | MSC14-CPP. Do not introduce unnecessary platform dependencies |
3403 | OOP52-CPP. Do not delete a polymorphic object without a virtual destructor |
3500 | ERR08-CPP. Prefer special-purpose types for exceptions |
3505 | ERR08-CPP. Prefer special-purpose types for exceptions |
3506 | ERR08-CPP. Prefer special-purpose types for exceptions |
3507 | ERR08-CPP. Prefer special-purpose types for exceptions |
3508 | ERR60-CPP. Exception objects must be nothrow copy constructible |
3510 | ERR53-CPP. Do not reference base classes or class data members in a constructor or destructor function-try-block handler |
3700 | EXP00-CPP. Use parentheses for precedence of operation |
3700 | EXP17-CPP. Treat relational and equality operators as if they were nonassociative |
3702 | EXP00-CPP. Use parentheses for precedence of operation |
3703 | EXP00-CPP. Use parentheses for precedence of operation |
3705 | EXP08-CPP. Ensure pointer arithmetic is used correctly |
3706 | EXP08-CPP. Ensure pointer arithmetic is used correctly |
3708 | FLP02-CPP. Avoid using floating point numbers when precise computation is needed |
3709 | EXP17-CPP. Treat relational and equality operators as if they were nonassociative |
3715 | INT07-CPP. Use only explicitly signed or unsigned char type for numeric values |
3716 | INT07-CPP. Use only explicitly signed or unsigned char type for numeric values |
3717 | INT07-CPP. Use only explicitly signed or unsigned char type for numeric values |
3802 | EXP12-CPP. Do not ignore values returned by functions or methods |
3968 | MEM08-CPP. Use new and delete rather than raw memory allocation and deallocation |
4011 | MSC18-CPP. Finish every set of statements associated with a case label with a break statement |
4013 | MSC20-CPP. Do not use a switch statement to transfer control into a complex block |
4014 | MSC20-CPP. Do not use a switch statement to transfer control into a complex block |
4024 | OOP08-CPP. Do not return references to private data |
4028 | OOP08-CPP. Do not return references to private data |
4031 | ERR09-CPP. Throw anonymous temporaries |
4033 | ERR08-CPP. Prefer special-purpose types for exceptions |
4034 | ERR54-CPP. Catch handlers should order their parameter types from most derived to least derived |
4037 | ERR50-CPP. Do not call std::terminate(), std::abort(), or std::_Exit() |
4038 | ERR50-CPP. Do not call std::terminate(), std::abort(), or std::_Exit() |
4040 | ERR54-CPP. Catch handlers should order their parameter types from most derived to least derived |
4053 | OOP53-CPP. Write constructor member initializers in the canonical order |
4056 | OOP53-CPP. Write constructor member initializers in the canonical order |
4058 | OOP53-CPP. Write constructor member initializers in the canonical order |
4060 | MSC03-CPP. Avoid errors of addition |
4070 | MSC01-CPP. Strive for logical completeness |
4071 | EXP19-CPP. Do not perform assignments in conditional expressions |
4071 | MSC02-CPP. Avoid errors of omission |
4072 | OOP54-CPP. Gracefully handle self-assignment |
4073 | OOP54-CPP. Gracefully handle self-assignment |
4075 | ERR56-CPP. Guarantee exception safety |
4075 | OOP54-CPP. Gracefully handle self-assignment |
4076 | ERR56-CPP. Guarantee exception safety |
4076 | OOP54-CPP. Gracefully handle self-assignment |
4090 | DCL03-CPP. Use a static assertion to test the value of a constant expression |
4101 | DCL19-CPP. Initialize automatic local variables on declaration |
4102 | DCL19-CPP. Initialize automatic local variables on declaration |
4107 | DCL04-CPP. Do not declare more than one variable per declaration |
4108 | DCL04-CPP. Do not declare more than one variable per declaration |
4113 | DCL07-CPP. Minimize the scope of variables and methods |
4114 | DCL07-CPP. Minimize the scope of variables and methods |
4206 | DCL19-CPP. Initialize automatic local variables on declaration |
4207 | DCL19-CPP. Initialize automatic local variables on declaration |
4213 | DCL13-CPP. Declare function parameters that are pointers to values not changed by the function as const |
4218 | DCL19-CPP. Initialize automatic local variables on declaration |
4219 | DCL19-CPP. Initialize automatic local variables on declaration |
424 | MEM02-CPP. Immediately cast the result of a memory allocation function call into a pointer to the allocated type |
4260 | OOP50-CPP. Do not invoke virtual functions from constructors or destructors |
4261 | OOP50-CPP. Do not invoke virtual functions from constructors or destructors |
4265 | DCL19-CPP. Initialize automatic local variables on declaration |
4269 | DCL19-CPP. Initialize automatic local variables on declaration |
4270 | DCL19-CPP. Initialize automatic local variables on declaration |
4271 | DCL19-CPP. Initialize automatic local variables on declaration |
4272 | DCL19-CPP. Initialize automatic local variables on declaration |
4273 | OOP50-CPP. Do not invoke virtual functions from constructors or destructors |
4274 | OOP50-CPP. Do not invoke virtual functions from constructors or destructors |
4275 | OOP50-CPP. Do not invoke virtual functions from constructors or destructors |
4276 | OOP50-CPP. Do not invoke virtual functions from constructors or destructors |
4277 | OOP50-CPP. Do not invoke virtual functions from constructors or destructors |
4278 | OOP50-CPP. Do not invoke virtual functions from constructors or destructors |
4279 | OOP50-CPP. Do not invoke virtual functions from constructors or destructors |
4280 | OOP50-CPP. Do not invoke virtual functions from constructors or destructors |
4281 | OOP50-CPP. Do not invoke virtual functions from constructors or destructors |
4282 | OOP50-CPP. Do not invoke virtual functions from constructors or destructors |
4283 | DCL13-CPP. Declare function parameters that are pointers to values not changed by the function as const |
4400 | DCL06-CPP. Use meaningful symbolic constants to represent literal values in program logic |
4400 | EXP07-CPP. Do not diminish the benefits of constants by assuming their values in expressions |
4401 | DCL06-CPP. Use meaningful symbolic constants to represent literal values in program logic |
4401 | EXP07-CPP. Do not diminish the benefits of constants by assuming their values in expressions |
4402 | DCL06-CPP. Use meaningful symbolic constants to represent literal values in program logic |
4403 | DCL06-CPP. Use meaningful symbolic constants to represent literal values in program logic |
4404 | DCL06-CPP. Use meaningful symbolic constants to represent literal values in program logic |
4405 | DCL06-CPP. Use meaningful symbolic constants to represent literal values in program logic |
4405 | EXP07-CPP. Do not diminish the benefits of constants by assuming their values in expressions |
4406 | DCL06-CPP. Use meaningful symbolic constants to represent literal values in program logic |
4408 | DCL06-CPP. Use meaningful symbolic constants to represent literal values in program logic |
4409 | DCL06-CPP. Use meaningful symbolic constants to represent literal values in program logic |
4414 | DCL06-CPP. Use meaningful symbolic constants to represent literal values in program logic |
4415 | DCL06-CPP. Use meaningful symbolic constants to represent literal values in program logic |
4610 | MSC01-CPP. Strive for logical completeness |
4611 | MSC01-CPP. Strive for logical completeness |
4625 | OOP08-CPP. Do not return references to private data |
4626 | OOP08-CPP. Do not return references to private data |
4627 | OOP08-CPP. Do not return references to private data |
4628 | OOP08-CPP. Do not return references to private data |
4636 | ERR50-CPP. Do not call std::terminate(), std::abort(), or std::_Exit() |
4637 | ERR50-CPP. Do not call std::terminate(), std::abort(), or std::_Exit() |
Secondary Analysis | INT06-CPP. Use strtol() or a related function to convert a string token to an integer |
Secondary Analysis | PRE04-CPP. Do not reuse a standard header file name |
Secondary analysis | ERR52-CPP. Do not use setjmp() or longjmp() |
Secondary analysis | DCL09-CPP. Declare functions that return errno with a return type of errno_t |
Warncall -wc rand | MSC50-CPP. Do not use std::rand() for generating pseudorandom numbers |
warncall | PRE09-CPP. Do not replace secure functions with less secure functions |