# This file was generated from template 'codesonar/presets/certcpp.conf.in' # # enables warning classes related to the guidelines in the SEI CERT # C++ Coding Standard # # This part of this file was generated from 'cso_wcmanifest.py' # # At least one of the classes enabled by this preset requires unnormalized C ASTs RETAIN_UNNORMALIZED_C_AST = Yes # CERT-CPP:DCL59-CPP: Do not define an unnamed namespace in a header file WARNING_FILTER += allow class="Anonymous Namespace in Header File" # CERT-CPP:CTR50-CPP: Guarantee that container indices and iterators are within the valid range # CERT-CPP:CTR52-CPP: Guarantee that library functions do not overflow # CERT-CPP:CTR53-CPP: Use valid iterator ranges # CERT-CPP:MEM54-CPP: Provide placement new with properly aligned pointers to sufficient storage capacity # CERT-CPP:STR50-CPP: Guarantee that storage for strings has sufficient space for character data and the null terminator # This check is enabled by default for the language(s) C, C++, x86, x86_64 # It may remain in effect even if the following line is commented out. WARNING_FILTER += allow class="Buffer Overrun" # CERT-CPP:CTR50-CPP: Guarantee that container indices and iterators are within the valid range # This check is enabled by default for the language(s) C, C++, x86, x86_64 # It may remain in effect even if the following line is commented out. WARNING_FILTER += allow class="Buffer Underrun" # CERT-CPP:INT50-CPP: Do not cast to an out-of-range enumeration value # This check is enabled by default for the language(s) C, C++ # It may remain in effect even if the following line is commented out. WARNING_FILTER += allow class="Cast Alters Value" # CERT-CPP:INT50-CPP: Do not cast to an out-of-range enumeration value # This check is enabled by default for the language(s) C, C++ # It may remain in effect even if the following line is commented out. WARNING_FILTER += allow class="Coercion Alters Value" # CERT-CPP:CTR54-CPP: Do not subtract iterators that do not refer to the same container # This check is enabled by default for the language(s) C, C++ # It may remain in effect even if the following line is commented out. WARNING_FILTER += allow class="Comparison of Unrelated Pointers" # CERT-CPP:CON53-CPP: Avoid deadlock by locking in a predefined order WARNING_FILTER += allow class="Conflicting Lock Order" # CERT-CPP:EXP57-CPP: Do not cast or delete pointers to incomplete classes WARNING_FILTER += allow class="Conversion: Pointer to Incomplete" # CERT-CPP:OOP58-CPP: Copy operations must not mutate the source object WARNING_FILTER += allow class="Copy Operation Parameter Is Not const" # CERT-CPP:CON52-CPP: Prevent data races when accessing bit-fields from multiple threads WARNING_FILTER += allow class="Data Race" # CERT-CPP:DCL51-CPP: Do not declare or define a reserved identifier WARNING_FILTER += allow class="Declaration of Reserved Name" # CERT-CPP:MSC51-CPP: Ensure your random number generator is properly seeded WARNING_FILTER += allow class="Default Initialization of Random Number Generator" # CERT-CPP:MSC51-CPP: Ensure your random number generator is properly seeded WARNING_FILTER += allow class="Default Seed in PRNG" # CERT-CPP:OOP54-CPP: Gracefully handle self-copy assignment # This check is enabled by default for the language(s) C, C++, x86, x86_64 # It may remain in effect even if the following line is commented out. WARNING_FILTER += allow class="Double Close" # CERT-CPP:MEM51-CPP: Properly deallocate dynamically allocated resources # CERT-CPP:OOP54-CPP: Gracefully handle self-copy assignment # This check is enabled by default for the language(s) C, C++ # It may remain in effect even if the following line is commented out. WARNING_FILTER += allow class="Double Free" # CERT-CPP:DCL50-CPP: Do not define a C-style variadic function WARNING_FILTER += allow class="Ellipsis" # CERT-CPP:DCL60-CPP: Obey the one-definition rule WARNING_FILTER += allow class="Function Defined in Header File" # CERT-CPP:MSC51-CPP: Ensure your random number generator is properly seeded # This check is enabled by default for the language(s) C, C++ # It may remain in effect even if the following line is commented out. WARNING_FILTER += allow class="Hardcoded Seed in PRNG" # CERT-CPP:CON54-CPP: Wrap functions that can spuriously wake up in a loop # This check is enabled by default for the language(s) C, C++ # It may remain in effect even if the following line is commented out. WARNING_FILTER += allow class="Inappropriate Call Outside Loop" # CERT-CPP:CTR57-CPP: Provide a valid ordering predicate WARNING_FILTER += allow class="Inappropriate Compare Object" # CERT-CPP:MEM55-CPP: Honor replacement dynamic storage management requirements WARNING_FILTER += allow class="Inappropriate throw in noexcept Function" # CERT-CPP:DCL56-CPP: Avoid cycles during initialization of static objects WARNING_FILTER += allow class="Initialization Cycle" # CERT-CPP:FIO50-CPP: Do not alternately input and output from a file stream without an intervening positioning call # This check is enabled by default for the language(s) C, C++, x86, x86_64 # It may remain in effect even if the following line is commented out. WARNING_FILTER += allow class="Input After Output Without Positioning" # CERT-CPP:ERR57-CPP: Do not leak resources when handling exceptions # CERT-CPP:FIO51-CPP: Close files when they are no longer needed # CERT-CPP:MEM51-CPP: Properly deallocate dynamically allocated resources # CERT-CPP:OOP54-CPP: Gracefully handle self-copy assignment # This check is enabled by default for the language(s) C, C++, x86, x86_64 # It may remain in effect even if the following line is commented out. WARNING_FILTER += allow class="Leak" # CERT-CPP:CON50-CPP: Do not destroy a mutex while it is locked # This check is enabled by default for the language(s) C, C++, x86, x86_64 # It may remain in effect even if the following line is commented out. WARNING_FILTER += allow class="Local Variable Passed to Thread" # CERT-CPP:DCL51-CPP: Do not declare or define a reserved identifier WARNING_FILTER += allow class="Macro Name is C Keyword" # CERT-CPP:ERR51-CPP: Handle all exceptions # This check is enabled by default for the language(s) C++ # It may remain in effect even if the following line is commented out. WARNING_FILTER += allow class="Masked by Default Handler" # CERT-CPP:ERR51-CPP: Handle all exceptions # CERT-CPP:ERR54-CPP: Catch handlers should order their parameter types from most derived to least derived # This check is enabled by default for the language(s) C++ # It may remain in effect even if the following line is commented out. WARNING_FILTER += allow class="Masked by Handler" # CERT-CPP:CON51-CPP: Ensure actively held locks are released on exceptional conditions WARNING_FILTER += allow class="Missing Lock Release" # CERT-CPP:MSC52-CPP: Value-returning functions must return a value from all exit paths # This check is enabled by default for the language(s) C, C++ # It may remain in effect even if the following line is commented out. WARNING_FILTER += allow class="Missing Return Statement" # CERT-CPP:MEM55-CPP: Honor replacement dynamic storage management requirements WARNING_FILTER += allow class="Missing throw in operator new" # CERT-CPP:DCL58-CPP: Do not modify the standard namespaces WARNING_FILTER += allow class="Modification of Standard Namespaces" # CERT-CPP:DCL53-CPP: Do not write syntactically ambiguous declarations WARNING_FILTER += allow class="Nested Function Declaration" # CERT-CPP:STR50-CPP: Guarantee that storage for strings has sufficient space for character data and the null terminator # This check is enabled by default for the language(s) C, C++, x86, x86_64 # It may remain in effect even if the following line is commented out. WARNING_FILTER += allow class="No Space For Null Terminator" # CERT-CPP:CTR58-CPP: Predicate function objects should not be mutable WARNING_FILTER += allow class="Non-const Predicate Function Object" # CERT-CPP:OOP54-CPP: Gracefully handle self-copy assignment # CERT-CPP:STR51-CPP: Do not attempt to create a std::string from a null pointer # This check is enabled by default for the language(s) C, C++, x86, x86_64 # It may remain in effect even if the following line is commented out. WARNING_FILTER += allow class="Null Pointer Dereference" # CERT-CPP:DCL60-CPP: Obey the one-definition rule WARNING_FILTER += allow class="Object Defined in Header File" # CERT-CPP:OOP51-CPP: Do not slice derived objects # This check is enabled by default for the language(s) C++ # It may remain in effect even if the following line is commented out. WARNING_FILTER += allow class="Object Slicing" # CERT-CPP:OOP53-CPP: Write constructor member initializers in the canonical order # This check is enabled by default for the language(s) C++ # It may remain in effect even if the following line is commented out. WARNING_FILTER += allow class="Out of Order Member Initializers" # CERT-CPP:FIO50-CPP: Do not alternately input and output from a file stream without an intervening positioning call # This check is enabled by default for the language(s) C, C++, x86, x86_64 # It may remain in effect even if the following line is commented out. WARNING_FILTER += allow class="Output After Input Without Positioning" # CERT-CPP:DCL55-CPP: Avoid information leakage when passing a class object across a trust boundary # This check is enabled by default for the language(s) C, C++ # It may remain in effect even if the following line is commented out. WARNING_FILTER += allow class="Padding Passed Across a Trust Boundary" # CERT-CPP:CTR50-CPP: Guarantee that container indices and iterators are within the valid range # CERT-CPP:CTR56-CPP: Do not use pointer arithmetic on polymorphic objects WARNING_FILTER += allow class="Pointer Arithmetic" # CERT-CPP:CTR50-CPP: Guarantee that container indices and iterators are within the valid range WARNING_FILTER += allow class="Pointer Before Beginning of Object" # CERT-CPP:CTR50-CPP: Guarantee that container indices and iterators are within the valid range WARNING_FILTER += allow class="Pointer Past End of Object" # CERT-CPP:MSC51-CPP: Ensure your random number generator is properly seeded # This check is enabled by default for the language(s) C, C++ # It may remain in effect even if the following line is commented out. WARNING_FILTER += allow class="Predictable Seed in PRNG" # CERT-CPP:OOP54-CPP: Gracefully handle self-copy assignment # This check is enabled by default for the language(s) C, C++ # It may remain in effect even if the following line is commented out. WARNING_FILTER += allow class="Redundant Condition" # CERT-CPP:EXP53-CPP: Do not read uninitialized memory # This check is enabled by default for the language(s) C, C++, x86, x86_64 # It may remain in effect even if the following line is commented out. WARNING_FILTER += allow class="Return Pointer to Local" # CERT-CPP:MSC53-CPP: Do not return from a function declared [[noreturn]] # This check is enabled by default for the language(s) C, C++ # It may remain in effect even if the following line is commented out. WARNING_FILTER += allow class="Return from noreturn" # CERT-CPP:EXP50-CPP: Do not depend on the order of evaluation for side effects WARNING_FILTER += allow class="Side Effects in Expression with Decrement" # CERT-CPP:EXP50-CPP: Do not depend on the order of evaluation for side effects WARNING_FILTER += allow class="Side Effects in Expression with Increment" # CERT-CPP:EXP52-CPP: Do not rely on side effects in unevaluated operands WARNING_FILTER += allow class="Side Effects in sizeof" # CERT-CPP:CTR54-CPP: Do not subtract iterators that do not refer to the same container # This check is enabled by default for the language(s) C, C++ # It may remain in effect even if the following line is commented out. WARNING_FILTER += allow class="Subtraction of Unrelated Pointers" # CERT-CPP:CTR50-CPP: Guarantee that container indices and iterators are within the valid range # CERT-CPP:CTR52-CPP: Guarantee that library functions do not overflow # This check is enabled by default for the language(s) C, C++ # It may remain in effect even if the following line is commented out. WARNING_FILTER += allow class="Tainted Buffer Access" # CERT-CPP:CON56-CPP: Do not speculatively lock a non-recursive mutex that is already owned by the calling thread # This check is enabled by default for the language(s) C, C++, x86, x86_64 # It may remain in effect even if the following line is commented out. WARNING_FILTER += allow class="Try-lock that will never succeed" # CERT-CPP:EXP51-CPP: Do not delete an array through a pointer of the incorrect type # CERT-CPP:MEM51-CPP: Properly deallocate dynamically allocated resources # This check is enabled by default for the language(s) C, C++ # It may remain in effect even if the following line is commented out. WARNING_FILTER += allow class="Type Mismatch" # CERT-CPP:CTR50-CPP: Guarantee that container indices and iterators are within the valid range # CERT-CPP:STR50-CPP: Guarantee that storage for strings has sufficient space for character data and the null terminator # This check is enabled by default for the language(s) C, C++ # It may remain in effect even if the following line is commented out. WARNING_FILTER += allow class="Type Overrun" # CERT-CPP:CTR50-CPP: Guarantee that container indices and iterators are within the valid range # This check is enabled by default for the language(s) C, C++ # It may remain in effect even if the following line is commented out. WARNING_FILTER += allow class="Type Underrun" # CERT-CPP:EXP53-CPP: Do not read uninitialized memory # CERT-CPP:EXP63-CPP: Do not rely on the value of a moved-from object # CERT-CPP:OOP55-CPP: Do not use pointer-to-member operators to access nonexistent members # This check is enabled by default for the language(s) C, C++ # It may remain in effect even if the following line is commented out. WARNING_FILTER += allow class="Uninitialized Variable" # CERT-CPP:DCL56-CPP: Avoid cycles during initialization of static objects WARNING_FILTER += allow class="Unordered Initialization" # CERT-CPP:EXP54-CPP: Do not access an object outside of its lifetime # CERT-CPP:OOP54-CPP: Gracefully handle self-copy assignment # This check is enabled by default for the language(s) C, C++, x86, x86_64 # It may remain in effect even if the following line is commented out. WARNING_FILTER += allow class="Use After Close" # CERT-CPP:CTR51-CPP: Use valid references, pointers, and iterators to reference elements of a container # CERT-CPP:EXP54-CPP: Do not access an object outside of its lifetime # CERT-CPP:MEM50-CPP: Do not access freed memory # CERT-CPP:OOP54-CPP: Gracefully handle self-copy assignment # CERT-CPP:STR52-CPP: Use valid references, pointers, and iterators to reference elements of a basic_string # This check is enabled by default for the language(s) C, C++, x86, x86_64 # It may remain in effect even if the following line is commented out. WARNING_FILTER += allow class="Use After Free" # CERT-CPP:ERR52-CPP: Do not use setjmp() or longjmp() WARNING_FILTER += allow class="Use of " # CERT-CPP:EXP58-CPP: Pass an object of the correct type to va_start WARNING_FILTER += allow class="Use of Feature" # CERT-CPP:CON55-CPP: Preserve thread safety and liveness when using condition variables WARNING_FILTER += allow class="Use of Condition Variable Signal" # CERT-CPP:CON54-CPP: Wrap functions that can spuriously wake up in a loop WARNING_FILTER += allow class="Use of Condition Variable Wait" # CERT-CPP:CTR52-CPP: Guarantee that library functions do not overflow WARNING_FILTER += allow class="Use of OemToAnsi" # CERT-CPP:CTR52-CPP: Guarantee that library functions do not overflow WARNING_FILTER += allow class="Use of OemToChar" # CERT-CPP:CTR52-CPP: Guarantee that library functions do not overflow WARNING_FILTER += allow class="Use of StrCatChainW" # CERT-CPP:ERR50-CPP: Do not abruptly terminate the program WARNING_FILTER += allow class="Use of abort" # CERT-CPP:ERR62-CPP: Detect errors when converting a string to a number WARNING_FILTER += allow class="Use of atof" # CERT-CPP:ERR62-CPP: Detect errors when converting a string to a number WARNING_FILTER += allow class="Use of atoi" # CERT-CPP:ERR62-CPP: Detect errors when converting a string to a number WARNING_FILTER += allow class="Use of atol" # CERT-CPP:ERR62-CPP: Detect errors when converting a string to a number WARNING_FILTER += allow class="Use of atoll" # CERT-CPP:DCL57-CPP: Do not let exceptions escape from destructors or deallocation functions # CERT-CPP:ERR61-CPP: Catch exceptions by lvalue reference WARNING_FILTER += allow class="Use of catch" # CERT-CPP:ERR50-CPP: Do not abruptly terminate the program WARNING_FILTER += allow class="Use of exit" # CERT-CPP:CTR52-CPP: Guarantee that library functions do not overflow WARNING_FILTER += allow class="Use of getopt" # CERT-CPP:CTR52-CPP: Guarantee that library functions do not overflow WARNING_FILTER += allow class="Use of getpass" # CERT-CPP:CTR52-CPP: Guarantee that library functions do not overflow # This check is enabled by default for the language(s) C, C++, x86, x86_64 # It may remain in effect even if the following line is commented out. WARNING_FILTER += allow class="Use of gets" # CERT-CPP:CTR52-CPP: Guarantee that library functions do not overflow WARNING_FILTER += allow class="Use of getwd" # CERT-CPP:ERR52-CPP: Do not use setjmp() or longjmp() WARNING_FILTER += allow class="Use of longjmp" # CERT-CPP:EXP62-CPP: Do not access the bits of an object representation that are not part of the object's value representation # CERT-CPP:OOP57-CPP: Prefer special member functions and overloaded operators to C Standard Library functions WARNING_FILTER += allow class="Use of memcmp" # CERT-CPP:EXP62-CPP: Do not access the bits of an object representation that are not part of the object's value representation # CERT-CPP:OOP57-CPP: Prefer special member functions and overloaded operators to C Standard Library functions WARNING_FILTER += allow class="Use of memset" # CERT-CPP:EXP59-CPP: Use offsetof() on valid types and members WARNING_FILTER += allow class="Use of offsetof" # CERT-CPP:MSC50-CPP: Do not use std::rand() for generating pseudorandom numbers WARNING_FILTER += allow class="Use of rand" # CERT-CPP:CTR52-CPP: Guarantee that library functions do not overflow WARNING_FILTER += allow class="Use of recvmsg" # CERT-CPP:ERR52-CPP: Do not use setjmp() or longjmp() WARNING_FILTER += allow class="Use of setjmp" # CERT-CPP:CTR52-CPP: Guarantee that library functions do not overflow WARNING_FILTER += allow class="Use of strcat" # CERT-CPP:CTR52-CPP: Guarantee that library functions do not overflow WARNING_FILTER += allow class="Use of strchr" # CERT-CPP:CTR52-CPP: Guarantee that library functions do not overflow WARNING_FILTER += allow class="Use of strcmp" # CERT-CPP:CTR52-CPP: Guarantee that library functions do not overflow WARNING_FILTER += allow class="Use of strcoll" # CERT-CPP:CTR52-CPP: Guarantee that library functions do not overflow WARNING_FILTER += allow class="Use of strcpy" # CERT-CPP:CTR52-CPP: Guarantee that library functions do not overflow WARNING_FILTER += allow class="Use of strcspn" # CERT-CPP:CTR52-CPP: Guarantee that library functions do not overflow WARNING_FILTER += allow class="Use of strlen" # CERT-CPP:CTR52-CPP: Guarantee that library functions do not overflow WARNING_FILTER += allow class="Use of strpbrk" # CERT-CPP:CTR52-CPP: Guarantee that library functions do not overflow WARNING_FILTER += allow class="Use of strrchr" # CERT-CPP:CTR52-CPP: Guarantee that library functions do not overflow WARNING_FILTER += allow class="Use of strspn" # CERT-CPP:CTR52-CPP: Guarantee that library functions do not overflow WARNING_FILTER += allow class="Use of strstr" # CERT-CPP:CTR52-CPP: Guarantee that library functions do not overflow WARNING_FILTER += allow class="Use of strtok" # CERT-CPP:CTR52-CPP: Guarantee that library functions do not overflow WARNING_FILTER += allow class="Use of strtrns" # CERT-CPP:CTR52-CPP: Guarantee that library functions do not overflow WARNING_FILTER += allow class="Use of syslog" # CERT-CPP:DCL57-CPP: Do not let exceptions escape from destructors or deallocation functions # CERT-CPP:ERR55-CPP: Honor exception specifications # CERT-CPP:ERR58-CPP: Handle all exceptions thrown before main() begins executing # CERT-CPP:ERR61-CPP: Catch exceptions by lvalue reference WARNING_FILTER += allow class="Use of throw" # CERT-CPP:OOP50-CPP: Do not invoke virtual functions from constructors or destructors # This check is enabled by default for the language(s) C++ # It may remain in effect even if the following line is commented out. WARNING_FILTER += allow class="Virtual Call in Constructor" # CERT-CPP:OOP50-CPP: Do not invoke virtual functions from constructors or destructors # This check is enabled by default for the language(s) C++ # It may remain in effect even if the following line is commented out. WARNING_FILTER += allow class="Virtual Call in Destructor" # CERT-CPP:EXP57-CPP: Do not cast or delete pointers to incomplete classes # This check is enabled by default for the language(s) C++ # It may remain in effect even if the following line is commented out. WARNING_FILTER += allow class="delete of Incomplete Class" # CERT-CPP:OOP52-CPP: Do not delete a polymorphic object without a virtual destructor WARNING_FILTER += allow class="delete with Non-Virtual Destructor" # CERT-CPP:EXP52-CPP: Do not rely on side effects in unevaluated operands WARNING_FILTER += allow class="typeid of Polymorphic Class Type"