Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Checker

Guideline

0014 DCL52-CPP. Never qualify a reference type with const or volatile
1067 DCL60-CPP. Obey the one-definition rule
1509 DCL60-CPP. Obey the one-definition rule
1510 MSC52-CPP. Value-returning functions must return a value from all exit paths
1774 CON50-CPP. Do not destroy a mutex while it is locked
2012 DCL50-CPP. Do not define a C-style variadic function
2110 MEM51-CPP. Properly deallocate dynamically allocated resources
2111 MEM51-CPP. Properly deallocate dynamically allocated resources
2112 MEM51-CPP. Properly deallocate dynamically allocated resources
2113 MEM51-CPP. Properly deallocate dynamically allocated resources
2118 MEM51-CPP. Properly deallocate dynamically allocated resources
2160 DCL54-CPP. Overload allocation and deallocation functions as a pair in the same scope
2502 DCL53-CPP. Do not write syntactically ambiguous declarations
2510 DCL53-CPP. Do not write syntactically ambiguous declarations
2518 DCL59-CPP. Do not define an unnamed namespace in a header file
2625 DCL50-CPP. Do not define a C-style variadic function
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
2810 OOP55-CPP. Do not use pointer-to-member operators to access nonexistent members
2811 OOP55-CPP. Do not use pointer-to-member operators to access nonexistent members
2812 EXP54-CPP. Do not access an object outside of its lifetime
2812 OOP55-CPP. Do not use pointer-to-member operators to access nonexistent members
2813 EXP54-CPP. Do not access an object outside of its lifetime
2813 OOP55-CPP. Do not use pointer-to-member operators to access nonexistent members
2814 EXP54-CPP. Do not access an object outside of its lifetime
2814 OOP55-CPP. Do not use pointer-to-member operators to access nonexistent members
2888 MSC54-CPP. A signal handler must be a plain old function
2891 CTR50-CPP. Guarantee that container indices and iterators are within the valid range 2910 INT50-CPP. Do not cast to an out-of-range enumeration value
2911 INT50-CPP. Do not cast to an out-of-range enumeration value
2912 INT50-CPP. Do not cast to an out-of-range enumeration value
2913 INT50-CPP. Do not cast to an out-of-range enumeration value
2930 EXP54-CPP. Do not access an object outside of its lifetime
2931 EXP54-CPP. Do not access an object outside of its lifetime
2932 EXP54-CPP. Do not access an object outside of its lifetime
2933 EXP54-CPP. Do not access an object outside of its lifetime
2934 EXP54-CPP. Do not access an object outside of its lifetime
2961 EXP53-CPP. Do not read uninitialized memory
2962 EXP53-CPP. Do not read uninitialized memory
2963 EXP53-CPP. Do not read uninitialized memory
2966 EXP53-CPP. Do not read uninitialized memory
2967 EXP53-CPP. Do not read uninitialized memory
2968 EXP53-CPP. Do not read uninitialized memory
2971 EXP53-CPP. Do not read uninitialized memory
2972 EXP53-CPP. Do not read uninitialized memory
2973 EXP53-CPP. Do not read uninitialized memory
2976 EXP53-CPP. Do not read uninitialized memory
2977 EXP53-CPP. Do not read uninitialized memory
2978 EXP53-CPP. Do not read uninitialized memory
3013 INT50-CPP. Do not cast to an out-of-range enumeration value
3033. 3038 EXP56-CPP. Do not call a function with a mismatched language linkage
3051 CTR50-CPP. Guarantee that container indices and iterators are within the valid range
3066 EXP55-CPP. Do not access a cv-qualified object through a cv-unqualified type
3072 OOP51-CPP. Do not slice derived objects
3073 CTR56-CPP. Do not use pointer arithmetic on polymorphic objects 3083 EXP55-CPP. Do not access a cv-qualified object through a cv-unqualified type
3139 CTR50-CPP. Guarantee that container indices and iterators are within the valid range
3140 CTR50-CPP. Guarantee that container indices and iterators are within the valid range
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
3225 CTR58-CPP. Predicate function objects should not be mutable
3225 MEM52-CPP. Detect and handle memory allocation errors
3226 CTR58-CPP. Predicate function objects should not be mutable
3226 MEM52-CPP. Detect and handle memory allocation errors
3227 CTR58-CPP. Predicate function objects should not be mutable
3227 MEM52-CPP. Detect and handle memory allocation errors
3228 EXP50-CPP. Do not depend on the order of evaluation for side effects
3228 CTR58-CPP. Predicate function objects should not be mutable
3228 MEM52-CPP. Detect and handle memory allocation errors
3229 CTR58-CPP. Predicate function objects should not be mutable
3229 MEM52-CPP. Detect and handle memory allocation errors
3230 CTR58-CPP. Predicate function objects should not be mutable
3231 CTR58-CPP. Predicate function objects should not be mutable
3232 CTR58-CPP. Predicate function objects should not be mutable
3233 CTR58-CPP. Predicate function objects should not be mutable
3234 CTR58-CPP. Predicate function objects should not be mutable
3240 EXP52-CPP. Do not rely on side effects in unevaluated operands
3241 EXP52-CPP. Do not rely on side effects in unevaluated operands
3337 MEM51-CPP. Properly deallocate dynamically allocated resources
3339 MEM51-CPP. Properly deallocate dynamically allocated resources
3402 OOP52-CPP. Do not delete a polymorphic object without a virtual destructor
3403 OOP52-CPP. Do not delete a polymorphic object without a virtual destructor
3404 OOP52-CPP. Do not delete a polymorphic object without a virtual destructor
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
3802 CTR53-CPP. Use valid iterator ranges
4003 EXP54-CPP. Do not access an object outside of its lifetime
4026 EXP54-CPP. Do not access an object outside of its lifetime
4030 ERR54-CPP. Catch handlers should order their parameter types from most derived to least derived
4031 ERR61-CPP. Catch exceptions by lvalue reference
4032 DCL58-CPP. Do not modify the standard namespaces
4035 DCL58-CPP. Do not modify the standard namespaces
4035 ERR51-CPP. Handle all exceptions
4035 ERR55-CPP. Honor exception specifications
4036 ERR51-CPP. Handle all exceptions
4036 ERR55-CPP. Honor exception specifications
4037 ERR51-CPP. Handle all exceptions
4053 OOP53-CPP. Write constructor member initializers in the canonical order
4072 OOP54-CPP. Gracefully handle self-copy assignment
4073 OOP54-CPP. Gracefully handle self-copy assignment
4075 ERR56-CPP. Guarantee exception safety
4075 OOP54-CPP. Gracefully handle self-copy assignment
4075 OOP58-CPP. Copy operations must not mutate the source object
4076 ERR56-CPP. Guarantee exception safety
4076 OOP54-CPP. Gracefully handle self-copy assignment 4076 OOP58-CPP. Copy operations must not mutate the source object
4260 OOP50-CPP. Do not invoke virtual functions from constructors or destructors
4261 OOP50-CPP. Do not invoke virtual functions from constructors or destructors
4262 MEM51-CPP. Properly deallocate dynamically allocated resources
4263 MEM51-CPP. Properly deallocate dynamically allocated resources
4264 MEM51-CPP. Properly deallocate dynamically allocated resources
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
4303 MEM50-CPP. Do not access freed memory
4304 MEM50-CPP. Do not access freed memory
4631 DCL58-CPP. Do not modify the standard namespaces
4632 MEM52-CPP. Detect and handle memory allocation errors
4632 ERR55-CPP. Honor exception specifications
4634 ERR58-CPP. Handle all exceptions thrown before main() begins executing
4636 ERR58-CPP. Handle all exceptions thrown before main() begins executing
4637 ERR58-CPP. Handle all exceptions thrown before main() begins executing
4639 ERR54-CPP. Catch handlers should order their parameter types from most derived to least derived
4639 ERR58-CPP. Handle all exceptions thrown before main() begins executing
4671 EXP55-CPP. Do not access a cv-qualified object through a cv-unqualified type
5003 DCL51-CPP. Do not declare or define a reserved identifier
5014 ERR50-CPP. Do not abruptly terminate the program
5015 ERR52-CPP. Do not use setjmp() or longjmp()
5017 OOP57-CPP. Prefer special member functions and overloaded operators to C Standard Library functions
5018 CON51-CPP. Ensure actively held locks are released on exceptional conditions
5019 CON54-CPP. Wrap functions that can spuriously wake up in a loop
5020 CON55-CPP. Preserve thread safety and liveness when using condition variables
Warncall -wc rand 5028 MSC50-CPP. Do not use std::rand() for generating pseudorandom numbers