C and C++ Binaries


C and C++ Warning Classes

This page lists the built-in C and C++ warning classes for CodeSonar.

For an alphabetical index of C and C++ warning classes, see the Warning Class Index.

See also Java Warning Classes, C# Warning Classes.



Introduction

This page lists all C and C++ warning classes shipped with CodeSonar. The classes are shown in two tables: those that are enabled by default, and those that are disabled by default.

Enabled By Default

CodeSonar will perform checks for warnings in these classes by default. If there are classes on this list for which you do not wish to see warnings, use WARNING_FILTER discard rules to instruct CodeSonar accordingly.

Class Name MnemonicAvailability
C C++
Arctangent Domain Error MATH.DOMAIN.ATAN YES YES
Argument Too High MATH.DOMAIN.TOOHIGH YES YES
Argument Too Low MATH.DOMAIN.TOOLOW YES YES
Blocking in Critical Section CONCURRENCY.STARVE.BLOCKING YES YES
Buffer Overrun LANG.MEM.BO YES YES
Buffer Underrun LANG.MEM.BU YES YES
Cast Alters Value LANG.CAST.VALUE YES YES
Coercion Alters Value LANG.CAST.COERCE YES YES
Command Injection IO.INJ.COMMAND YES YES
Comparison of Unrelated Pointers LANG.STRUCT.CUP YES YES
Copy-Paste Error MISC.CPE YES YES
Dangerous Function Cast LANG.CAST.FN YES YES
Deadlock CONCURRENCY.DEADLOCK YES YES
Division By Zero LANG.ARITH.DIVZERO YES YES
Double Close IO.DC YES YES
Double Free ALLOC.DF YES YES
Double Initialization ALLOC.DI YES YES
Double Lock CONCURRENCY.DL YES YES
Double Unlock CONCURRENCY.DU YES YES
Empty Branch Statement LANG.STRUCT.EBS YES YES
Empty for Statement LANG.STRUCT.EBS YES YES
Empty if Statement LANG.STRUCT.EBS YES YES
Empty switch Statement LANG.STRUCT.EBS YES YES
Empty while Statement LANG.STRUCT.EBS YES YES
Encryption without Padding MISC.CRYPTO.NOPAD YES YES
File Open for Both Read and Write IO.BRAW YES YES
File System Race Condition IO.RACE YES YES
Float Division By Zero LANG.ARITH.FDIVZERO YES YES
Floating Point Domain Error MATH.DOMAIN YES YES
Floating Point Range Error MATH.RANGE YES YES
Format String MISC.FMT YES YES
Format String Injection IO.INJ.FMT YES YES
Format String Type Error MISC.FMTTYPE YES YES
Free Null Pointer ALLOC.FNP YES YES
Function Call Has No Effect MISC.NOEFFECT YES YES
Gamma on Zero MATH.RANGE.GAMMA YES YES
GlobalHandle on GMEM_FIXED Memory ALLOC.TM YES YES
GlobalLock on GMEM_FIXED Memory ALLOC.TM YES YES
GlobalUnlock on GMEM_FIXED Memory ALLOC.TM YES YES
Hardcoded Authentication HARDCODED.AUTH YES YES
Hardcoded Crypto Key HARDCODED.KEY YES YES
Hardcoded Crypto Salt HARDCODED.SALT YES YES
Hardcoded Seed in PRNG HARDCODED.SEED YES YES
Ignored Return Value LANG.FUNCS.IRV YES YES
Inappropriate C Atomic Initialization CONCURRENCY.C_ATOMIC.INIT YES YES
Inappropriate Call Outside Loop LANG.STRUCT.ICOL YES YES
Input After Output Without Positioning IO.IOWOP YES YES
Integer Overflow of Allocation Size ALLOC.SIZE.IOFLOW YES YES
LDAP Injection IO.INJ.LDAP YES YES
Leak ALLOC.LEAK YES YES
Library Injection IO.INJ.LIB YES YES
Local Variable Passed to Thread CONCURRENCY.LOCALARG YES YES
LocalHandle on LMEM_FIXED Memory ALLOC.TM YES YES
LocalLock on LMEM_FIXED Memory ALLOC.TM YES YES
LocalUnlock on LMEM_FIXED Memory ALLOC.TM YES YES
Logarithm on Negative Value MATH.DOMAIN.LOG YES YES
Logarithm on Zero MATH.RANGE.LOG YES YES
MAX_PATH Exceeded MISC.PATHLENGTH YES YES
Misaligned Object ALLOC.MO YES YES
Missing Return Statement LANG.STRUCT.MRS YES YES
Missing Return Value LANG.FUNCS.MRV YES YES
Negative Character Value MISC.NEGCHAR YES YES
Negative Shift Amount LANG.ARITH.NEGSHIFT YES YES
Negative file descriptor IO.NEGFD YES YES
No Space For Null Terminator MISC.MEM.NTERM YES YES
Null Pointer Dereference LANG.MEM.NPD YES YES
Null Security Descriptor MISC.NULLDACL YES YES
Null Test After Dereference LANG.STRUCT.NTAD YES YES
Object Slicing LANG.CAST.OBJSLICE no YES
Output After Input Without Positioning IO.OIWOP YES YES
Overlapping Memory Regions MISC.MEM.OR YES YES
Padding Passed Across a Trust Boundary MISC.PADDING.POTB YES YES
Plaintext Storage of Password MISC.PWD.PLAIN YES YES
Plaintext Transmission of Password MISC.PWD.PLAINTRAN YES YES
Pool Mismatch ALLOC.TM YES YES
Predictable Seed in PRNG MISC.CRYPTO.TIMESEED YES YES
Raises FE_INVALID MATH.DOMAIN.FE_INVALID YES YES
Read Past Null Terminator MISC.MEM.RPNT YES YES
Redundant Condition LANG.STRUCT.RC YES YES
Return Pointer to Freed ALLOC.RPF YES YES
Return Pointer to Local LANG.STRUCT.RPL YES YES
Return from noreturn LANG.STRUCT.RFNR YES YES
SQL Injection IO.INJ.SQL YES YES
Shift Amount Exceeds Bit Width LANG.ARITH.BIGSHIFT YES YES
Subtraction of Unrelated Pointers LANG.STRUCT.SUP YES YES
Tainted Buffer Access LANG.MEM.TBA YES YES
Tainted Environment Variable IO.TAINT.ENV YES YES
Thread is not Joinable CONCURRENCY.TNJ YES YES
Try-lock that will never succeed CONCURRENCY.TL YES YES
Type Mismatch ALLOC.TM YES YES
Type Overrun LANG.MEM.TO YES YES
Type Qualifier on Function Type LANG.TYPE.TQFT YES YES
Type Underrun LANG.MEM.TU YES YES
Undefined Power of Zero MATH.DOMAIN.POW YES YES
Uninitialized Variable LANG.MEM.UVAR YES YES
Unreachable Call LANG.STRUCT.UC YES YES
Unreachable Computation LANG.STRUCT.UC YES YES
Unreachable Conditional LANG.STRUCT.UC YES YES
Unreachable Data Flow LANG.STRUCT.UC YES YES
Unreasonable Size Argument MISC.MEM.SIZE.BAD YES YES
Unterminated C String MISC.MEM.NTERM.CSTRING YES YES
Unused Value LANG.STRUCT.UUVAL YES YES
Use After Close IO.UAC YES YES
Use After Free ALLOC.UAF YES YES
Use of GetTempFileName BADFUNC.TEMP.GETTEMPFILENAME YES YES
Use of SO_REUSEADDR IO.SOCK.REUSE YES YES
Use of Weak Cryptographic Algorithm BADMACRO.WEAK_CRYPTO YES YES
Use of crypt BADFUNC.CRYPT YES YES
Use of drem BADFUNC.FLOAT.DREM YES YES
Use of gamma BADFUNC.FLOAT.GAMMA YES YES
Use of gets BADFUNC.BO.GETS YES YES
Use of mktemp BADFUNC.TEMP.MKTEMP YES YES
Use of tmpfile BADFUNC.TEMP.TMPFILE YES YES
Use of tmpnam BADFUNC.TEMP.TMPNAM YES YES
Useless Assignment LANG.STRUCT.UA YES YES
Varargs Function Cast LANG.CAST.VARARG YES YES
Virtual Call in Constructor LANG.STRUCT.VCALL_IN_CTOR no YES
Virtual Call in Destructor LANG.STRUCT.VCALL_IN_DTOR no YES
cosh on High Number MATH.RANGE.COSH.TOOHIGH YES YES
cosh on Low Number MATH.RANGE.COSH.TOOLOW YES YES
sqrt on Negative Value MATH.DOMAIN.SQRT YES YES

