When invoked through the Reports menu, each report provides a listing of all the exceptions to a particular source check, across all the files in the project. Alternatively, you can view all of the exceptions to all of the source checks, for one specific file. To invoke this file-specific source checks report, use the context sensitive menu by right clicking on a file symbol, or use the File > Reports menu in a File Editor.
Octal Constant | Flags the use of an octal constant (rule 7.1) |
Missing u Suffix | Flags the omission of a u or U suffix from an integer constant represented in an unsigned type (rule 7.2) |
Inappropriate Essential Type | Flags an operand with an inappropriate essential type (rule 10.1) |
Char Used in Arith Operation | Flags an expression having an essentially character type being used inappropriately in addition and subtraction operations (rule 10.2) |
Assign to Narrower Type | Flags an expression being assigned to a narrower essential type or a different essential type category (rule 10.3) |
Mismatch Underlying Types | Flags an operation with arithmetic conversions on operands having different essential types (rule 10.4) |
Conversion Issue | Flags a conversion that could lose precision or rely on non-portable interpretations of arithmetic or pointers. This includes mixing of signed and unsigned operands when it can lead to portability problems. Also includes right-shifts of signed operands. (EX: int x; unsigned y; x = y;) |
Composite Assign to Wider | Flags a composite expression being assigned to a wider essential type (rule 10.6) |
Composite Arith with Wider | Flags an operation with arithmetic conversions where a composite operand has a narrower essential type than the other operand (rule 10.7) |
Composite Cast to Wider | Flags a composite expression being cast to a wider essential type or a different essential type category (rule 10.8) |
Function Pointer Cast Mismatch | Flags a cast between a function pointer and any other type (rule 11.1) |
Pointer Cast Mismatch | Flags a cast between pointers to different object types (rule 11.3) |
Qualifier Removed in Cast | Flags the removal of a const or volatile qualifier in a cast (rule 11.8) |
Interchangeable Function Available | Flags the use of a macro when an interchangeable function is available (directive 4.9) |
Unterminated Escape Sequence | Flags an unterminated octal or hexadecimal escape sequence (rule 4.1) |
Trigraph | Flags the use of a trigraph (rule 4.2) |
Init Lacks Braces or Values | Flags initialization of an array, structure, union or enum with insufficient braces or values (rule 9.2) |
Array Partially Zeroed | Flags an array variable initialized by a single "0". Zeros should probably be specified for all array elements. |
Array Partially Initialized | Flags an array variable initialized with fewer values than the dimension of the array |
Unclear Subexpression | Flags a subexpression that is potentially not written as intended. Includes comparisons that can be statically evaluated like unsigned variables and negative numbers. Catches typical suspicious relational operator uses and potential lack of parenthesis. (EX: x && y | z) (rule 12.1) |
Shift Out of Range | Flags a shift operation where the right hand operand is out of range of the bit width of the essential type of the left hand operand (rule 12.2) |
Comma Operator | Flags the use of the comma operator (rule 12.3) |
Wrap-Around of Constants | Flags a wrap-around in the evaluation of unsigned constants in expression (rule 12.4) |
Assign in Boolean Expression | Flags the use of an assignment operator as an operand in a Boolean-valued expression (rule 13.4) |
Suspicious Assignment | Flags a suspicious assignment in a conditional expression or argument list, where the assignment might actually be intended as a comparison |
Sizeof Potential Side Effects | Flags the use of the sizeof operator where the operand contains an expression having potential side effects (rule 13.6) |
Pointer Used in Arithmetic | Flags an expression of pointer type being used with +, -, += or -= operators (rule 18.4) |
Macro Arg Contains Directive | Flags a macro argument that looks like a preprocessing directive (rule 20.6) |
Macro Needs Parentheses | Flags the need for parentheses in an expression resulting from the expansion of macro parameters (rule 20.7) |
Undefined Macro in Directive | Flags the use of an undefined macro in an #if or #elif preprocessor directive (rule 20.9) |
Macro Uses # or ## | Flags the use of # or ## preprocessor operators in a macro definition (rule 20.10) |
Macro Uses Multiple # and/or ## | Flags the use of more than one # and/or ## preprocessor operator in a macro definition (rule 20.11) |
Number of Built-In Operators | Indicates that the number of built-in operators in an expression exceeds a user-specified threshold |
Number of Functions in Expression | Indicates that the number of function calls in an expression exceeds a user-specified threshold |
Old Style Allocator | Flags the use of an old style memory allocator, such as malloc, realloc, calloc or free, in a C++ program. |
Portability Problem | Flags certain language extensions that are incompatible with ISO C or ISO C++, such as Diab extension for sizeof and GNU extension for aggregate literals (rule 1.2) |
Comment Contains Comment Characters | Flags the use of /* or // within a comment (rule 3.1) |
Comment Contains Line-Splicing | Flags the use of line-splicing in a // comment (rule 3.2) |
Missing Static Specifier | Flags the declaration of a function or object with internal linkage where the static specifier isn't used (rule 8.8) |
Empty Statement | Flags an empty statement in an if, else or while, as it could be an indicator of missing code |
Suspicious For Loop | Flags a for loop that is not well formed, either in the three control expressions, or in interactions with the for body (rule 14.2) |
Jump Statement | Flags the use of a goto, break or continue statement, as it could make control flow more difficult to understand |
Goto Statement | Flags the use of a goto statement (rule 15.1) |
Goto Earlier Label | Flags a goto statement jumping to a label declared earlier in the function (rule 15.2) |
Goto Outside Block | Flags a goto statement jumping to a label outside the same block or a block enclosing the goto (rule 15.3) |
Needs Compound Statement | Flags a potentially missing compound statement (braces). This includes possible errors caused by a dangling else or by a statement mistakenly disassociated from a while or for (rule 15.6) |
Missing Final Else | Flags an if .. else if construct that does not terminate with an else statement (rule 15.7) |
Level of Switch Label | Flags a switch label where the most closely-enclosing compound statement is not the body of the switch statement (rule 16.2) |
Unterminated Case | Flags a case in a switch statement that is not terminated by an explicit transfer of control, such as a break statement (rule 16.3) |
Missing Default Case | Flags a switch statement that does not have a default case (rule 16.4) |
Order of Default Case | Flags a switch statement where the default case is not either first or last case (rule 16.5) |
Single Switch Clause | Flags a switch statement that has less than two switch-clauses (rule 16.6) |
Boolean Type in Switch | Flags a switch expression that has an essentially Boolean type (rule 16.7) |
Catch Statement List Empty | Flags catch statements that have an empty statement list as possible sign of missing logic |
Catch All | Flags catch statements that catch all exceptions in one clause as possible sign of missing logic |
Return Ignored | Flags a statement that ignores the result of either a function call or any other expression where the computation is not stored. This typically indicates that error results are being ignored |
Excessive Pointer Nesting | Flags a declaration containing more than 2 levels of pointer nesting (rule 18.5) |
Inappropriate Include Directive | Flags a #include directive followed by something other than a <filename> or "filename" sequence (rule 20.3) |
Missing Return Type | Flags a function declaration that does not specify the return type (rule 8.1) |
Missing Parameter Name | Flags a function declaration that does not specify a parameter name (rule 8.2) |
Empty Parameter List | Flags a function declarator that uses empty parenthesis () instead of (void) (rule 8.2) |
Mismatched Parameter Type | Flags a mismatch in parameter types between the function declaration and the function definition (rule 8.3) |
Missing/Mismatched Function Declarator | Flags a mismatch in parameter types between the function definition and a function call. This is mostly effective for C, where prototypes are missing or inconsistent |
Variable Number of Arguments | Flags a function that has a variable number of arguments |
Mismatched Extern Type | Flags a mismatch in parameter types between the function declaration and an extern declaration (rule 8.4) |
Undeclared Function | Flags a function being called without a prior declaration (rule 17.3) |
K&R Style Declarator | Flags a function declarator that uses old style K&R syntax, which is no longer valid in C++ |
Potential Static Function | Indicates that a function is only called from within the file where it is defined, but is not declared static |