Disabled By Default

Reporting for these classes is disabled by default. See individual warning class documentation pages for enabling instructions: the requirements vary depending on the class.

Class Name MnemonicAvailability
C C++
## Follows # Operator LANG.PREPROC.PASTEHASH YES YES
/* in Comment LANG.COMM.NEST.CSTYLE YES YES
// in Comment LANG.COMM.NEST.CPPSTYLE YES YES
Addition Overflow of Allocation Size ALLOC.SIZE.ADDOFLOW YES YES
Addition Overflow of Size MISC.MEM.SIZE.ADDOFLOW YES YES
Anonymous Namespace in Header File LANG.STRUCT.DECL.ANH YES YES
Array Parameter LANG.FUNCS.AP no YES
Array Parameter Mismatch LANG.FUNCS.APM YES YES
Array to Pointer Conversion on Temporary Object LANG.CAST.ARRAY.TEMP YES YES
Array to Pointer Decay LANG.CAST.ARRAY.POINTER YES YES
Assembly Pragma LANG.ASM.PRAGMA YES YES
Assignment Result in Expression LANG.STRUCT.USEASSIGN YES YES
Assignment in Conditional LANG.STRUCT.CONDASSIG YES YES
Backwards goto LANG.STRUCT.BGOTO YES YES
Basic Numerical Type Used LANG.TYPE.BASIC YES YES
Bit-field Signedness Not Explicit LANG.TYPE.BFSIGN YES YES
Bit-field Too Short LANG.TYPE.BFSHORT YES YES
Bit-field in Union LANG.TYPE.BFUNION YES YES
Body Is Not Compound Statement LANG.STRUCT.BNC YES YES
Boolean switch Expression LANG.STRUCT.SW.BOOL YES YES
C++ Comment in C LANG.COMM.CPP YES YES
C-style Cast LANG.CAST.CSTYLE no YES
Cast Removes const Qualifier LANG.CAST.PC.CRCQ YES YES
Cast Removes volatile Qualifier LANG.CAST.PC.CRVQ YES YES
Cast: Arithmetic Type/Void Pointer LANG.CAST.PC.AV YES YES
Cast: Non-integer Arithmetic Type/Object Pointer LANG.CAST.PC.AO YES YES
Cast: Object Pointers LANG.CAST.PC.OBJ YES YES
Cast: Virtual Base to Derived LANG.CAST.PC.VBASE no YES
Code Before #include LANG.PREPROC.CBI YES YES
Coercion: Integer Constant to Pointer LANG.CAST.PC.CONST2PTR YES YES
Comment Suggests Code Unfinished LANG.COMM.TODO YES YES
Commented-out Code LANG.COMM.CODE YES YES
Condition Contains Side Effects LANG.STRUCT.SE.COND YES YES
Condition Is Not Boolean LANG.STRUCT.NBC YES YES
Conditional Compilation LANG.PREPROC.COND YES YES
Conflicting Lock Order CONCURRENCY.LOCK.ORDER YES YES
Confusing Literal Suffix LANG.TYPE.CSUF YES YES
Confusing Operator Overload LANG.OPS.OVERLOADS YES YES
Continue Statement LANG.STRUCT.CONTINUE YES YES
Conversion from Function Pointer LANG.CAST.PC.FN2DATA YES YES
Conversion to Function Pointer LANG.CAST.PC.DATA2FN YES YES
Conversion: Pointer to Incomplete LANG.CAST.PC.INC YES YES
Conversion: Pointer/Integer LANG.CAST.PC.INT YES YES
Conversion: Void Pointer to Object Pointer LANG.CAST.PC.PV YES YES
Copy Operation Parameter Is Not const LANG.FUNCS.COPINC no YES
Dangerous Include File Name LANG.PREPROC.INCL.FNAME YES YES
Data Race CONCURRENCY.DATARACE YES YES
Declaration of Flexible Array Member LANG.STRUCT.DECL.FAM YES YES
Declaration of Reserved Name LANG.STRUCT.DECL.RESERVED YES YES
Declaration of Variable Length Array LANG.STRUCT.DECL.VLA YES YES
Direct Access to Field of C Atomic Object CONCURRENCY.C_ATOMIC.DAF YES no
Dynamic Allocation After Initialization ALLOC.POSTINIT YES YES
Dynamic Thread Creation CONCURRENCY.DTC YES YES
Ellipsis LANG.STRUCT.ELLIPSIS YES YES
Essential Type Diagnostic DIAG.MISRA.ETYPE YES YES
Excessive Macro Parameter Evaluation in C Generic LANG.STRUCT.CGEN.EMPE YES no
Excessive Stack Depth LANG.STRUCT.CALLSTACK YES YES
Explicit Zero Alignment LANG.STRUCT.ALIGNAS.EZA YES YES
Expression Value Widened by Assignment LANG.TYPE.AWID YES YES
Expression Value Widened by Other Operand LANG.TYPE.OWID YES YES
Extern Array Without Size LANG.STRUCT.DECL.EAWS YES YES
FILE* Dereference IO.FILEDEREF YES YES
Float Multiplication Overflow LANG.ARITH.FMULOFLOW YES YES
Float Pointer Conversion LANG.CAST.PC.FLOAT YES YES
Float-typed Loop Counter LANG.STRUCT.LOOP.FPC YES YES
Floating Point Equality LANG.ARITH.FPEQUAL YES YES
Function Defined in Header File LANG.STRUCT.DEF.FDH YES YES
Function Pointer LANG.STRUCT.FUNCPTR.CALL YES YES
Function Pointer Conversion LANG.STRUCT.FUNCPTR.CONVERT YES YES
Function Too Long LANG.FUNCS.TOOLONG YES YES
Function-Like Macro LANG.PREPROC.FUNCMACRO YES YES
GNU Extension LANG.EXT.GNU YES YES
GNU Typeof LANG.EXT.TYPEOF YES YES
Global Variable Declared with Different Types LANG.STRUCT.DECL.MGT YES YES
Goto Statement LANG.STRUCT.GOTO YES YES
Hardcoded DNS Name HARDCODED.DNS YES YES
High Cyclomatic Complexity (Procedure) LANG.METRIC.VG_P YES YES
High Risk Loop LANG.STRUCT.LOOP.HR YES YES
Implicit Address of Function LANG.STRUCT.FNADDR YES YES
Implicit Constructor Shadowing LANG.FUNCS.ICS no YES
Implicit Function Declaration LANG.STRUCT.DECL.IMPFN YES YES
Implicit Inheritance from Stateful Virtual Base LANG.TYPE.IISVB no YES
Implicit Lambda Capture LANG.LAMBDA.CAPTURE YES YES
Implicit Pointer Type Conversion in Selection of C Generic LANG.TYPE.CGEN.IMPTC YES no
Implicit Type LANG.STRUCT.DECL.IMPT YES no
Inappropriate Argument to <tgmath.h> Macro LANG.TYPE.IARGT.TGMATH YES YES
Inappropriate Argument to Integer Constant Macro LANG.PREPROC.ICONST YES YES
Inappropriate Argument to memcmp LANG.TYPE.IARGT.MEMCMP YES YES
Inappropriate Assignment Operator Return LANG.STRUCT.ASSIGNRET no YES
Inappropriate Assignment Type LANG.TYPE.IAT YES YES
Inappropriate Association Type in C Generic LANG.TYPE.CGEN.IAT YES no
Inappropriate Bit-field Type LANG.TYPE.BFINT YES YES
Inappropriate Cast Type LANG.TYPE.ICT YES YES
Inappropriate Cast Type: Expression LANG.TYPE.ICTE YES YES
Inappropriate Character Arithmetic LANG.TYPE.ICA YES YES
Inappropriate Comparison of Virtual Member Function LANG.STRUCT.ICVMF no YES
Inappropriate Declaration in Global Namespace LANG.STRUCT.DECL.GLOBAL YES YES
Inappropriate Include File Specification LANG.PREPROC.INCL.IIFS YES YES
Inappropriate Operand Type LANG.TYPE.IOT YES YES
Inappropriate Selection Type in C Generic LANG.TYPE.CGEN.IST YES no
Inappropriate Storage Duration CONCURRENCY.C_THREAD.ISD YES no
Inappropriate Test of Error Code LANG.ERRCODE.ITEST YES YES
Inappropriate Volatile Declaration LANG.TYPE.IVD YES YES
Incomplete Function Prototype LANG.FUNCS.PROT YES YES
Inconsistent Alignment Specifications LANG.STRUCT.ALIGNAS.IAS YES YES
Inconsistent Chained Designator Initialization LANG.STRUCT.INIT.ICDI YES YES
Inconsistent Enumerator Initialization LANG.STRUCT.INIT.ENUM YES YES
Inconsistent Function Declarations LANG.STRUCT.DECL.IF YES YES
Inconsistent Macro Parameter Expansion in C Generic LANG.STRUCT.CGEN.IMPE YES no
Inconsistent Object Declarations LANG.STRUCT.DECL.IO YES YES
Inconsistent Types of Arguments to <tgmath.h> Macro MATH.TYPE.TGMATH.ITA YES YES
Indeterminate Order of Evaluation LANG.STRUCT.SE.IOE YES YES
Initialization Cycle LANG.STRUCT.INIT.CYCLE YES YES
Inline Assembly Code LANG.ASM YES no
Inline Function Not static LANG.TYPE.INS YES no
Invalid Preprocessor Directive LANG.PREPROC.INVALID YES YES
Label Not In Enclosing Block LANG.STRUCT.GLABEL YES YES
Lambda Has No Parameter List LANG.LAMBDA.MPL YES YES
Lambda Has No Return Type LANG.LAMBDA.MRT YES YES
Leftover Debug Code LANG.STRUCT.DBG YES YES
Library Function Override LANG.ID.NU.LIBFN YES YES
Line Splicing in Comment LANG.COMM.SPLICE YES YES
Lock/Unlock Mismatch CONCURRENCY.LOCK.MISMATCH YES YES
Locked Twice CONCURRENCY.LOCK.TWICE YES YES
Macro Argument is both Mixed and Expanded LANG.PREPROC.MARGME YES YES
Macro Defined in Function Body LANG.PREPROC.DEFINFN YES YES
Macro Defines Constant LANG.PREPROC.MDC YES YES
Macro Definition of Reserved Name LANG.PREPROC.RDEF YES YES
Macro Does Not End With } or ) LANG.PREPROC.MACROEND YES YES
Macro Does Not Start With { or ( LANG.PREPROC.MACROSTART YES YES
Macro Name is C Keyword LANG.ID.NU.MK YES YES
Macro Parameter Not Parenthesized LANG.PREPROC.NOFPAREN YES YES
Macro Undefined in Function Body LANG.PREPROC.UNDEFINFN YES YES
Macro Undefinition of Reserved Name LANG.PREPROC.RUNDEF YES YES
Macro Uses # Operator LANG.PREPROC.HASH YES YES
Macro Uses ## Operator LANG.PREPROC.PASTE YES YES
Macro Uses -> Operator LANG.PREPROC.ARROW YES YES
Macro Uses Unary * Operator LANG.PREPROC.STAR YES YES
Macro Uses [] Operator LANG.PREPROC.BRACES YES YES
Malformed #include LANG.PREPROC.INCL.MF YES YES
Malformed for-loop Condition LANG.STRUCT.LOOP.MFTERM YES YES
Malformed for-loop Initialization LANG.STRUCT.LOOP.MFINIT YES YES
Malformed for-loop Step LANG.STRUCT.LOOP.MFSTEP YES YES
Malformed switch Statement LANG.STRUCT.SW.BAD YES YES
Member Function Could Be const LANG.TYPE.MFCBCONST YES YES
Member Function Could Be static LANG.TYPE.MFCBSTATIC YES YES
Memory Protection Removal MISC.MEM.PROT YES YES
Method Default Value Mismatch LANG.FUNCS.DEFAULT.OVERRIDE YES YES
Microsoft Extension LANG.EXT.MS YES YES
Mismatched Argument Types LANG.TYPE.MAT YES YES
Mismatched Operand Types LANG.TYPE.MOT YES YES
Misplaced Default Association in C Generic LANG.STRUCT.CGEN.MPD YES no
Misplaced Return Statement LANG.STRUCT.MISRS YES YES
Misplaced Using Declaration LANG.STRUCT.USING.MDECL YES YES
Misplaced case LANG.STRUCT.SW.MPC YES YES
Misplaced default LANG.STRUCT.SW.MPD YES YES
Missing Braces in Initialization LANG.STRUCT.INIT.MBI YES YES
Missing External Declaration LANG.STRUCT.DECL.NOEXT YES YES
Missing External Definition LANG.STRUCT.DEF.NOEXT YES YES
Missing Final else LANG.STRUCT.NOELSE YES YES
Missing Literal Suffix LANG.TYPE.MSUF YES YES
Missing Lock Acquisition CONCURRENCY.LOCK.NOLOCK YES YES
Missing Lock Release CONCURRENCY.LOCK.NOUNLOCK YES YES
Missing Non-default Association in C Generic LANG.STRUCT.CGEN.MND YES no
Missing Parentheses LANG.STRUCT.PARENS YES YES
Missing Test of Error Code LANG.ERRCODE.NOTEST YES YES
Missing User-defined Operations LANG.TYPE.MUDO no YES
Missing break LANG.STRUCT.SW.MB YES YES
Missing default LANG.STRUCT.SW.MD YES YES
Missing for-loop Step LANG.STRUCT.LOOP.NOSTEP YES YES
Missing for-loop Termination LANG.STRUCT.LOOP.NOTERM YES YES
Missing noreturn Specifier LANG.STRUCT.MNR YES YES
Mixed Assembly and Code LANG.ASM.MIXED YES YES
Modification of Standard Namespaces LANG.STRUCT.DECL.SNM no YES
Modified Parameter LANG.FUNCS.MODP YES YES
Multiple Abnormal Loop Exits LANG.STRUCT.LOOP.MAE YES YES
Multiple Accesses of Atomic CONCURRENCY.MAA YES YES
Multiple Declarations On Line LANG.STRUCT.DECL.ML YES YES
Multiple Declarations of a Global LANG.STRUCT.DECL.MG YES YES
Multiple External Declarations LANG.STRUCT.DECL.MULTIEXT YES YES
Multiple External Definitions LANG.STRUCT.DEF.MULTIEXT YES YES
Multiple Inheritance with Private Interface Class LANG.TYPE.MI.PRIVI no YES
Multiple Inheritance with Protected Interface Class LANG.TYPE.MI.PROTI no YES
Multiple Inheritance with Public Base Class LANG.TYPE.MI.PBC no YES
Multiple Inheritance with Too Many Protected Base Classes LANG.TYPE.MI.TMPBC no YES
Multiple Return Statements LANG.STRUCT.MULRS YES YES
Multiple Statements On Line LANG.STRUCT.MULTISTMT YES YES
Multiplication Overflow of Allocation Size ALLOC.SIZE.MULOFLOW YES YES
Multiplication Overflow of Size MISC.MEM.SIZE.MULOFLOW YES YES
NULL Used as Integer LANG.CAST.NULL.INT no YES
Naming Style Violation LANG.ID.STYLE YES YES
Nested Function Declaration LANG.STRUCT.DECL.FNEST YES YES
Nested Locks CONCURRENCY.LOCK.NESTED YES YES
No Matching #endif LANG.PREPROC.NOENDIF YES YES
No Matching #if LANG.PREPROC.NOIF YES YES
No Previous Declaration LANG.STRUCT.DECL.MISSINGDECL YES YES
Non-Boolean Preprocessor Expression LANG.PREPROC.NBPE YES YES
Non-const String Literal LANG.TYPE.NCS YES YES
Non-distinct Identifiers: External Names LANG.ID.ND.EXT YES YES
Non-distinct Identifiers: Macro/Macro LANG.ID.ND.MM YES YES
Non-distinct Identifiers: Macro/Other LANG.ID.ND.MO YES YES
Non-distinct Identifiers: Nested Scope LANG.ID.ND.NEST YES YES
Non-distinct Identifiers: Same Scope LANG.ID.ND.SS YES YES
Non-unique Identifiers: External Name LANG.ID.NU.EXT YES YES
Non-unique Identifiers: Internal Name LANG.ID.NU.INT YES YES
Non-unique Identifiers: Tag LANG.ID.NU.TAG YES YES
Non-unique Identifiers: Typedef LANG.ID.NU.TYPE YES YES
Non-void noreturn LANG.STRUCT.NVNR YES YES
Non-zero Error Code LANG.ERRCODE.NZ YES YES
Not All Warnings Are Enabled BUILD.WALL YES YES
Not Enough Assertions LANG.FUNCS.ASSERTS YES YES
Object Defined in Header File LANG.STRUCT.DEF.ODH YES YES
Octal Constant LANG.TYPE.OC YES YES
Out of Order Member Initializers LANG.STRUCT.INIT.OOMI no YES
Over-initialized Element LANG.STRUCT.INIT.OIE YES YES
Override of Non-Virtual Method LANG.TYPE.ONVM no YES
Partially Uninitialized Aggregate LANG.STRUCT.INIT.PIAGG YES YES
Partially Uninitialized Array LANG.STRUCT.INIT.PIARR YES YES
Pointed-to Type Could Be const LANG.TYPE.CBCONST YES YES
Pointer Arithmetic LANG.STRUCT.PARITH YES YES
Pointer Before Beginning of Object LANG.STRUCT.PBB YES YES
Pointer Past End of Object LANG.STRUCT.PPE YES YES
Pointer Type Inside Typedef LANG.STRUCT.PIT YES YES
Pointer to Variably-modified Array Type LANG.TYPE.VMAT YES YES
Possible Anti-Debugging BADFUNC.ANTIDEBUG YES YES
Potential Timebomb MISC.TIMEBOMB YES YES
Potential Unbounded Loop LANG.STRUCT.LOOP.UB YES YES
Preprocessing Directives in Macro Argument LANG.PREPROC.MACROARG YES YES
Recursion LANG.FUNCS.RECURSION YES YES
Recursive Macro LANG.PREPROC.RECURSIVE YES YES
Register Keyword LANG.STRUCT.REGISTER YES YES
Restrict Qualifier Used LANG.TYPE.RESTRICT YES YES
Return from Computational Exception Signal Handler LANG.STRUCT.RFCESH YES YES
Returned Pointer Not Treated as const LANG.STRUCT.RPNTC YES YES
Risky Atomic Memory Order CONCURRENCY.C_ATOMIC.MO YES YES
Risky Integer Promotion LANG.CAST.RIP YES YES
Scope Could Be File Static LANG.STRUCT.SCOPE.FILE YES YES
Scope Could Be Local Static LANG.STRUCT.SCOPE.LOCAL YES YES
Selection in C Generic not Expanded from Macro Parameters LANG.STRUCT.CGEN.NOTMACRO YES no
Side Effects in C Generic Selection LANG.STRUCT.SE.CGEN YES no
Side Effects in Expression with Decrement LANG.STRUCT.SE.DEC YES YES
Side Effects in Expression with Increment LANG.STRUCT.SE.INC YES YES
Side Effects in Initializer List LANG.STRUCT.SE.INIT YES YES
Side Effects in Logical Operand LANG.STRUCT.SE.LOGIC YES YES
Side Effects in sizeof LANG.STRUCT.SE.SIZEOF YES YES
Signal Handler Entry Point DIAG.SIGHAND.ENTRY YES YES
Socket In Wrong State IO.SOCK.STATE YES YES
Specialization after Use LANG.STRUCT.DECL.SAU no YES
Static Array Parameter LANG.FUNCS.SAP YES YES
Subtraction Underflow of Allocation Size ALLOC.SIZE.SUBUFLOW YES YES
Subtraction Underflow of Size MISC.MEM.SIZE.SUBUFLOW YES YES
Tainted Allocation Size IO.TAINT.SIZE YES YES
Tainted Configuration Setting IO.TAINT.CONF YES YES
Tainted Filename IO.TAINT.FNAME YES YES
Tainted Network Address IO.TAINT.ADDR YES YES
Tainted Write IO.TAINT.WRITE YES YES
Task Delay Function CONCURRENCY.BADFUNC.DELAY YES YES
Thread Entry Point DIAG.THREAD.ENTRY YES YES
Too Few Cases in switch LANG.STRUCT.SW.IF YES YES
Too Many Alignment Specifiers LANG.STRUCT.ALIGNAS.TMAS YES YES
Too Many Dereferences LANG.STRUCT.TMD YES YES
Too Many Parameters LANG.FUNCS.TMFP YES YES
Too Many Side Effects in Assignment LANG.STRUCT.SE.ASSIGN YES YES
Too Many Side Effects in Condition LANG.STRUCT.SE.ECOND YES YES
Too Many Side Effects in Function Call LANG.STRUCT.SE.CALL YES YES
Too Many Side Effects in Statement LANG.STRUCT.SE.STMT YES YES
Too Many Side Effects in Switch LANG.STRUCT.SE.SWITCH YES YES
Too Much Indirection in Declaration LANG.STRUCT.TMID YES YES
Trigraph LANG.STRUCT.TRIGRAPH YES YES
Truncation of Allocation Size ALLOC.SIZE.TRUNC YES YES
Truncation of Size MISC.MEM.SIZE.TRUNC YES YES
Typographically Ambiguous Identifiers LANG.ID.AMBIG YES YES
Unbalanced Parenthesis LANG.PREPROC.UNBALANCED YES YES
Unchecked Parameter Dereference LANG.STRUCT.UPD YES YES
Undefined Macro in #if LANG.PREPROC.UMIF YES YES
Unexercised Call DIAG.UNEX.CALL YES YES
Unexercised Computation DIAG.UNEX.COMP YES YES
Unexercised Conditional DIAG.UNEX.COND YES YES
Unexercised Control Flow DIAG.UNEX.CONTROL YES YES
Unexercised Data Flow DIAG.UNEX.DATA YES YES
Union Type LANG.TYPE.UNION YES YES
Unknown Lock CONCURRENCY.LOCK.UNKNOWN YES YES
Unnamed Field LANG.TYPE.UNF YES YES
Unneeded Implicitly Generated Operations LANG.TYPE.UIGO no YES
Unordered Initialization LANG.STRUCT.INIT.UNORDERED YES YES
Unreachable Catch LANG.STRUCT.UCTCH no YES
Unreachable Control Flow LANG.STRUCT.UC YES YES
Unspecified Array Size with Designator Initialization LANG.STRUCT.INIT.UADI YES YES
Unterminated Escape Sequence LANG.STRUCT.UESC YES YES
Untrusted Library Load IO.UT.LIB YES YES
Untrusted Network Host IO.UT.HOST YES YES
Untrusted Network Port IO.UT.PORT YES YES
Untrusted Process Creation IO.UT.PROC YES YES
Unused Label LANG.STRUCT.UULABEL YES YES
Unused Macro LANG.STRUCT.UUMACRO YES YES
Unused Parameter LANG.STRUCT.UUPARAM YES YES
Unused Tag LANG.STRUCT.UUTAG YES YES
Unused Type LANG.STRUCT.UUTYPE YES YES
Unused Variable LANG.STRUCT.UUVAR YES YES
Use of #define LANG.PREPROC.DEFINE YES YES
Use of #elif LANG.PREPROC.ELIF YES YES
Use of #elifdef LANG.PREPROC.ELIFDEF YES YES
Use of #elifndef LANG.PREPROC.ELIFNDEF YES YES
Use of #else LANG.PREPROC.ELSE YES YES
Use of #endif LANG.PREPROC.ENDIF YES YES
Use of #error LANG.PREPROC.ERROR YES YES
Use of #if LANG.PREPROC.IF YES YES
Use of #ifdef LANG.PREPROC.IFDEF YES YES
Use of #ifndef LANG.PREPROC.IFNDEF YES YES
Use of #import LANG.PREPROC.IMPORT YES YES
Use of #include LANG.PREPROC.INCLUDE YES YES
Use of #include_next LANG.PREPROC.INCLUDE_NEXT YES YES
Use of #line LANG.PREPROC.LINE YES YES
Use of #pragma LANG.PREPROC.PRAGMA YES YES
Use of #undef LANG.PREPROC.UNDEF YES YES
Use of #using LANG.PREPROC.USING YES YES
Use of #warning LANG.PREPROC.WARNING YES YES
Use of <fenv.h> Exception Handling Function BADFUNC.FENV_H YES YES
Use of <setjmp.h> LANG.PREPROC.INCL.SETJMP_H YES YES
Use of <signal.h> LANG.PREPROC.INCL.SIGNAL_H YES YES
Use of <stdarg.h> Feature BADMACRO.STDARG_H YES YES
Use of <stdint.h> Small Integer Constant Macro BADMACRO.STDINT_H_ICONST YES YES
Use of <stdio.h> Input/Output BADFUNC.STDIO_H YES YES
Use of <stdio.h> Input/Output Macro BADMACRO.STDIO_H YES YES
Use of <stdlib.h> Allocator/Deallocator BADFUNC.STDLIB_H_MEM YES YES
Use of <stdlib.h> Allocator/Deallocator Macro BADMACRO.STDLIB_H_MEM YES YES
Use of <tgmath.h> LANG.PREPROC.INCL.TGMATH_H YES YES
Use of <time.h> Time/Date Function BADFUNC.TIME_H YES YES
Use of <wchar.h> Input/Output BADFUNC.WCHAR_H YES YES
Use of <wchar.h> Input/Output Macro BADMACRO.WCHAR_H YES YES
Use of AddAccessAllowedAce BADFUNC.ADDACCESSACE YES YES
Use of AddAccessDeniedAce BADFUNC.ADDACCESSACE YES YES
Use of AfxLoadLibrary BADFUNC.PATH.AFXLOADLIBRARY YES YES
Use of AfxParseURL BADFUNC.AFXPARSEURL YES YES
Use of Alignas LANG.STRUCT.ALIGNAS YES YES
Use of Alignof LANG.STRUCT.ALIGNOF YES YES
Use of C Atomic CONCURRENCY.C_ATOMIC YES YES
Use of C Generic LANG.STRUCT.CGEN YES YES
Use of CoLoadLibrary BADFUNC.PATH.COLOADLIBRARY YES YES
Use of Comma Operator LANG.STRUCT.COMMA YES YES
Use of Condition Variable Signal CONCURRENCY.BADFUNC.CNDSIGNAL YES YES
Use of Condition Variable Wait CONCURRENCY.BADFUNC.CNDWAIT YES YES
Use of CreateFile BADFUNC.CREATEFILE YES YES
Use of CreateProcess BADFUNC.CREATEPROCESS YES YES
Use of CreateThread BADFUNC.CREATETHREAD YES YES
Use of FormatMessage BADFUNC.FORMATMESSAGE YES YES
Use of L_tmpnam_s BADMACRO.L_TMPNAM_S YES YES
Use of LoadLibrary BADFUNC.PATH.LOADLIBRARY YES YES
Use of LoadModule BADFUNC.LOADMODULE YES YES
Use of MoveFile BADFUNC.MOVEFILE YES YES
Use of NULL BADMACRO.NULL no YES
Use of Noreturn LANG.FUNCS.NORETURN YES YES
Use of OemToAnsi BADFUNC.BO.OEMTOCHAR YES YES
Use of OemToChar BADFUNC.BO.OEMTOCHAR YES YES
Use of SHCreateProcessAsUserW BADFUNC.PATH.SHCREATEPROCESSASUSERW YES YES
Use of ShellExecute BADFUNC.PATH.SHELLEXECUTE YES YES
Use of StrCatChainW BADFUNC.BO.STRCATCHAINW YES YES
Use of TMP_MAX_S BADMACRO.TMP_MAX_S YES YES
Use of Thread Local CONCURRENCY.THREADLOCAL YES YES
Use of WinExec BADFUNC.WINEXEC YES YES
Use of XML_ExternalEntityParserCreate BADFUNC.XML_EXTERNALENTITYPARSERCREATE YES YES
Use of _exec BADFUNC.PATH._EXEC YES YES
Use of _spawn BADFUNC.PATH._SPAWN YES YES
Use of abort BADFUNC.ABORT YES YES
Use of abort_handler_s BADFUNC.ABORT_HANDLER_S YES YES
Use of asctime_s BADFUNC.ASCTIME_S YES YES
Use of atof BADFUNC.ATOF YES YES
Use of atoi BADFUNC.ATOI YES YES
Use of atol BADFUNC.ATOL YES YES
Use of atoll BADFUNC.ATOLL YES YES
Use of bsearch BADFUNC.BSEARCH YES YES
Use of bsearch_s BADFUNC.BSEARCH_S YES YES
Use of catch LANG.STRUCT.EXCP.CATCH no YES
Use of catopen BADFUNC.CATOPEN YES YES
Use of chroot BADFUNC.CHROOT YES YES
Use of constraint_handler_t BADFUNC.CONSTRAINT_HANDLER_T YES YES
Use of ctime_s BADFUNC.CTIME_S YES YES
Use of cuserid BADFUNC.CUSERID YES YES
Use of execlp BADFUNC.PATH.EXECLP YES YES
Use of execvp BADFUNC.PATH.EXECVP YES YES
Use of exit BADFUNC.EXIT YES YES
Use of fopen_s BADFUNC.FOPEN_S YES YES
Use of fork BADFUNC.FORK YES YES
Use of fprintf_s BADFUNC.FPRINTF_S YES YES
Use of freopen_s BADFUNC.FREOPEN_S YES YES
Use of fscanf_s BADFUNC.FSCANF_S YES YES
Use of fwprintf_s BADFUNC.FWPRINTF_S YES YES
Use of fwscanf_s BADFUNC.FWSCANF_S YES YES
Use of getenv BADFUNC.GETENV YES YES
Use of getenv_s BADFUNC.GETENV_S YES YES
Use of getlogin BADFUNC.GETLOGIN YES YES
Use of getopt BADFUNC.BO.GETOPT YES YES
Use of getpass BADFUNC.BO.GETPASS YES YES
Use of gets_s BADFUNC.GETS_S YES YES
Use of getwd BADFUNC.BO.GETWD YES YES
Use of gmtime_s BADFUNC.GMTIME_S YES YES
Use of ignore_handler_s BADFUNC.IGNORE_HANDLER_S YES YES
Use of localtime_s BADFUNC.LOCALTIME_S YES YES
Use of longjmp BADFUNC.LONGJMP YES YES
Use of mbsrtowcs_s BADFUNC.MBSRTOWCS_S YES YES
Use of mbstowcs_s BADFUNC.MBSTOWCS_S YES YES
Use of memcmp BADFUNC.MEMCMP YES YES
Use of memcpy_s BADFUNC.MEMCPY_S YES YES
Use of memmove_s BADFUNC.MEMMOVE_S YES YES
Use of memset BADFUNC.MEMSET YES YES
Use of memset_s BADFUNC.MEMSET_S YES YES
Use of mkstemp BADFUNC.TEMP.MKSTEMP YES YES
Use of offsetof BADMACRO.OFFSETOF YES YES
Use of popen BADFUNC.PATH.POPEN YES YES
Use of printf_s BADFUNC.PRINTF_S YES YES
Use of pthread_kill CONCURRENCY.BADFUNC.PTHREAD_KILL YES YES
Use of putenv BADFUNC.PUTENV YES YES
Use of qsort BADFUNC.QSORT YES YES
Use of qsort_s BADFUNC.QSORT_S YES YES
Use of rand BADFUNC.RANDOM.RAND YES YES
Use of rand48 Function BADFUNC.RANDOM.RAND48 YES YES
Use of random BADFUNC.RANDOM.RANDOM YES YES
Use of realloc BADFUNC.REALLOC YES YES
Use of realpath BADFUNC.BO.REALPATH YES YES
Use of recvmsg BADFUNC.BO.RECVMSG YES YES
Use of scanf_s BADFUNC.SCANF_S YES YES
Use of set_constraint_handler_s BADFUNC.SET_CONSTRAINT_HANDLER_S YES YES
Use of setjmp BADFUNC.SETJMP YES YES
Use of setlocale BADFUNC.SETLOCALE YES YES
Use of setuid BADFUNC.SETUID YES YES
Use of signal BADFUNC.SIGNAL YES YES
Use of snprintf_s BADFUNC.SNPRINTF_S YES YES
Use of snwprintf_s BADFUNC.SNWPRINTF_S YES YES
Use of sprintf_s BADFUNC.SPRINTF_S YES YES
Use of sscanf_s BADFUNC.SSCANF_S YES YES
Use of std::locale::global BADFUNC.LOCALE.GLOBAL no YES
Use of strcat BADFUNC.BO.STRCAT YES YES
Use of strcat_s BADFUNC.STRCAT_S YES YES
Use of strchr BADFUNC.BO.STRCHR YES YES
Use of strcmp BADFUNC.BO.STRCMP YES YES
Use of strcoll BADFUNC.BO.STRCOLL YES YES
Use of strcpy BADFUNC.BO.STRCPY YES YES
Use of strcpy_s BADFUNC.STRCPY_S YES YES
Use of strcspn BADFUNC.BO.STRCSPN YES YES
Use of strerror_s BADFUNC.STRERROR_S YES YES
Use of strerrorlen_s BADFUNC.STRERRORLEN_S YES YES
Use of strlen BADFUNC.BO.STRLEN YES YES
Use of strncat_s BADFUNC.STRNCAT_S YES YES
Use of strncpy_s BADFUNC.STRNCPY_S YES YES
Use of strnlen_s BADFUNC.STRNLEN_S YES YES
Use of strpbrk BADFUNC.BO.STRPBRK YES YES
Use of strrchr BADFUNC.BO.STRRCHR YES YES
Use of strspn BADFUNC.BO.STRSPN YES YES
Use of strstr BADFUNC.BO.STRSTR YES YES
Use of strtok BADFUNC.BO.STRTOK YES YES
Use of strtok_s BADFUNC.STRTOK_S YES YES
Use of strtrns BADFUNC.BO.STRTRNS YES YES
Use of swprintf_s BADFUNC.SWPRINTF_S YES YES
Use of swscanf_s BADFUNC.SWSCANF_S YES YES
Use of syslog BADFUNC.BO.SYSLOG YES YES
Use of system BADFUNC.PATH.SYSTEM YES YES
Use of t_open BADFUNC.T_OPEN YES YES
Use of throw LANG.STRUCT.EXCP.THROW no YES
Use of tmpfile_s BADFUNC.TMPFILE_S YES YES
Use of tmpnam_s BADFUNC.TMPNAM_S YES YES
Use of ttyname BADFUNC.TTYNAME YES YES
Use of vfork BADFUNC.VFORK YES YES
Use of vfprintf_s BADFUNC.VFPRINTF_S YES YES
Use of vfscanf_s BADFUNC.VFSCANF_S YES YES
Use of vfwprintf_s BADFUNC.VFWPRINTF_S YES YES
Use of vfwscanf_s BADFUNC.VFWSCANF_S YES YES
Use of vprintf_s BADFUNC.VPRINTF_S YES YES
Use of vscanf_s BADFUNC.VSCANF_S YES YES
Use of vsnprintf_s BADFUNC.VSNPRINTF_S YES YES
Use of vsnwprintf_s BADFUNC.VSNWPRINTF_S YES YES
Use of vsprintf_s BADFUNC.VSPRINTF_S YES YES
Use of vsscanf_s BADFUNC.VSSCANF_S YES YES
Use of vswprintf_s BADFUNC.VSWPRINTF_S YES YES
Use of vswscanf_s BADFUNC.VSWSCANF_S YES YES
Use of vwprintf_s BADFUNC.VWPRINTF_S YES YES
Use of vwscanf_s BADFUNC.VWSCANF_S YES YES
Use of wcrtomb_s BADFUNC.WCRTOMB_S YES YES
Use of wcscat_s BADFUNC.WCSCAT_S YES YES
Use of wcscpy_s BADFUNC.WCSCPY_S YES YES
Use of wcsncat_s BADFUNC.WCSNCAT_S YES YES
Use of wcsncpy_s BADFUNC.WCSNCPY_S YES YES
Use of wcsnlen_s BADFUNC.WCSNLEN_S YES YES
Use of wcsrtombs_s BADFUNC.WCSRTOMBS_S YES YES
Use of wcstok_s BADFUNC.WCSTOK_S YES YES
Use of wcstombs_s BADFUNC.WCSTOMBS_S YES YES
Use of wctomb_s BADFUNC.WCTOMB_S YES YES
Use of wmemcpy_s BADFUNC.WMEMCPY_S YES YES
Use of wmemmove_s BADFUNC.WMEMMOVE_S YES YES
Use of wprintf_s BADFUNC.WPRINTF_S YES YES
Use of wscanf_s BADFUNC.WSCANF_S YES YES
Using Declaration in Header File LANG.STRUCT.USING.HDECL YES YES
Using Directive LANG.STRUCT.USING.DIRECTIVE YES YES
Using Directive in Header File LANG.STRUCT.USING.HDIR YES YES
Variable Could Be const LANG.TYPE.VCBC YES YES
Variadic Macro LANG.PREPROC.VARIADIC YES YES
Virtual Base Class LANG.TYPE.BCV YES YES
Virtual Base Class not In Diamond LANG.TYPE.BCVNID YES YES
Virtual and Non-Virtual Base Class LANG.TYPE.BCVNV YES YES
Void C Atomic CONCURRENCY.C_ATOMIC.VOID YES no
Warnings Not Treated As Errors BUILD.WERROR YES YES
Weak Cryptography BADFUNC.WEAKCRYPTO YES YES
Write to Read Only File IO.WRITERO YES YES
chroot without chdir MISC.CHROOT.NOCHDIR YES YES
delete with Non-Virtual Destructor LANG.STRUCT.DNVD no YES
sizeof Array Parameter LANG.TYPE.SAP YES YES
switch With Non-enum Expression LANG.STRUCT.SW.SWNEE YES YES

Supported for All Languages

The following warning classes are supported for all languages, including C and C++.

Class NameMnemonic
Copy-Paste ErrorMISC.CPE

User-Defined Warning Classes

Checks for arbitrary warning classes can be implemented with the CodeSonar Extension API, or with CodeSonar plug-ins. For more information, see Extending CodeSonar.