diff --git a/cxx-sensors/src/main/resources/pclint.xml b/cxx-sensors/src/main/resources/pclint.xml index bb9c8875c5..1238406f74 100644 --- a/cxx-sensors/src/main/resources/pclint.xml +++ b/cxx-sensors/src/main/resources/pclint.xml @@ -1,22418 +1,23445 @@ - - - - CustomRuleTemplate - MULTIPLE - Rule template for PC-Lint custom rules - - -Follow these steps to make your custom rules available in SonarQube: -

-
    -
      -
    1. Create a new rule in SonarQube by "copying" this rule template and specify the CheckId of your custom rule, a title, a description, and a default severity.
    2. -
    3. Enable the newly created rule in your quality profile
    4. -
    -
  1. Relaunch an analysis on your projects, et voilà, your custom rules are executed!
  2. -
- ]]> -
-
- - 1 - L0001: Unclosed Comment (Location) - - - - CRITICAL - BUG - LINEAR - 1min - - - 2 - L0002: Unclosed Quote - - - - CRITICAL - BUG - LINEAR - 1min - - - 3 - L0003: #else without a #if - - - - CRITICAL - BUG - LINEAR - 1min - - - 4 - L0004: Too many #if levels - - - - CRITICAL - BUG - LINEAR - 1min - - - 5 - L0005: Too many #endif's - - - - CRITICAL - BUG - LINEAR - 1min - - - 6 - L0006: Stack Overflow - - - - CRITICAL - BUG - LINEAR - 1min - - - 7 - L0007: Unable to open include file: FileName - - - - CRITICAL - LINEAR - 1min - - - 8 - L0008: Unclosed #if (Location) - - - - CRITICAL - BUG - LINEAR - 1min - - - 9 - L0009: Too many #else's in #if (Location) - - - - CRITICAL - BUG - LINEAR - 1min - - - 10 - L0010: Expecting 'String' - - - - CRITICAL - LINEAR - 1min - - - 11 - L0011: Excessive Size - - - - CRITICAL - BUG - LINEAR - 1min - - - 12 - L0012: Need < or " - - - - CRITICAL - BUG - LINEAR - 1min - - - 13 - L0013: Bad type - - - - CRITICAL - BUG - LINEAR - 1min - - - 14 - L0014: Symbol 'Symbol' previously defined (Location) - - - - CRITICAL - LINEAR - 1min - - - 15 - L0015: Symbol 'Symbol' redeclared (TypeDiff) (Location) - - - - CRITICAL - BUG - LINEAR - 1min - - - 16 - L0016: Unrecognized name - - - - CRITICAL - LINEAR - 1min - - - 17 - L0017: Unrecognized name - - - - CRITICAL - LINEAR - 1min - - - 18 - L0018: Symbol 'Symbol' redeclared (TypeDiff) conflicts with Location - - - - CRITICAL - BUG - LINEAR - 1min - - - 19 - L0019: Useless Declaration - - - - bad-practice - LINEAR - 1min - - - 20 - L0020: Illegal use of = - - - - CRITICAL - BUG - LINEAR - 1min - - - 21 - L0021: Expected { - - - - CRITICAL - LINEAR - 1min - - - 22 - L0022: Illegal operator - - - - CRITICAL - BUG - LINEAR - 1min - - - 23 - L0023: Expected colon - - - - CRITICAL - BUG - LINEAR - 1min - - - 24 - L0024: Expected an expression, found 'String' - - - - CRITICAL - LINEAR - 1min - - - 25 - L0025: Illegal constant - - - - CRITICAL - BUG - LINEAR - 1min - - - 26 - L0026: Expected an expression, found 'String' - - - - CRITICAL - LINEAR - 1min - - - 27 - L0027: Illegal character (0xhh) - - - - CRITICAL - LINEAR - 1min - - - 28 - L0028: Redefinition of symbol 'Symbol' Location - - - - CRITICAL - BUG - LINEAR - 1min - - - 29 - L0029: Duplicated type-specifier - - - - CRITICAL - BUG - LINEAR - 1min - - - 30 - L0030: Expected a constant - - - - CRITICAL - BUG - LINEAR - 1min - - - 31 - L0031: Redefinition of symbol 'Symbol' conflicts with Location - - - - CRITICAL - BUG - LINEAR - 1min - - - 32 - L0032: Field size (member 'Symbol') should not be zero - - - - CRITICAL - BUG - LINEAR - 1min - - - 33 - L0033: Illegal constant - - - - CRITICAL - BUG - LINEAR - 1min - - - 34 - L0034: Non-constant initializer - - - - CRITICAL - BUG - LINEAR - 1min - - - 35 - L0035: Initializer has side-effects - - - - CRITICAL - BUG - LINEAR - 1min - - - 36 - L0036: Redefining the storage class of symbol 'Symbol' conflicts with Location - - - - CRITICAL - BUG - LINEAR - 1min - - - 37 - L0037: Value of enumerator 'Symbol' inconsistent (conflicts with Location) - - - - CRITICAL - BUG - LINEAR - 1min - - - 38 - L0038: Offset of symbol 'Symbol' inconsistent (Location) - - - - CRITICAL - BUG - LINEAR - 1min - - - 39 - L0039: Redefinition of symbol 'Symbol' conflicts with Location - - - - CRITICAL - BUG - LINEAR - 1min - - - 40 - L0040: Undeclared identifier 'Name' - - - - CRITICAL - BUG - LINEAR - 1min - - - 41 - L0041: Redefinition of symbol 'Symbol' - - - - CRITICAL - BUG - LINEAR - 1min - - - 42 - L0042: Expected a statement - - - - CRITICAL - BUG - LINEAR - 1min - - - 43 - L0043: Vacuous type for variable 'Symbol' - - - - CRITICAL - LINEAR - 1min - - - 44 - L0044: Need a switch - - - - CRITICAL - BUG - LINEAR - 1min - - - 45 - L0045: Bad use of register - - - - CRITICAL - LINEAR - 1min - - - 46 - L0046: Field type should be int - - - - CRITICAL - LINEAR - 1min - - - 47 - L0047: Bad type - - - - CRITICAL - BUG - LINEAR - 1min - - - 48 - L0048: Bad type - - ) operator requires a pointer operand.]]> - - CRITICAL - BUG - LINEAR - 1min - - - 49 - L0049: Expected a type - - - - CRITICAL - LINEAR - 1min - - - 50 - L0050: Attempted to take the address of a non-lvalue - - - - CRITICAL - BUG - LINEAR - 1min - - - 51 - L0051: Expected integral type - - - - CRITICAL - LINEAR - 1min - - - 52 - L0052: Expected an lvalue - - - - CRITICAL - BUG - LINEAR - 1min - - - 53 - L0053: Expected a scalar - - - - CRITICAL - LINEAR - 1min - - - 54 - L0054: Division by 0 - - - - cert - CRITICAL - BUG - LINEAR - 1min - - - 55 - L0055: Bad type - - - - CRITICAL - LINEAR - 1min - - - 56 - L0056: Bad type - - - - CRITICAL - BUG - LINEAR - 1min - - - 57 - L0057: Bad type - - - - CRITICAL - BUG - LINEAR - 1min - - - 58 - L0058: Bad type - - - - CRITICAL - LINEAR - 1min - - - 59 - L0059: Bad type - - - - CRITICAL - LINEAR - 1min - - - 60 - L0060: Bad type - - - - CRITICAL - LINEAR - 1min - - - 61 - L0061: Bad type - - - - CRITICAL - BUG - LINEAR - 1min - - - 62 - L0062: Incompatible types (TypeDiff) for operator ':' - - - - CRITICAL - BUG - LINEAR - 1min - - - 63 - L0063: Expected an lvalue - - - - CRITICAL - LINEAR - 1min - - - 64 - L0064: Type mismatch (Context) (TypeDiff) - - - - CRITICAL - BUG - LINEAR - 1min - - - 65 - L0065: Expected a member name - - ) operator a member name should appear.]]> - - CRITICAL - BUG - LINEAR - 1min - - - 66 - L0066: Bad type - - - - CRITICAL - BUG - LINEAR - 1min - - - 67 - L0067: Can't cast from Type to Type - - - - CRITICAL - BUG - LINEAR - 1min - - - 68 - L0068: Can't cast from Type to Type - - - - CRITICAL - LINEAR - 1min - - - 69 - L0069: Can't cast from Type to Type - - - - CRITICAL - BUG - LINEAR - 1min - - - 70 - L0070: Can't cast from Type to Type - - - - CRITICAL - BUG - LINEAR - 1min - - - 71 - L0071: Can't cast from Type to Type - - - - CRITICAL - LINEAR - 1min - - - 72 - L0072: Bad option 'String' - - - - CRITICAL - LINEAR - 1min - - - 73 - L0073: Bad left operand - - or a . operator. These operators expect an expression primary on their left. Please enclose any complex expression in this position within parentheses.]]> - - CRITICAL - LINEAR - 1min - - - 74 - L0074: Address of Register - - - - CRITICAL - BUG - LINEAR - 1min - - - 75 - L0075: Too late to change sizes (option 'String') - - - - CRITICAL - LINEAR - 1min - - - 76 - L0076: can't open file String - - - - CRITICAL - LINEAR - 1min - - - 77 - L0077: Address of bit-field cannot be taken - - - - CRITICAL - BUG - LINEAR - 1min - - - 78 - L0078: Symbol 'Symbol' typedef'ed at Location used in expression - - - - CRITICAL - BUG - LINEAR - 1min - - - 79 - L0079: Bad type for % operator - - - - CRITICAL - BUG - LINEAR - 1min - - - 80 - L0080: this use of ellipsis is not strictly ANSI - - - - CRITICAL - BUG - LINEAR - 1min - - - 81 - L0081: struct/union not permitted in equality comparison - - - - CRITICAL - LINEAR - 1min - - - 82 - L0082: return <exp>; illegal with void function - - - - CRITICAL - LINEAR - 1min - - - 83 - L0083: Incompatible pointer types with subtraction - - - - CRITICAL - BUG - LINEAR - 1min - - - 84 - L0084: sizeof object is zero or object is undefined - - - - CRITICAL - BUG - LINEAR - 1min - - - 85 - L0085: Array 'Symbol' has dimension 0 - - - - CRITICAL - BUG - LINEAR - 1min - - - 86 - L0086: Structure 'Symbol' has no data elements - - - - CRITICAL - LINEAR - 1min - - - 87 - L0087: Expression too complicated for #ifdef or #ifndef - - - - CRITICAL - LINEAR - 1min - - - 88 - L0088: Symbol 'Symbol' is an array of empty elements - - - - CRITICAL - LINEAR - 1min - - - 89 - L0089: Argument or option too long ('String') - - - - convention - CRITICAL - LINEAR - 1min - - - 90 - L0090: Option 'String' is only appropriate within a lint comment - - - - convention - CRITICAL - LINEAR - 1min - - - 91 - L0091: Line exceeds Integer characters (use +linebuf) - - - - convention - CRITICAL - LINEAR - 1min - - - 92 - L0092: Negative array dimension or bit field length (Integer) - - - - CRITICAL - BUG - LINEAR - 1min - - - 93 - L0093: New-line is not permitted within string arguments to macros - - - - CRITICAL - LINEAR - 1min - - - 94 - L0094: xml element termination name 'String' does not match start name 'String' - - - - CRITICAL - BUG - LINEAR - 1min - - - 95 - L0095: Expected a macro parameter but instead found 'Name' - - - - CRITICAL - BUG - LINEAR - 1min - - - 96 - L0096: Unmatched left brace for String on Location - - - - CRITICAL - BUG - LINEAR - 1min - - - 98 - L0098: Recovery Error (String) - - - - CRITICAL - BUG - LINEAR - 1min - - - 101 - L0101: Expected an identifier - - - - convention - CRITICAL - LINEAR - 1min - - - 102 - L0102: Illegal parameter specification - - - - CRITICAL - BUG - LINEAR - 1min - - - 103 - L0103: Unexpected declaration - - - - CRITICAL - BUG - LINEAR - 1min - - - 104 - L0104: Conflicting types - - - - CRITICAL - LINEAR - 1min - - - 105 - L0105: Conflicting modifiers - - - - CRITICAL - BUG - LINEAR - 1min - - - 106 - L0106: Illegal constant - - - - CRITICAL - LINEAR - 1min - - - 107 - L0107: Label 'Symbol' (Location) not defined - - - - brain-overload - misra - CRITICAL - LINEAR - 1min - - - 108 - L0108: Invalid context - - - - CRITICAL - BUG - LINEAR - 1min - - - 109 - L0109: The combination 'short long' is not standard, 'long' is assumed - - - - CRITICAL - LINEAR - 1min - - - 110 - L0110: Attempt to assign to void - - - - CRITICAL - BUG - LINEAR - 1min - - - 111 - L0111: Assignment to const object - - - - CRITICAL - BUG - LINEAR - 1min - - - 113 - L0113: Inconsistent enum declaration - - - - CRITICAL - BUG - LINEAR - 1min - - - 114 - L0114: Inconsistent structure declaration for tag 'Symbol' - - - - CRITICAL - BUG - LINEAR - 1min - - - 115 - L0115: Struct/union not defined - - a where p is a pointer to a struct that had not yet been defined in the current module.]]> - - CRITICAL - BUG - LINEAR - 1min - - - 116 - L0116: Inappropriate storage class - - - - CRITICAL - BUG - LINEAR - 1min - - - 117 - L0117: Inappropriate storage class - - - - CRITICAL - BUG - LINEAR - 1min - - - 118 - L0118: Too few arguments for prototype - - - - CRITICAL - BUG - LINEAR - 1min - - - 119 - L0119: Too many arguments for prototype - - - - CRITICAL - BUG - LINEAR - 1min - - - 120 - L0120: Initialization without braces of dataless type 'Symbol' - - - - CRITICAL - BUG - LINEAR - 1min - - - 121 - L0121: Attempting to initialize an object of undefined type 'Symbol' - - - - CRITICAL - BUG - LINEAR - 1min - - - 122 - L0122: Digit (Char) too large for radix - - - - CRITICAL - BUG - LINEAR - 1min - - - 123 - L0123: Macro 'Symbol' defined with arguments at Location this is just a warning - - - - CRITICAL - LINEAR - 1min - - - 124 - L0124: Pointer to void not allowed - - >= < <=).]]> - - CRITICAL - BUG - LINEAR - 1min - - - 125 - L0125: Too many storage class specifiers - - - - CRITICAL - BUG - LINEAR - 1min - - - 126 - L0126: Inconsistent structure definition 'Symbol' - - - - CRITICAL - BUG - LINEAR - 1min - - - 127 - L0127: L0110: Illegal constant - - - - CRITICAL - BUG - LINEAR - 1min - - - 128 - L0128: Pointer to function not allowed - - >= < <=).]]> - - CRITICAL - BUG - LINEAR - 1min - - - 129 - L0129: declaration expected, identifier 'Symbol' ignored - - - - CRITICAL - LINEAR - 1min - - - 130 - L0130: Expected integral type - - - - CRITICAL - LINEAR - 1min - - - 131 - L0131: syntax error in call of macro 'Symbol' at location Location - - - - CRITICAL - LINEAR - 1min - - - 132 - L0132: Expected function definition - - - - CRITICAL - LINEAR - 1min - - - 133 - L0133: Too many initializers for aggregate 'Symbol' - - - - CRITICAL - BUG - LINEAR - 1min - - - 134 - L0134: Missing initializer - - - - CRITICAL - BUG - LINEAR - 1min - - - 135 - L0135: comma assumed in initializer - - - - CRITICAL - BUG - LINEAR - 1min - - - 136 - L0136: Illegal macro name - - - - CRITICAL - BUG - LINEAR - 1min - - - 137 - L0137: constant 'Symbol' used twice within switch - - - - CRITICAL - BUG - LINEAR - 1min - - - 138 - L0138: Can't add parent 'Symbol' to strong type String; creates loop - - - - CRITICAL - LINEAR - 1min - - - 139 - L0139: Can't take sizeof function - - - - CRITICAL - BUG - LINEAR - 1min - - - 140 - L0140: Type appears after modifier - - - - convention - CRITICAL - LINEAR - 1min - - - 141 - L0141: The following option has too many elements: 'String' - - - - CRITICAL - LINEAR - 1min - - - 142 - L0142: case constant 'String' used previously in this switch - - A duplicate case constant was detected. For example, the following code will be diagnosed as a repetition of case constant '1'.

-

-           switch( n )
-               {
-               case 1:  m = 25;    break;
-               case 2-1: m = 27;   break;
-               }
-
-]]> -
- CRITICAL - BUG - LINEAR - 1min -
- - 143 - L0143: Erroneous option: String - - - - CRITICAL - LINEAR - 1min - - - 144 - L0144: Non-existent return value for symbol 'Symbol', compare with Location - - - - CRITICAL - BUG - LINEAR - 1min - - - 145 - L0145: Type expected before operator, void assumed - - - - CRITICAL - LINEAR - 1min - - - 146 - L0146: Assuming a binary constant - - - - CRITICAL - LINEAR - 1min - - - 147 - L0147: sizeof takes just one argument - - - - CRITICAL - BUG - LINEAR - 1min - - - 148 - L0148: member 'Symbol' previously declared at Location - - - - CRITICAL - BUG - LINEAR - 1min - - - 149 - L0149: C++ construct 'String' found in C code - - - - CRITICAL - BUG - LINEAR - 1min - - - 150 - L0150: Token 'String' unexpected String - - - - CRITICAL - LINEAR - 1min - - - 151 - L0151: Token 'Name' inconsistent with abstract type - - - - CRITICAL - LINEAR - 1min - - - 152 - L0152: Lob base file 'file name' missing - - - - CRITICAL - LINEAR - 1min - - - 153 - L0153: Could not create temporary file - - - - CRITICAL - LINEAR - 1min - - - 154 - L0154: Could not evaluate type 'String', int assumed - - - - CRITICAL - LINEAR - 1min - - - 155 - L0155: Ignoring { }'ed sequence within an expression, 0 assumed - - = 0 ? b : -b; } The last expression in the list is the result. To syntactically support the construct without running amuck we recognize the sequence and issue this message. If you want to use the facility just suppress the message.]]> - - CRITICAL - LINEAR - 1min - - - 156 - L0156: Braced initializer for scalar type 'Name' - - - - CRITICAL - BUG - LINEAR - 1min - - - 157 - L0157: No data may follow an incomplete array - - - - CRITICAL - BUG - LINEAR - 1min - - - 158 - L0158: Assignment to variable 'Symbol' (Location) increases capability - - - - CRITICAL - LINEAR - 1min - - - 159 - L0159: enum following a type is non-standard - - - - CRITICAL - LINEAR - 1min - - - 160 - L0160: The sequence '( {' is non standard and is taken to introduce a GNU statement expression - - 0) z = y; else z = - y; z; }) // Now n has the last value of z. The primary intention of this message is to alert the user to the non-standard nature of this construct. The typical response is to suppress the message and go on. But a few caveats are in order. - Programmers who intend to work only with C code with the GNU extensions may safely disable this diagnostic but C++ users should think twice. This is partly for the reasons given in GCC's documentation (see the section entitled "Statements and Declarations in Expressions") and partly because the meaning of '( {' will change in G++ when its maintainers implement Initializer Lists (a new core language feature that is expected to appear in the 2010 version of the ISO C++ Standard).]]> - - CRITICAL - LINEAR - 1min - - - 161 - L0161: Repeated use of parameter 'Symbol' in parameter list - - - - CRITICAL - BUG - LINEAR - 1min - - - 165 - L0165: An [unscoped] enumeration cannot be forward-declared (int is assumed) - - An [unscoped] enumeration cannot be forward-declared [without an enum-base] (int is assumed) -- This message is issued at the point of a forward-declaration of an enumeration like so:

-

-               enum E; // Error
-
-

This is prohibited by ISO C and ISO C++98. In C++0x, we can modify this example to be well-formed by explicitly indicating the underlying integral type; example:

-

-               enum E : unsigned short; // Ok
-
-

If you are not using C++0x and/or your compiler supports the construct you may simply suppress this message with a -e165.

]]> -
- CRITICAL - LINEAR - 1min -
- - 166 - L0166: Function defined within a function - - - - CRITICAL - BUG - LINEAR - 1min - - - 169 - L0169: mode(String) requests an (integral/floating point) type of size N, but no such type exists. - - (Please check -s options in the Lint configuration.) -This occurs for a use of the GCC attribute mode() as in:

-

-           __attribute__((mode(DF)));
-
-

This is supposed to match a built-in scalar type whose size is the size indicated in the message. If this message is issued, it probably means that size options have not been set to match the compile configuration; see Section 5.3, Size and Alignment Options.

-]]> -
- CRITICAL - BUG - LINEAR - 1min -
- - 170 - L0170: Explicit type-specifier required for symbol 'Symbol', int assumed - - A declaration did not have an explicit type as required by C99 or C++. int was assumed. This could easily happen if an intended comma was replaced by a semicolon. For example, if instead of typing:

-

-           double       radius,
-                        diameter;
-
-

the programmer had typed:

-

-           double       radius;
-                        diameter;
-
]]> -
- convention - CRITICAL - LINEAR - 1min -
- - 171 - L0171: Ellipsis requires at least one parameter-declaration - - - - CRITICAL - BUG - LINEAR - 1min - - - 200 - L0200: Internal Error, subcode=CODE_SMELLx - - - - tool-error - BLOCKER - - - 301 - L0301: Stack overflow - - - - tool-error - BLOCKER - - - 302 - L0302: Exceeded Available Memory - - - - tool-error - BLOCKER - - - 303 - L0303: String too long (try +macros) - - - - tool-error - BLOCKER - - - 304 - L0304: Corrupt object file, code Integer, symbol=String - - - - tool-error - BLOCKER - - - 305 - L0305: Unable to open module 'file name' - - - - tool-error - BLOCKER - - - 306 - L0306: Previously encountered module 'FileName' - - - - tool-error - BLOCKER - - - 307 - L0307: Can't open indirect file 'FileName' - - - - tool-error - BLOCKER - - - 308 - L0308: Can't write to standard out - - - - tool-error - BLOCKER - - - 309 - L0309: #error ... - - - - tool-error - BLOCKER - - - 310 - L0310: Declaration too long: 'String...' - - - - tool-error - BLOCKER - - - 312 - L0312: Lint (Precompiled Header/Object Module) has obsolete or foreign version id: Integer - - - - tool-error - BLOCKER - - - 313 - L0313: Too many files - - - - tool-error - BLOCKER - - - 314 - L0314: Previously used .lnt file: FileName - - - - tool-error - BLOCKER - - - 315 - L0315: Exceeded message limit (see -limit) - - - - tool-error - BLOCKER - - - 316 - L0316: Error while writing to file "file name" - - - - tool-error - BLOCKER - - - 317 - L0317:File encoding, String, not currently supported - - - - tool-error - BLOCKER - - - 318 - L0318: EOF for a module found within a macro argument list - - - - tool-error - BLOCKER - - - 321 - L0321: Declaration stack overflow - - - - tool-error - BLOCKER - - - 322 - L0322: Unable to open include file FileName - - - - tool-error - BLOCKER - - - 323 - L0323: Token String too long - - - - tool-error - BLOCKER - - - 324 - L0324: Too many symbols Integer - - - - tool-error - BLOCKER - - - 325 - L0325: Cannot re-open file 'file name' - - - - tool-error - BLOCKER - - - 326 - L0326: String 'String ...' too long, exceeds Integer characters - - - - tool-error - BLOCKER - - - 328 - L0328: Bypass header 'Name' follows a different header sequence than in module 'String' which includes File1 where the current module includes File2 - - - - tool-error - BLOCKER - - - 330 - L0330: Static assertion failure: 'String' - - - - tool-error - BLOCKER - - - 333 - L0333: Not allowed to open file 'String' - - - - tool-error - BLOCKER - - - 401 - L0401: symbol 'Symbol' not previously declared static at Location - - - - LINEAR - 1min - - - 402 - L0402: static function 'Symbol' (Location) not defined - - - - LINEAR - 1min - - - 403 - L0403: static symbol 'Symbol' has unusual type modifier - - - - LINEAR - 1min - - - 404 - L0404: struct not completed within file 'FileName' - - - - LINEAR - 1min - - - 405 - L0405: #if not closed off within file 'FileName' - - - - LINEAR - 1min - - - 406 - L0406: Comment not closed off within file 'FileName' - - - - LINEAR - 1min - - - 407 - L0407: Inconsistent use of tag 'Symbol' conflicts with Location - - - - LINEAR - 1min - - - 408 - L0408: Type mismatch with switch expression - - - - LINEAR - 1min - - - 409 - L0409: Expecting a pointer or array - - - - LINEAR - 1min - - - 410 - L0410: size_t not what was expected from fzl and/or fzu, using 'Type' - - - - LINEAR - 1min - - - 411 - L0411: ptrdiff_t not what was expected from fdl option, using 'Type' - - - - LINEAR - 1min - - - 412 - L0412: Ambiguous format specifier '%X' - - - - LINEAR - 1min - - - 413 - L0413: Likely use of null pointer 'Symbol' in [left/right] argument to operator 'String' Reference - - - - LINEAR - 1min - - - 414 - L0414: Possible division by 0 - - - - LINEAR - 1min - - - 415 - L0415: access of out-of-bounds pointer ('Integer' beyond end of data) by operator 'String' - - -An out-of-bounds pointer was accessed. String designates the operator. The parameter 'Integer' gives some idea how far out of bounds the pointer may be. It is measured in units given by the size of the pointed to object. The value is relative to the last item of good data and therefore should always be greater than zero. For example: - int a[10]; - a[10] = 0; -results in an overflow message containing the phrase '1 beyond end of data'. -

References

-

ARR30-C. Do not form or use out-of-bounds pointers or array subscripts

- - ]]> -
- cert - security - BUG - LINEAR - 1min -
- - 416 - L0416: creation of out-of-bounds pointer ('Integer' beyond end of data) by operator 'String' - - -An out-of-bounds pointer was created. See message 415 for a description of the parameters Integer and String. For example: - int a[10]; - ... - f( a + 11 ); -Here, an illicit pointer value is created and is flagged as such by PC-lint/FlexeLint. Note that the pointer a+10 is not considered by PC-lint/FlexeLint to be the creation of an out-of-bounds pointer. This is because ANSI C explicitly allows pointing just beyond an array. Access through a+10, however, as in *(a+10) or the more familiar a[10], would be considered erroneous but in that case message 415 would be issued. -

References

-

ARR30-C. Do not form or use out-of-bounds pointers or array subscripts

- - ]]> -
- cert - security - BUG - LINEAR - 1min -
- - 417 - L0417: integral constant 'String' has precision Number which is longer than long long int - - - - LINEAR - 1min - - - 418 - L0418: Passing null pointer to function 'Symbol', Context Reference - - -A NULL pointer is being passed to a function identified by Symbol. The argument in question is given by Context. The function is either a library function designed not to receive a NULL pointer or a user function dubbed so via the option -function. -

References

-

EXP34-C. Do not dereference null pointers

- - ]]> -
- cert - BUG - LINEAR - 1min -
- - 419 - L0419: Apparent data overrun for function 'Symbol', argument Integer exceeds argument Integer - - - - security - BUG - LINEAR - 1min - - - 420 - L0420: Apparent access beyond array for function 'Symbol', argument Integer exceeds Integer Reference - - -This message is issued for several library functions (such as fwrite, memcmp, etc.) wherein there is an apparent attempt to access more data than exist. For example, if the length of data specified in the fwrite call exceeds the size of the data specified. The function is specified by Symbol and the arguments are identified by argument number. -

References

-

ARR38-C. Guarantee that library functions do not form invalid pointers

- ]]> -
- cert - security - BUG - LINEAR - 1min -
- - 421 - L0421: Caution -- function 'Symbol' is considered dangerous - - -This message is issued (by default) for the built-in function gets. This function is considered dangerous because there is no mechanism to ensure that the buffer provided as first argument will not overflow. A well known computer virus (technically a worm) was created based on this defect. Through the -function option, the user may designate other functions as dangerous. -

References

-

ARR38-C. Guarantee that library functions do not form invalid pointers

- - ]]> -
- cert - security - BUG - LINEAR - 1min -
- - 422 - L0422: Passing to function 'Symbol' a negative value (Integer), Context Reference - - - - LINEAR - 1min - - - 423 - L0423: Creation of memory leak in assignment to variable 'Symbol' - - -An assignment was made to a pointer variable (designated by Symbol) which appeared to already be holding the address of an allocated object which had not been freed. The allocation of memory which is not freed is considered a memory leak. -

References

-

MEM31-C. Free dynamically allocated memory when no longer needed

- - ]]> -
- cert - security - BUG - LINEAR - 1min -
- - 424 - L0424: Inappropriate deallocation (Name1) for 'Name2' data. - - - - LINEAR - 1min - - - 425 - L0425: 'Message' in processing semantic 'String' at token 'String' - - - - LINEAR - 1min - - - 426 - L0426: Call to function 'Symbol' violates semantic 'String' - - 10 && 2n > 10 ) void f( int, int ); ... f( 2, 20 ); - results in the message: - Call to function 'f(int, int)' violates semantic '(1n>10)']]> - - LINEAR - 1min - - - 427 - L0427: // comment terminates in \ - - - - LINEAR - 1min - - - 428 - L0428: negative subscript (Integer) in operator 'String' - - - - LINEAR - 1min - - - 429 - L0429: Custodial pointer 'Symbol' (Location) has not been freed or returned - - A pointer of auto storage class was allocated storage which was neither freed nor returned to the caller. This represents a "memory leak". A pointer is considered custodial if it uniquely points to the storage area. It is not considered custodial if it has been copied. Thus:

-
 
-    int *p = new int[20]; // p is a custodial pointer 
-    int *q = p; // p is no longer custodial 
-    p = new int[20]; // p again becomes custodial 
-    q = p + 0; // p remains custodial
-
-

-Here p does not lose its custodial property by merely participating in an arithmetic operation. -A pointer can lose its custodial property by passing the pointer to a function. If the parameter of the function is typed pointer to const or if the function is a library function, that assumption is not made. For example

-
 
-  p = malloc(10); 
-  strcpy (p, "hello");
-
-Then p still has custody of storage allocated. -

It is possible to indicate via semantic options that a function will take custody of a pointer.

-

References

-

MEM31-C. Free dynamically allocated memory when no longer needed

- ]]> -
- cert - security -
- - 430 - L0430: Character '@', taken to specify variable location, is not standard C/C++ - - - - LINEAR - 1min - - - 431 - L0431: Missing identifier for template parameter number Integer - - - - LINEAR - 1min - - - 432 - L0432: Suspicious argument to malloc - - The following pattern was detected:

-

-    malloc( strlen(e+1) )
-
-

where e is some expression. This is suspicious because it closely resembles the commonly used pattern:

-

-    malloc( strlen(e)+1 )
-
-

If you really intended to use the first pattern then an equivalent expression that will not raise this error is:

-

-    malloc( strlen(e)-1 )
]]> -
- LINEAR - 1min -
- - 433 - L0433: Allocated area not large enough for pointer - - An allocation was assigned to a pointer whose reach extends beyond the area that was allocated. This would usually happen only with library allocation routines such as malloc and calloc. -For example:

-

-    int *p = malloc(1);
-
-

This message is also provided for user-declared allocation functions. For example, if a user's own allocation function is provided with the following semantic:

-

-    -sem(ouralloc,@P==malloc(1n))
-
-

We would report the same message. Please note that it is necessary to designate that the returned area is freshly allocated (ala malloc). - This message is always given in conjunction with the more general Informational Message 826.

-

References

-

MEM35-C. Allocate sufficient memory for an object

- - ]]> -
- cert - security - BUG - LINEAR - 1min -
- - 434 - L0434: White space ignored between back-slash and new-line - - - - LINEAR - 1min - - - 435 - L0435: integral constant 'String' has precision Integer, use +fll to enable long long" - - - - LINEAR - 1min - - - 436 - L0436: Apparent preprocessor directive in invocation of macro 'Symbol' - - This is issued in the context of an invocation of a function-like macro.

-

-    Example:
-
-           #define FOO(p) p
-
-           FOO(
-                   #define X Y
-              )
-
-

According to the ISO Standards, this results in undefined behavior.

- -

By the rules of Standard C the preprocessing directive is - absorbed into the macro argument but then will not subsequently - get executed. For this reason some compilers treat the apparent - preprocessor directive as a directive. This is logical but not - portable. It is therefore best to avoid this construct.

]]> -
- CRITICAL - LINEAR - 1min -
- - 437 - L0437: Passing struct 'Symbol' to ellipsis - - - - LINEAR - 1min - - - 438 - L0438: Last value assigned to variable 'Symbol' not used - - 0 ) { int z; z = x + y; if( n > z ) { x = 3; return; } z = 12; } } Here we can report that x was assigned a value that had not been used by the time the return statement had been encountered. We also report that the most recently assigned value to z is unused at the point that z goes out of scope. See message 838 in Section 13.4 C Informational Messages and flags -fiw and -fiz in Sections 2.3.6 Initialization-is-considered-a-Write flag (-fiw) and 2.3.7 Initialization-by-Zero-is-considered-a-Write flag (-fiz) . - This message is suppressed if the variable's address is assigned to a pointer (or, equivalently, the variable is used to directly initialize a reference to non-const).]]> - - LINEAR - 1min - - - 440 - L0440: for clause irregularity: variable 'Symbol' tested in 2nd expression does not match 'Symbol' modified in 3rd - - - - LINEAR - 1min - - - 441 - L0441: for clause irregularity: loop variable 'Symbol' not found in 2nd for expression - - - - LINEAR - 1min - - - 442 - L0442: for clause irregularity: testing direction inconsistent with increment direction - - - - LINEAR - 1min - - - 443 - L0443: for clause irregularity: variable 'Symbol' initialized in 1st expression does not match 'Symbol' modified in 3rd - - - - LINEAR - 1min - - - 444 - L0444: for clause irregularity: pointer 'Symbol' incremented in 3rd expression is tested for NULL in 2nd expression - - - - LINEAR - 1min - - - 445 - L0445: reuse of for loop variable 'Symbol' at 'Location' could cause chaos - - - - LINEAR - 1min - - - 446 - L0446: side effect in initializer - - An initializer containing a side effect can be potentially troublesome. For example, given the code:

-

-           void f( int i )
-               {
-               int a[2] = {i++, i++};
-               }
-
-

The values of the array elements are unspecified because the order of evaluation is unspecified by the C standard.

]]> -
- LINEAR - 1min -
- - 447 - L0447: Extraneous whitespace ignored in include directive for file 'FileName'; opening file 'FileName' - - or closing ". Since filenames tend not to contain leading or trailing whitespace, Lint ignores the (apparently) extraneous characters and processes the directive as though the characters were never given. The use of a -efile option on either String for this message will cause Lint to process #include's with whitespace intact.]]> - - LINEAR - 1min - - - 448 - L0448: Likely access of pointer pointing Integer bytes past nul character by operator 'String' - - - - LINEAR - 1min - - - 449 - L0449: Pointer variable 'Symbol' previously deallocated - - - - LINEAR - 1min - - - 451 - L0451: Header file 'FileName' repeatedly included but does not have a standard include guard - - - - LINEAR - 1min - - - 452 - L0452: typedef Symbol 'Symbol' redeclared (TypeDiff) conflicts with Location", - - - - LINEAR - 1min - - - 453 - L0453: Function 'Symbol', previously designated pure, String 'Name' - - - - LINEAR - 1min - - - 454 - L0454: A thread mutex has been locked but not unlocked - - - - LINEAR - 1min - - - 455 - L0455: A thread mutex that had not been locked is being unlocked - - - - LINEAR - 1min - - - 456 - L0456: Two execution paths are being combined with different mutex lock states - - - - LINEAR - 1min - - - 457 - L0457: Function 'Symbol1' of thread 'Symbol2' has an unprotected write access to variable 'Symbol3' which is used by function 'Symbol4' of thread 'Symbol5' - - - - LINEAR - 1min - - - 458 - L0458: Function 'Symbol1' of thread 'Symbol2' has an unprotected read access to variable 'Symbol3' which is modified by function 'Symbol4' of thread 'Symbol5' - - - - LINEAR - 1min - - - 459 - L0459: Function 'Symbol' whose address was taken has an unprotected access to variable 'Symbol' - - - - LINEAR - 1min - - - 460 - L0460: Thread 'Symbol' has unprotected call to thread unsafe function 'Symbol' which is also called by thread 'Symbol' - - - - LINEAR - 1min - - - 461 - L0461: Thread 'Symbol' has unprotected call to function 'Symbol' of group 'Name' while thread 'Symbol' calls function 'Symbol' of the same group - - - - LINEAR - 1min - - - 462 - L0462: Thread 'Symbol' calling function 'Symbol' is inconsistent with the 'String' semantic - - - - LINEAR - 1min - - - 464 - L0464: Buffer argument will be copied into itself - - - - LINEAR - 1min - - - 483 - L0483: boolean value in switch expression - - - - LINEAR - 1min - - - 484 - L0484: Stringize operator followed by macro parameter followed by pasting operator - - - - LINEAR - 1min - - - 485 - L0485: Duplicate initialization of object element - - - - LINEAR - 1min - - - 486 - L0486: attempting to write to a file opened as read-only - - - - LINEAR - 1min - - - 488 - L0488: Symbol 'Symbol' has same implicit enumerator value 'String' as enumerator 'Symbol' - - Two enumerators have the same value and at least one received that value implicitly. For example:

-

-           enum colors { red, blue, green = 1 };
-
-

will elicit this informational message while

-

-           enum colors { red, blue = 1, green = 1 };
-
-

will not.

]]> -
- LINEAR - 1min -
- - 489 - L0489: attempting to modify the contents of a string literal - - - - CRITICAL - LINEAR - 1min - - - 491 - L0491: non-standard use of 'defined' preprocessor operator - - The ISO standards restrict the use of the defined preprocessor keyword to either

-

-           defined(identifier)
-           defined identifier
-
-

Additionally, the preprocessor operator may not result from the expansion of another macro. This diagnostic highlights departures from these requirements as non-portable code.

- - ]]> -
- LINEAR - 1min -
- - 501 - L0501: Expected signed type - - - - LINEAR - 1min - - - 502 - L0502: Expected unsigned type - - - - LINEAR - 1min - - - 503 - L0503: Boolean argument to relational - - - - LINEAR - 1min - - - 504 - L0504: Unusual shift operation (String) - - - - LINEAR - 1min - - - 505 - L0505: Redundant left argument to comma - - - - LINEAR - 1min - - - 506 - L0506: Constant value Boolean - - - - LINEAR - 1min - - - 507 - L0507: Size incompatibility - - - - LINEAR - 1min - - - 508 - L0508: extern used with definition - - - - LINEAR - 1min - - - 509 - L0509: extern used with definition - - - - LINEAR - 1min - - - 510 - L0510: File extension 'String' reserved for future versions of this product - - - - LINEAR - 1min - - - 511 - L0511: Size incompatibility - - - - LINEAR - 1min - - - 512 - L0512: Symbol 'Symbol' previously used as static (Location) - - - - LINEAR - 1min - - - 514 - L0514: Unusual use of a Boolean - - - - LINEAR - 1min - - - 515 - L0515: Symbol 'Symbol' has arg. count conflict (Integer vs. Integer) with Location - - - - LINEAR - 1min - - - 516 - L0516: Symbol 'Symbol' has arg. type conflict (no. Integer -- TypeDiff) with Location - - - - LINEAR - 1min - - - 517 - L0517: defined not K&R - - - - LINEAR - 1min - - - 518 - L0518: Expected '(' - - - - LINEAR - 1min - - - 519 - L0519: Size incompatibility - - - - LINEAR - 1min - - - 520 - L0520: Highest operator or function lacks side-effects - - - - LINEAR - 1min - - - 521 - L0521: Highest operator or function lacks side-effects - - - - LINEAR - 1min - - - 522 - L0522: Highest operator or function lacks side-effects - - - - LINEAR - 1min - - - 524 - L0524: Loss of precision (Context) (Type to Type) - - - - LINEAR - 1min - - - 525 - L0525: Negative indentation from Location - - - - LINEAR - 1min - - - 526 - L0526: 'Symbol' (Location) not defined - - - - LINEAR - 1min - - - 527 - L0527: Unreachable code at token Symbol - - - - LINEAR - 1min - - - 528 - L0528: Symbol 'Symbol' (Location) not referenced - - - - LINEAR - 1min - - - 529 - L0529: Symbol 'Symbol' (Location) not subsequently referenced - - - - LINEAR - 1min - - - 530 - L0530: Symbol 'Symbol' (Location) not initialized - - - - LINEAR - 1min - - - 531 - L0531: Field size too large for 'Symbol' - - - - LINEAR - 1min - - - 532 - L0532: Return mode of function 'Symbol' inconsistent with Location - - - - LINEAR - 1min - - - 533 - L0533: function 'Symbol' should (not) return a value (see Location) - - - - LINEAR - 1min - - - 534 - L0534: Ignoring return value of function 'Symbol' (compare with Location) - - - - LINEAR - 1min - - - 537 - L0537: Repeated include file 'FileName' - - - - LINEAR - 1min - - - 538 - L0538: Excessive size - - - - LINEAR - 1min - - - 539 - L0539: Did not expect positive indentation from Location - - 0 ) x = 3; y = 4; - will result in this warning being issued for y = 4;. The Location cited will be that of the if clause.]]> - - LINEAR - 1min - - - 540 - L0540: Excessive size - - - - LINEAR - 1min - - - 541 - L0541: Excessive size - - - - LINEAR - 1min - - - 542 - L0542: Excessive size for bit field - - - - LINEAR - 1min - - - 544 - L0544: #endif or #else not followed by EOL - - - - LINEAR - 1min - - - 545 - L0545: Suspicious use of & - - -int a[10]; int (*p) [10]; - -Then a and &a, as pointers, both represent the same bit pattern, but whereas a is a pointer to int, &a is a pointer to array 10 of int. Of the two only &a may be assigned to p without complaint. If you are using the & operator in this way, we recommend that you disable this message. - - ]]> - - LINEAR - 1min - - - 546 - L0546: Suspicious use of & - - - - LINEAR - 1min - - - 547 - L0547: Redefinition of symbol 'Symbol' conflicts with Location - - - - LINEAR - 1min - - - 548 - L0548: else expected - - - - LINEAR - 1min - - - 549 - L0549: Suspicious cast - - - - LINEAR - 1min - - - 550 - L0550: Symbol 'Symbol' (Location) not accessed - - - - LINEAR - 1min - - - 551 - L0551: Symbol 'Symbol' (Location) not accessed - - - - LINEAR - 1min - - - 552 - L0552: Symbol 'Symbol' (Location) not accessed - - - - LINEAR - 1min - - - 553 - L0553: Undefined preprocessor variable 'Name', assumed 0 - - -The indicated variable had not previously been defined within a #define statement and yet it is being used in a preprocessor condition of the form #if or #elif. -Conventionally all variables in preprocessor expressions should be pre-defined. The value of the variable is assumed to be 0. -

References

-

PRE31-C. Avoid side effects in arguments to unsafe macros

- -]]> -
- cert - LINEAR - 1min -
- - 555 - L0555: #elif not K&R - - - - LINEAR - 1min - - - 556 - L0556: indented # - - - - LINEAR - 1min - - - 557 - L0557: unrecognized format - - - - LINEAR - 1min - - - 558 - L0558: Too few arguments for format (Integer missing) - - - - LINEAR - 1min - - - 559 - L0559: size of argument number Integer inconsistent with format - - -sprintf( buffer, "%f", 371 ) - -will show an error in argument number 3 because constant 371 is not floating point. - - ]]> - - LINEAR - 1min - - - 560 - L0560: argument no. Integer should be a pointer - - -scanf( "%f", 3.5 ) - -will generate the message that argument no. 2 should be a pointer. - - ]]> - - LINEAR - 1min - - - 561 - L0561: (arg. no. Integer) indirect object inconsistent with format - - -scanf( "%c", &n ) - -will elicit this message for argument number 2. - - ]]> - - LINEAR - 1min - - - 562 - L0562: Ellipsis (...) assumed - - - - LINEAR - 1min - - - 563 - L0563: Label 'Symbol' (Location) not referenced - - - - LINEAR - 1min - - - 564 - L0564: variable 'Symbol' depends on order of evaluation - - - - LINEAR - 1min - - - 565 - L0565: tag 'Symbol' not previously seen, assumed file-level scope - - - - LINEAR - 1min - - - 566 - L0566: Inconsistent or redundant format char 'Char' - - - - LINEAR - 1min - - - 567 - L0567: Expected a numeric field before char 'Char' - - - - LINEAR - 1min - - - 568 - L0568: nonnegative quantity is never less than zero. - - Comparisons of the form:

-

-    u >= 0 0 <= u
-    u < 0 0 > u
-
-

are suspicious if u is an unsigned quantity or a quantity judged to be never less then 0. See also message 775.

]]> -
- LINEAR - 1min -
- - 569 - L0569: Loss of information (Context) (Integer bits to Integer bits) - - - - LINEAR - 1min - - - 570 - L0570: Loss of sign (Context) (Type to Type) - - - - LINEAR - 1min - - - 571 - L0571: Suspicious Cast - - - - LINEAR - 1min - - - 572 - L0572: Excessive shift value (precision Integer shifted right by Integer) - - > 10 - will elicit this message if ch is typed char and where char is less than 10 bits wide (the usual case). To suppress the message you may cast the shifted quantity to a type whose length is at least the length of the shift value.]]> - - LINEAR - 1min - - - 573 - L0573: Signed-unsigned mix with divide - - one of the operands to / or % was signed and the other unsigned; moreover the signed quantity could be negative. For example:

-

-    u / n
-
-

where u is unsigned and n is signed will elicit this message whereas:

-

-    u / 4
-
-

will not, even though 4 is nominally an int. It is not a good idea to mix unsigned quantities with signed quantities in any case (a 737 will also be issued) but, with division, a negative value can create havoc. For example, the innocent looking:

-

-    n = n / u
-
-

will, if n is -2 and u is 2, not assign -1 to n but will assign some very large value.

-

To resolve this problem, either cast the integer to unsigned if you know it can never be less than zero or cast the unsigned to an integer if you know it can never exceed the maximum integer.

]]> -
- LINEAR - 1min -
- - 574 - L0574: Signed-unsigned mix with relational - - The four relational operators are:

-

-> >= < <=
-
-

One of the operands to a relational operator was signed and the other unsigned; also, the signed quantity could be negative. For example:

-

-    if( u > n ) ...
-
-

where u is unsigned and n is signed will elicit this message whereas:

-

-    if( u > 12 ) ...
-
-

will not (even though 12 is officially an int it is obvious that it is not negative). It is not a good idea to mix unsigned quantities with signed quantities in any case (a 737 will also be issued) but, with the four relationals, a negative value can produce obscure results. For example, if the conditional:

-

-    if( n < 0 ) ...
-
-

is true then the similar appearing:

-

-    u = 0; if( n < u ) ...
-
-

is false because the promotion to unsigned makes n very large.

-

To resolve this problem, either cast the integer to unsigned if you know it can never be less than zero or cast the unsigned to an int if you know it can never exceed the maximum int.

]]> -
- LINEAR - 1min -
- - 575 - L0575: enumeration constant exceeds range for integers - - - - LINEAR - 1min - - - 577 - L0577: Mixed memory model (option 'String') - - - - LINEAR - 1min - - - 578 - L0578: Declaration of symbol 'Symbol' hides symbol 'Symbol' (Location) - - - - LINEAR - 1min - - - 579 - L0579: parameter preceding ellipsis has invalid type - - - - LINEAR - 1min - - - 580 - L0580: Redeclaration of function 'Symbol' (hiding Location) causes loss of prototype - - - - LINEAR - 1min - - - 581 - L0581: Option 'String' is obsolete and should no longer be used - - - - LINEAR - 1min - - - 582 - L0582: esym (or emacro) name 'String' should not contain '(' - - - - LINEAR - 1min - - - 583 - L0583: Comparing type 'Type' with EOF - - - - LINEAR - 1min - - - 584 - L0584: Trigraph sequence (??Char) detected - - - - LINEAR - 1min - - - 585 - L0585: The sequence (??Char) is not a valid Trigraph sequence - - This warning is issued whenever a pair of '?' characters is seen within a string (or character) constant but that pair is not followed by a character which would make the triple a valid Trigraph sequence. Did the programmer intend this to be a Trigraph sequence and merely err? Even if no Trigraph were intended, it can easily be mistaken by the reader of the code to be a Trigraph. Moreover, what assurances do we have that in the future the invalid Trigraph might not become a valid Trigraph and change the meaning of the string? To protect yourself from such an event you may place a backslash between the '?' characters. Alternatively you may use concatenation of string constants.

-

For example:

-

-    pattern = "(???) ???-????"; // warning 585
-    pattern = "(?\?\?) ?\?\?-?\?\?\?"; // no warning
-    #define Q "?"
-    pattern = "(" Q Q Q ") " Q Q Q "-" Q Q Q Q // no warning
-
]]> -
- LINEAR - 1min -
- - 586 - L0586: String 'Name' is deprecated. String - - - - LINEAR - 1min - - - 587 - L0587: Predicate 'String' can be pre-determined and always evaluates to String - - - - LINEAR - 1min - - - 588 - L0588: Predicate 'String' will always evaluate to String unless an overflow occurs - - - - LINEAR - 1min - - - 589 - L0589: Predicate 'String' will always evaluate to String assuming standard division semantics - - - - LINEAR - 1min - - - 590 - L0590: Predicate 'String' will always evaluate to String assuming standard shift semantics - - > 5) >= 0 ) ... would always be regarded as true. This is because shifting a negative number to the right yields results that are implementation defined. - See also Message 587.]]> - - LINEAR - 1min - - - 591 - L0591: Variable 'Symbol' depends on the order of evaluation; it is used/modified through function 'Symbol' via calls: String" - - f() If the function g() is called and then n is added, you will obtain a different result than if n were first evaluated and then the call made. - The programmer should generally rewrite these expressions so that the compiler is constrained to use the intended order. For example if the programmer wanted to use the n prior to the call on g() it can alter h() to the following: int h() { int k = n; return k + g(); } This analysis requires two passes; the first pass builds the necessary call trees.]]> - - LINEAR - 1min - - - 592 - L0592: Non-literal format specifier used without arguments - - -A printf/scanf style function received a non-literal format specifier without trailing arguments. For example:

-

-  char msg[100]; 
-    ... 
-  printf( msg ); 
-
-

This can easily be rewritten to the relatively safe:

-

-  char msg[100]; 
-    ... 
-  printf( "%s", msg ); 
-
-

The danger lies in the fact that msg can contain hidden format codes. If msg is read from user input, then in the first example, a naive user could cause a glitch or a crash and a malicious user might exploit this to undermine system security. Since the unsafe form can easily be transformed into the safe form the latter should always be used. -

- ]]> -
- security - LINEAR - 1min -
- - 593 - L0593: Custodial pointer 'Symbol' (Location) possibly not freed or returned - - -This is the 'possible' version of message 429. A pointer of auto storage class was allocated storage and not all paths leading to a return statement or to the end of the function contained either a free or a return of the pointer. Hence there is a potential memory leak. For example:

-

-  void f( int n ) 
-    { 
-    int *p = new int; 
-    if( n ) delete p; 
-    } // message 593 
-
-

In this example an allocation is made and, if n is 0, no delete will have been made. -Please see message 429 for an explanation of "custodial" and ways of regulating when pointer variables retain custody of allocations. -

- ]]> -
- LINEAR - 1min -
- - 598 - L0598: Excessive shift value (precision Integer shifted left by Integer) - - A quantity is being shifted to the left by a value greater than or equal to the precision of that quantity or by a negative value. For example,

-

-         i << 32
-
-

will elicit this message if i is typed int and where int is 32 bits wide or less (the usual case). Such shift results in undefined behavior.

-

To suppress the message you may cast the shifted quantity to a type whose length is at least the length of the shift value.

]]> -
- LINEAR - 1min -
- - 601 - L0601: Expected a type for symbol Symbol, int assumed - - - - LINEAR - 1min - - - 602 - L0602: Comment within comment - - - - LINEAR - 1min - - - 603 - L0603: Symbol 'Symbol' (Location) not initialized - - - - LINEAR - 1min - - - 604 - L0604: Returning address of auto variable 'Symbol' - - - - LINEAR - 1min - - - 605 - L0605: Increase in pointer capability (Context) - - This warning is typically caused by assigning a (pointer to const) to an ordinary pointer. For example:

-

-    int *p;
-    const int *q;
-    p = q; /* 605 */
-
-

The message will be inhibited if a cast is used as in:

-

-    p = (int *) q;
-
-

An increase in capability is indicated because the const pointed to by q can now be modified through p. This message can be given for the volatile qualifier as well as the const qualifier and may be given for arbitrary pointer depths (pointers to pointers, pointers to arrays, etc.). -If the number of pointer levels exceeds one, things get murky in a hurry. For example:

-

-    const char ** ppc;
-    char ** pp;
-    pp = ppc; /* 605 - clearly not safe */
-    ppc = pp; /* 605 - looks safe but it's not */
-
-

It was not realized by the C community until very recently that assigning pp to ppc was dangerous. The problem is that after the above assignment, a pointer to a const char can be assigned indirectly through ppc and accessed through pp which can then modify the const char. -The message speaks of an "increase in capability" in assigning to ppc, which seems counter intuitive because the indirect pointer has less capability. However, assigning the pointer does not destroy the old one and the combination of the two pointers represents a net increase in capability. -The message may also be given for function pointer assignments when the prototype of one function contains a pointer of higher capability than a corresponding pointer in another prototype. There is a curious inversion here whereby a prototype of lower capability translates into a function of greater trust and hence greater capability (a Trojan Horse). For example, let

-

-    void warrior( char * );
-
-

be a function that destroys its argument. Consider the function:

-

-    void Troy( void (*horse)(const char *) );
-
-

Troy() will call horse() with an argument that it considers precious believing the horse() will do no harm. Before compilers knew better and believing that adding in a const to the destination never hurt anything, earlier compilers allowed the Greeks to pass warrior() to Troy and the rest, as they say, is history.

]]> -
- LINEAR - 1min -
- - 606 - L0606: Non-ANSI escape sequence: '\String' - - - - LINEAR - 1min - - - 607 - L0607: Parameter 'Symbol' of macro found within string - - - - LINEAR - 1min - - - 608 - L0608: Assigning to an array parameter - - - - LINEAR - 1min - - - 609 - L0609: Suspicious pointer conversion - - - - LINEAR - 1min - - - 610 - L0610: Suspicious pointer combination - - - - LINEAR - 1min - - - 611 - L0611: Suspicious cast - - - - LINEAR - 1min - - - 612 - L0612: Expected a declarator - - - - LINEAR - 1min - - - 613 - L0613: Possible use of null pointer 'Symbol' in [left/right] argument to operator 'String' Reference - - - - LINEAR - 1min - - - 614 - L0614: auto aggregate initializer not constant - - - - LINEAR - 1min - - - 615 - L0615: auto aggregate initializer has side effects - - - - LINEAR - 1min - - - 616 - L0616: control flows into case/default - - - - LINEAR - 1min - - - 617 - L0617: String is both a module and an include file - - - - LINEAR - 1min - - - 618 - L0618: Storage class specified after a type - - - - LINEAR - 1min - - - 619 - L0619: Loss of precision (Context) (Pointer to Pointer) - - - - LINEAR - 1min - - - 620 - L0620: Suspicious constant (L or one?) - - - - LINEAR - 1min - - - 621 - L0621: Identifier clash (Symbol 'Name' with Symbol 'Name' at String) - - - - LINEAR - 1min - - - 622 - L0622: Size of argument no. Integer inconsistent with format - - - - LINEAR - 1min - - - 623 - L0623: redefining the storage class of symbol 'Symbol' (TypeDiff) conflicts with Location - - - - LINEAR - 1min - - - 624 - L0624: typedef 'Symbol' redeclared (TypeDiff) (Location) - - - - LINEAR - 1min - - - 625 - L0625: auto symbol 'Symbol' has unusual type modifier - - - - LINEAR - 1min - - - 626 - L0626: argument no. Integer inconsistent with format - - - - LINEAR - 1min - - - 627 - L0627: (arg. no. Integer) indirect object inconsistent with format - - - - LINEAR - 1min - - - 628 - L0628: no argument information provided for function 'Symbol' (Location) - - - - LINEAR - 1min - - - 629 - L0629: static class for function 'Symbol' is non standard - - - - LINEAR - 1min - - - 630 - L0630: ambiguous reference to symbol 'Name' - - - - LINEAR - 1min - - - 631 - L0631: tag 'Symbol' defined differently at Location - - - - LINEAR - 1min - - - 632 - L0632: Assignment to strong type 'Name' in context: Context - - - - LINEAR - 1min - - - 633 - L0633: Assignment from a strong type 'Name' in context: Context - - - - LINEAR - 1min - - - 634 - L0634: Strong type mismatch (type 'Symbol') in equality or conditional - - - - LINEAR - 1min - - - 635 - L0635: resetting strong parent of type 'Symbol', old parent == type 'Symbol' - - - - LINEAR - 1min - - - 636 - L0636: ptr to strong type 'Name' versus another type - - - - LINEAR - 1min - - - 637 - L0637: Expected index type 'Symbol' for strong type 'Symbol' - - - - LINEAR - 1min - - - 638 - L0638: Strong type mismatch for type 'Name' in relational - - = <= > < ) violates a Strong type check as requested by a -strong(J... option. This message would have been suppressed using flags "Jr".]]> - - LINEAR - 1min - - - 639 - L0639: Strong type mismatch for type 'Name' in binary operation - - - - LINEAR - 1min - - - 640 - L0640: Expected strong type 'Name' in Boolean context - - - - LINEAR - 1min - - - 641 - L0641: Converting enum to int - - - - LINEAR - 1min - - - 642 - L0642: Format char 'Char' not supported by wsprintf - - - - LINEAR - 1min - - - 643 - L0643: Loss of precision in pointer cast - - - - LINEAR - 1min - - - 644 - L0644: Variable 'Symbol' (Location) may not have been initialized - - - - LINEAR - 1min - - - 645 - L0645: Symbol 'Symbol' (Location) may not have been initialized - - - - LINEAR - 1min - - - 646 - L0646: case/default within Kind loop; may have been misplaced - - - - LINEAR - 1min - - - 647 - L0647: Suspicious truncation - - This message is issued when it appears that there may have been an unintended loss of information during an operation involving int or unsigned int the result of which is later converted to long. It is issued only for systems in which int is smaller than long. For example:

-
-(long) (n << 8)
-
-might elicit this message if n is unsigned int, whereas -
-(long) n << 8
-
-would not. In the first case, the shift is done at int precision and the high order 8 bits are lost even though there is a subsequent conversion to a type that might hold all the bits. In the second case, the shifted bits are retained. -

The operations that are scrutinized and reported upon by this message are: shift left, multiplication, and bit-wise complementation. Addition and subtraction are covered by Informational message 776.</description></rule>

-

The conversion to long may be done explicitly with a cast as shown or implicitly via assignment, return, argument passing or initialization.

-

The message can be suppressed by casting. You may cast one of the operands so that the operation is done in full precision as is given by the second example above. Alternatively, if you decide there is really no problem here (for now or in the future), you may cast the result of the operation to some form of int. For example, you might write:

-
-(long) (unsigned) (n << 8)
-
-In this way PC-lint/FlexeLint will know you are aware of and approve of the truncation. - - ]]> -
- LINEAR - 1min -
- - 648 - L0648: Overflow in computing constant for operation: String - - - - LINEAR - 1min - - - 649 - L0649: Sign fill during constant shift - - - - LINEAR - 1min - - - 650 - L0650: Constant out of range for operator String - - > 4 == 16 ) ... - will receive this warning because the left-hand side is limited to 4 bits of precision.]]> - - LINEAR - 1min - - - 651 - L0651: Potentially confusing initializer - - - - LINEAR - 1min - - - 652 - L0652: #define of symbol 'Symbol' declared previously at Location - - - - LINEAR - 1min - - - 653 - L0653: Possible loss of fraction - - - - LINEAR - 1min - - - 654 - L0654: Option String obsolete; use -width(W,I) - - - - LINEAR - 1min - - - 655 - L0655: bit-wise operation uses (compatible) enum's - - - - LINEAR - 1min - - - 656 - L0656: Arithmetic operation uses (compatible) enum's - - - - LINEAR - 1min - - - 657 - L0657: Unusual (nonportable) anonymous struct or union - - - - LINEAR - 1min - - - 658 - L0658: Anonymous union assumed (use flag +fan) - - - - LINEAR - 1min - - - 659 - L0659: Nothing follows '}' on line within struct/union/enum declaration - - - - LINEAR - 1min - - - 660 - L0660: Option 'String' requests removing an extent that is not on the list - - - - LINEAR - 1min - - - 661 - L0661: possible access of out-of-bounds pointer ('Integer' beyond end of data) by operator 'String' - - -An out-of-bounds pointer may have been accessed. See message 415 for a description of the parameters Integer and String. For example:

-
 
-  int a[10]; 
-  if( n <= 10 ) a[n] = 0;
-
-Here the programmer presumably should have written n<10. This message is similar to messages 415 and 796 but differs from them by the degree of probability. -

References

-

ARR30-C. Do not form or use out-of-bounds pointers or array subscripts

- - ]]> -
- cert - security - BUG - LINEAR - 1min -
- - 662 - L0662: possible creation of out-of-bounds pointer ('Integer' beyond end of data) by operator 'String' - - -An out-of-bounds pointer may have been created. See message 415 for a description of the parameters Integer and String. For example:

-

-  int a[10]; 
-  if( n <= 20 ) f( a + n );
-
-Here, it appears as though an illicit pointer is being created, but PC-lint/FlexeLint cannot be certain. See also messages 416 and 797. -

References

-

ARR30-C. Do not form or use out-of-bounds pointers or array subscripts

- - ]]> -
- cert - security - BUG - LINEAR - 1min -
- - 663 - L0663: Suspicious array to pointer conversion - - a ... - Here, the programmer forgot to index the array but the error normally goes undetected because the array reference is automatically and implicitly converted to a pointer to the first element of the array. If you really mean to access the first element use y[0].a.]]> - - LINEAR - 1min - - - 664 - L0664: Left side of logical OR (||) or logical AND (&&) does not return - - 2 ) ... - Since the exit function does not return, control can never flow to the right hand operator.]]> - - LINEAR - 1min - - - 665 - L0665: Unparenthesized parameter Integer in macro 'Symbol' is passed an expression - - - - LINEAR - 1min - - - 666 - L0666: Expression with side effects passed to repeated parameter Integer of macro 'Symbol' - - - - LINEAR - 1min - - - 667 - L0667: Inconsistent use of qualifiers for symbol 'Symbol' (type 'Type' vs. 'Type') conflicts with Location - - - - LINEAR - 1min - - - 668 - L0668: Possibly passing a null pointer to function 'Symbol', Context Reference - - - - LINEAR - 1min - - - 669 - L0669: Possible data overrun for function 'Symbol', argument Integer exceeds argument Integer Reference - - -This message is for data transfer functions such as memcpy, strcpy, fgets, etc. when the size indicated by the first cited argument (or arguments) can possibly exceed the size of the buffer area cited by the second. The message may also be issued for user functions via the -function option. -

References

-

ARR38-C. Guarantee that library functions do not form invalid pointers

- - ]]> -
- cert - security - BUG - LINEAR - 1min -
- - 670 - L0670: Possible access beyond array for function 'Symbol', argument Integer exceeds Integer Reference - - -This message is issued for several library functions (such as fwrite, memcmp, etc) wherein there is a possible attempt to access more data than exist. For example, if the length of data specified in the fwrite call exceeds the size of the data specified. The function is specified by Symbol and the arguments are identified by argument number. -

References

-

ARR38-C. Guarantee that library functions do not form invalid pointers

- - ]]> -
- cert - security - BUG - LINEAR - 1min -
- - 671 - L0671: Possibly passing to function 'Symbol' a negative value (Integer), Context Reference - - - - LINEAR - 1min - - - 672 - L0672: Possible memory leak in assignment to pointer 'Symbol' - - -An assignment was made to a pointer variable (designated by Symbol) which may already be holding the address of an allocated object which had not been freed. The allocation of memory which is not freed is considered a 'memory leak'. The memory leak is considered 'possible' because only some lines of flow will result in a leak. -

References

-

MEM31-C. Free dynamically allocated memory when no longer needed

- - ]]> -
- cert - security - BUG - LINEAR - 1min -
- - 673 - L0673: Possibly inappropriate deallocation (Name1) for 'Name2' data. - - - - LINEAR - 1min - - - 674 - L0674: Returning address of auto through variable 'Symbol'. - - - - LINEAR - 1min - - - 675 - L0675: No prior semantics associated with 'Name' in option 'String' - - - - LINEAR - 1min - - - 676 - L0676: Possibly negative subscript (Integer) in operator 'String' - - - - LINEAR - 1min - - - 677 - L0677: sizeof used within preprocessor statement. - - - - LINEAR - 1min - - - 678 - L0678: Member 'Symbol' field length (Integer) too small for enum precision (Integer) - - - - LINEAR - 1min - - - 679 - L0679: Suspicious Truncation in arithmetic expression combining with pointer - - - - LINEAR - 1min - - - 680 - L0680: Suspicious Truncation in arithmetic expression converted to pointer - - - - LINEAR - 1min - - - 681 - L0681: Loop is not entered - - - - LINEAR - 1min - - - 682 - L0682: sizeof applied to a parameter 'Symbol' whose type is a sized array - - - - LINEAR - 1min - - - 683 - L0683: function 'Symbol' #define'd - - - - LINEAR - 1min - - - 684 - L0684: Passing address of auto variable 'Symbol' into caller space - - - - LINEAR - 1min - - - 685 - L0685: Relational operator 'String,' always evaluates to 'String' - - -if( (u & 0xFF) > 0xFF ) ... - -will also raise a 685 because the expression on the left hand side has an effective precision of 16 bits. - - ]]> - - LINEAR - 1min - - - 686 - L0686: Option 'String' is suspicious because of 'Name' - - An option is considered suspicious for one of a variety of reasons. The reason is designated by a reason code that is specified by Name. At this writing the following reasons for issuing this message exist:

-
  • unbalanced quotes -- An option was seen with a quote character which was not balanced within that same option.
  • -
  • backtick preceding non-meta character is superfluous and has been dropped -- A backtick (`) was seen before a character other than a * or a ?. The use of a backtick in this fashion has no effect.
  • -
  • Upper case characters within extension 'String'; these will match lower case when +fff is on; try -fff -- A file extension involving capital letters was seen in a +cpp(), +lnt(), or +ext() option while the +fff flag was active. If, for example, you intend for .c to indicate a C module and .C to indicate a C++ module, turning off the fff flag will help avoid unnecessary complaints from Lint.
  • -
  • extraneous characters following String -- One or more characters were seen immediately following a character which is expected to signify the end of an option, such as a closing right parenthesis. While the extraneous characters are ignored, their presence may indicate a typographical error.
  • -
  • missing field-specifier in a non-empty format string [No data will be generated for this category.] -- A -program_info() option was expecting a field-specifier which was actually missing. As noted, no data for this particular category will be generated.
  • -
  • the likelihood of causing meaningless output -- An option,such as -elib(*), -wlib(0), or +fce was seen; this typically hides a problem in the Lint configuration. When using a new Lint configuration, it's common for a user to encounter Error messages from Lint about library header code. (This usually does not indicate a problem with library headers.) For example, a misconfiguration of Lint's preprocessor is by far the most common source of these errors. If you merely suppress basic Syntax Errors (like Error 10) and/or Fatal Errors (like Error 309), the underlying Lint configuration problem still exists; as a result, Lint will fail to parse your code correctly (because your code depends on the aforementioned library code). The output from Lint would then seem illogical and/or meaningless. Therefore, blanket suppression options like this are highly discouraged. Instead, other aspects of the Lint configuration should be modified to make Lint's behavior more similar to that of the compiler at (or, typically, before) the point of the Error.
  • -
  • a lack of an argument -- A -message() was found to not include text between the parentheses, rendering the option meaningless. Did the User possibly intend to include the text immediately after this option?
  • -
]]> -
- LINEAR - 1min -
- - 687 - L0687: Suspicious use of comma operator - - 0 ) n = 1, n = 2; Thus the comma could be mistaken for a semi-colon and hence be the source of subtle bugs. - If the statement is enclosed in curly braces or if the expression is enclosed in parentheses, the message is not issued.]]> - - LINEAR - 1min - - - 688 - L0688: Cast used within a preprocessor conditional statement - - - - LINEAR - 1min - - - 689 - L0689: Apparent end of comment ignored - - - - LINEAR - 1min - - - 690 - L0690: Possible access of pointer pointing Integer bytes past nul character by operator 'String' - - - - LINEAR - 1min - - - 691 - L0691: Suspicious use of backslash - - - - LINEAR - 1min - - - 692 - L0692: Decimal character 'Char' follows octal escape sequence 'String' - - - - LINEAR - 1min - - - 693 - L0693: Hexadecimal digit 'Char' immediately after 'String' is suspicious in string literal. - - - - LINEAR - 1min - - - 694 - L0694: The type of constant 'String' (precision Integer) is dialect dependent - - - - LINEAR - 1min - - - 695 - L0695: Inline function 'Symbol' defined without a storage-class specifier ('static' recommended) - - - - LINEAR - 1min - - - 696 - L0696: Variable 'Symbol' has value 'String' that is out of range for operator 'String' - - - - LINEAR - 1min - - - 697 - L0697: Quasi-boolean values should be equality-compared only with 0 - - - - LINEAR - 1min - - - 698 - L0698: Casual use of realloc can create a memory leak - - - - LINEAR - 1min - - - 701 - L0701: Shift left of signed quantity (int) - - - - MINOR - LINEAR - 1min - - - 702 - L0702: Shift right of signed quantity (int) - - - - MINOR - LINEAR - 1min - - - 703 - L0703: Shift left of signed quantity (long) - - - - MINOR - LINEAR - 1min - - - 704 - L0704: Shift right of signed quantity (long) - - - - MINOR - LINEAR - 1min - - - 705 - L0705: Argument no. Integer nominally inconsistent with format - - - - MINOR - LINEAR - 1min - - - 706 - L0706: (arg. no. Integer) indirect object inconsistent with format - - - - MINOR - LINEAR - 1min - - - 707 - L0707: Mixing narrow and wide string literals in concatenation. - - - - MINOR - LINEAR - 1min - - - 708 - L0708: union initialization - - - - MINOR - LINEAR - 1min - - - 712 - L0712: Loss of precision (Context) (Type to Type) - - -An assignment (or implied assignment, see Context) is being made between two integral quantities in which the first Type is larger than the second Type. A cast will suppress this message. -

References

-

INT31-C. Ensure that integer conversions do not result in lost or misinterpreted data

- - ]]> -
- cert - MINOR - LINEAR - 1min -
- - 713 - L0713: Loss of precision (Context) (Type to Type) - - - - MINOR - LINEAR - 1min - - - 714 - L0714: Symbol 'Symbol' (Location) not referenced - - - - MINOR - LINEAR - 1min - - - 715 - L0715: Symbol 'Symbol' (Location) not referenced - - - - MINOR - LINEAR - 1min - - - 716 - L0716: while(1) ... - - - - MINOR - LINEAR - 1min - - - 717 - L0717: do ... while(0) - - 0) f(3); else f(2); - Thus, if you are doing this deliberately use -e717]]> - - MINOR - LINEAR - 1min - - - 718 - L0718: Symbol 'Symbol' undeclared, assumed to return int - - - - MINOR - LINEAR - 1min - - - 719 - L0719: Too many arguments for format (Integer too many) - - - - MINOR - LINEAR - 1min - - - 720 - L0720: Boolean test of assignment - - - - MINOR - LINEAR - 1min - - - 721 - L0721: Suspicious use of ; - - - - MINOR - LINEAR - 1min - - - 722 - L0722: Suspicious use of ; - - - - MINOR - LINEAR - 1min - - - 723 - L0723: Suspicious use of = - - - - MINOR - LINEAR - 1min - - - 725 - L0725: Expected positive indentation from Location - - - - MINOR - LINEAR - 1min - - - 726 - L0726: Extraneous comma ignored - - - - MINOR - LINEAR - 1min - - - 727 - L0727: Symbol 'Symbol' (Location) not explicitly initialized - - - - MINOR - LINEAR - 1min - - - 728 - L0728: Symbol 'Symbol' (Location) not explicitly initialized - - - - MINOR - LINEAR - 1min - - - 729 - L0729: Symbol 'Symbol' (Location) not explicitly initialized - - - - MINOR - LINEAR - 1min - - - 730 - L0730: Boolean argument to function - - - - MINOR - LINEAR - 1min - - - 731 - L0731: Boolean argument to equal/not equal - - b) == (c > d) ) ... - tests to see if the inequalities are of the same value. This could be an error as it is an unusual use of a Boolean (see Warnings 503 and 514) but it may also be deliberate since this is the only way to efficiently achieve equivalence or exclusive or. Because of this possible use, the construct is given a relatively mild 'informational' classification. If the Boolean argument is cast to some type, this message is not given.]]> - - MINOR - LINEAR - 1min - - - 732 - L0732: Loss of sign (Context) (Type to Type) - - -An assignment (or implied assignment, see Context) is made from a signed quantity to an unsigned quantity. Also, it could not be determined that the signed quantity had no sign. For example: - u = n; /* Info 732 */ - u = 4; /* OK */ -where u is unsigned and n is not, warrants a message only for the first assignment, even though the constant 4 is nominally a signed int. -Make sure that this is not an error (that the assigned value is never negative) and then use a cast (to unsigned) to remove the message. -

References

-

INT31-C. Ensure that integer conversions do not result in lost or misinterpreted data

- - ]]> -
- cert - MINOR - LINEAR - 1min -
- - 733 - L0733: Assigning address of auto variable 'Symbol' to outer scope symbol 'Symbol' - - - - MINOR - LINEAR - 1min - - - 734 - L0734: Loss of precision (Context) (Integer bits to Integer bits) - - -An assignment is being made into an object smaller than an int. The information being assigned is derived from another object or combination of objects in such a way that information could potentially be lost. The number of bits given does not count the sign bit. For example if ch is a char and n is an int then: - ch = n; -will trigger this message whereas: - ch = n & 1; -will not. To suppress the message a cast can be made as in: - ch = (char) n; -You may receive notices involving multiplication and shift operators with subinteger variables. For example: - ch = ch << 2 - ch = ch * ch -where, for example, ch is an unsigned char. These can be suppressed by using the flag +fpm (precision of an operator is bound by the maximum of its operands). -

References

-

INT31-C. Ensure that integer conversions do not result in lost or misinterpreted data

- - ]]> -
- cert - MINOR - LINEAR - 1min -
- - 735 - L0735: Loss of precision (Context) (Integer bits to Integer bits) - - - - MINOR - LINEAR - 1min - - - 736 - L0736: Loss of precision (Context) (Integer bits to Integer bits) - - - - MINOR - LINEAR - 1min - - - 737 - L0737: Loss of sign in promotion from Type to Type - - - - MINOR - LINEAR - 1min - - - 738 - L0738: Symbol 'Symbol' (Location) not explicitly initialized - - - - MINOR - LINEAR - 1min - - - 739 - L0739: Trigraph Sequence 'String' in literal (Quiet Change) - - - - MINOR - LINEAR - 1min - - - 740 - L0740: Unusual pointer cast (incompatible indirect types) - - - - MINOR - LINEAR - 1min - - - 741 - L0741: Unusual pointer cast (function qualification) - - - - MINOR - LINEAR - 1min - - - 742 - L0742: Multiple character constant - - - - MINOR - LINEAR - 1min - - - 743 - L0743: Negative character constant - - - - MINOR - LINEAR - 1min - - - 744 - L0744: switch statement has no default - - - - MINOR - LINEAR - 1min - - - 745 - L0745: function 'Name' has no explicit type or class, int assumed - - - - MINOR - LINEAR - 1min - - - 746 - L0746: call to function 'Name' not made in the presence of a prototype - - - - MINOR - LINEAR - 1min - - - 747 - L0747: Significant prototype coercion (Context) Type to Type - - - - MINOR - LINEAR - 1min - - - 748 - L0748: Symbol 'Symbol' (Location) is a register variable used with setjmp - - - - MINOR - LINEAR - 1min - - - 749 - L0749: local enumeration constant 'Symbol' (Location) not referenced - - - - MINOR - LINEAR - 1min - - - 750 - L0750: local macro 'Symbol' (Location) not referenced - - - - MINOR - LINEAR - 1min - - - 751 - L0751: local typedef 'Symbol' (Location) not referenced - - - - MINOR - LINEAR - 1min - - - 752 - L0752: local declarator 'Symbol' (Location) not referenced - - - - MINOR - LINEAR - 1min - - - 753 - L0753: local struct, union or enum tag 'Symbol' (Location) not referenced - - - - MINOR - LINEAR - 1min - - - 754 - L0754: local structure member 'Symbol' (Location) not referenced - - - - MINOR - LINEAR - 1min - - - 755 - L0755: global macro 'Symbol' (Location) not referenced - - - - MINOR - LINEAR - 1min - - - 756 - L0756: global typedef 'Symbol' (Location) not referenced - - - - MINOR - LINEAR - 1min - - - 757 - L0757: global declarator 'Symbol' (Location) not referenced - - - - MINOR - LINEAR - 1min - - - 758 - L0758: global struct, union or enum tag 'Symbol' (Location) not referenced - - - - MINOR - LINEAR - 1min - - - 759 - L0759: header declaration for symbol 'Symbol' (Location) could be moved from header to module - - - - MINOR - LINEAR - 1min - - - 760 - L0760: Redundant macro 'Symbol' defined identically at Location - - - - MINOR - LINEAR - 1min - - - 761 - L0761: Redundant typedef 'Symbol' previously declared at Location - - - - MINOR - LINEAR - 1min - - - 762 - L0762: Redundantly declared symbol 'Symbol' previously declared at Location - - - - MINOR - LINEAR - 1min - - - 763 - L0763: Redundant declaration for symbol 'Symbol' previously declared at Location - - - - MINOR - LINEAR - 1min - - - 764 - L0764: switch statement does not have a case - - - - MINOR - LINEAR - 1min - - - 765 - L0765: external 'Symbol' (Location) could be made static - - - - MINOR - LINEAR - 1min - - - 766 - L0766: Header file FileName not used in module String - - - - MINOR - LINEAR - 1min - - - 767 - L0767: macro 'Symbol' was defined differently in another module (Location) - - - - MINOR - LINEAR - 1min - - - 768 - L0768: vglobal struct member 'Symbol' (Location) not referenced - - - - MINOR - LINEAR - 1min - - - 769 - L0769: global enumeration constant 'Symbol' (Location) not referenced - - - - MINOR - LINEAR - 1min - - - 770 - L0770: tag 'Symbol' defined identically at Location - - - - MINOR - LINEAR - 1min - - - 771 - L0771: Symbol 'Symbol' (Location) conceivably not initialized - - - - MINOR - LINEAR - 1min - - - 772 - L0772: Symbol 'Symbol' (Location) conceivably not initialized - - - - MINOR - LINEAR - 1min - - - 773 - L0773: Expression-like macro 'Symbol' not parenthesized - - - - MINOR - LINEAR - 1min - - - 774 - L0774: Boolean within 'String' always evaluates to [True/False] - - - - MINOR - LINEAR - 1min - - - 775 - L0775: non-negative quantity cannot be less than zero - - - - MINOR - LINEAR - 1min - - - 776 - L0776: Possible truncation of addition - - - - MINOR - LINEAR - 1min - - - 777 - L0777: Testing float's for equality - - - - MINOR - LINEAR - 1min - - - 778 - L0778: Constant expression evaluates to 0 in operation: String - - - - MINOR - LINEAR - 1min - - - 779 - L0779: String constant in comparison operator: Operator - - - - MINOR - LINEAR - 1min - - - 780 - L0780: Vacuous array element - - - - MINOR - LINEAR - 1min - - - 782 - L0782: Line exceeds Integer characters - - - - MINOR - LINEAR - 1min - - - 783 - L0783: Line does not end with new-line - - - - MINOR - LINEAR - 1min - - - 784 - L0784: Nul character truncated from string - - - - MINOR - LINEAR - 1min - - - 785 - L0785: Too few initializers for aggregate 'Symbol' - - - - MINOR - LINEAR - 1min - - - 786 - L0786: String concatenation within initializer - - - - MINOR - LINEAR - 1min - - - 787 - L0787: enum constant 'Symbol' not used within switch - - - - MINOR - LINEAR - 1min - - - 788 - L0788: enum constant 'Symbol' not used within defaulted switch - - - - MINOR - LINEAR - 1min - - - 789 - L0789: Assigning address of auto variable 'Symbol' to static - - - - MINOR - LINEAR - 1min - - - 790 - L0790: Suspicious truncation, integral to float. - - - - MINOR - LINEAR - 1min - - - 791 - L0791: unusual option sequence - - - - MINOR - LINEAR - 1min - - - 792 - L0792: void cast of void expression - - - - MINOR - LINEAR - 1min - - - 793 - L0793: ANSI limit of String 'String' 'Name' exceeded -- processing is unaffected - - - - MINOR - LINEAR - 1min - - - 794 - L0794: Conceivable use of null pointer 'Symbol' in [left/right] argument to operator 'String' Reference - - - - MINOR - LINEAR - 1min - - - 795 - L0795: Conceivable division by 0 - - - - MINOR - LINEAR - 1min - - - 796 - L0796: Conceivable access of out-of-bounds pointer ('Integer' beyond end of data) by operator 'String' - - -An out-of-bounds pointer may conceivably have been accessed. See message 415 for a description of the parameters Integer and String. For example:

-

-  int a[10]; 
-  int j = 100; 
-  for( i = 0; i < n; i++ ) 
-    j = n; 
-  a[j] = 0;
-
-Here, the access to a[j] is flagged because it is conceivable that the for loop is not executed leaving the unacceptable index of 100 in variable j. This message is similar to messages 415 and 661 but differing from them by the degree of probability. -

References

-

ARR30-C. Do not form or use out-of-bounds pointers or array subscripts

- - ]]> -
- cert - security - MINOR - BUG - LINEAR - 1min -
- - 797 - L0797: Conceivable creation of out-of-bounds pointer ('Integer' beyond end of data) by operator 'String' - - -An out-of-bounds pointer is potentially being created. See message 415 for a description of the parameters Integer and String. See message 796 for an example of how a probability can be considered 'conceivable'. -

References

-

ARR30-C. Do not form or use out-of-bounds pointers or array subscripts

- - ]]> -
- cert - security - MINOR - BUG - LINEAR - 1min -
- - 798 - L0798: Redundant character 'Char' - - - - MINOR - LINEAR - 1min - - - 799 - L0799: numerical constant 'Integer' larger than unsigned long - - - - MINOR - LINEAR - 1min - - - 801 - L0801: Use of goto is deprecated - - - - brain-overload - misra - MINOR - LINEAR - 1min - - - 802 - L0802: Conceivably passing a null pointer to function 'Symbol', Context Reference - - - - MINOR - LINEAR - 1min - - - 803 - L0803: Conceivable data overrun for function 'Symbol', argument Integer exceeds argument Integer Reference - - -This message is for data transfer functions such as memcpy, strcpy, fgets, etc. when the size indicated by the first cited argument (or arguments) can conceivably exceed the size of the buffer area cited by the second. The message may also be issued for user functions via the -function option. -

References

-

ARR30-C. Do not form or use out-of-bounds pointers or array subscripts

-

ARR38-C. Guarantee that library functions do not form invalid pointers

- - ]]> -
- cert - security - MINOR - BUG - LINEAR - 1min -
- - 804 - L0804: Conceivable access beyond array for function 'Symbol', argument Integer exceeds Integer Reference - - -This message is issued for several library functions (such as fwrite, memcmp, etc) wherein there is conceivably an attempt to access more data than exist. For example, if the length of data specified in the fwrite call can exceed the size of the data specified. The function is specified by Symbol and the arguments are identified by argument number. -

References

-

ARR30-C. Do not form or use out-of-bounds pointers or array subscripts

-

ARR38-C. Guarantee that library functions do not form invalid pointers

- - ]]> -
- cert - security - MINOR - BUG - LINEAR - 1min -
- - 805 - L0805: Expected L"..." to initialize wide char string - - - - MINOR - LINEAR - 1min - - - 806 - L0806: Small bit field is signed rather than unsigned - - 0 ) /* should succeed but actually fails */ ...]]> - - MINOR - LINEAR - 1min - - - 807 - L0807: Conceivably passing to function 'Symbol' a negative value (Integer), Context Reference - - - - MINOR - LINEAR - 1min - - - 808 - L0808: No explicit type given symbol 'Sybmol', assumed int - - - - MINOR - LINEAR - 1min - - - 809 - L0809: Possible return of address of auto through variable 'Symbol' - - - - MINOR - LINEAR - 1min - - - 810 - L0810: Arithmetic modification of custodial pointer 'Symbol' - - - - MINOR - LINEAR - 1min - - - 811 - L0811: Possible deallocation of pointer alias - - - - MINOR - LINEAR - 1min - - - 812 - L0812: static variable 'Symbol' has size 'Integer' - - - - MINOR - LINEAR - 1min - - - 813 - L0813: auto variable 'Symbol' in function 'Symbol' has size 'Integer' - - - - MINOR - LINEAR - 1min - - - 814 - L0814: useless declaration - - - - MINOR - LINEAR - 1min - - - 815 - L0815: Arithmetic modification of unsaved pointer - - - - MINOR - LINEAR - 1min - - - 816 - L0816: Non-ANSI format specification - - - - MINOR - LINEAR - 1min - - - 817 - L0817: Conceivably negative subscript (Integer) in operator 'String' - - - - MINOR - LINEAR - 1min - - - 818 - L0818: Pointer parameter 'Symbol' (Location) could be declared ptr to const - - - - MINOR - LINEAR - 1min - - - 820 - L0820: Boolean test of a parenthesized assignment - - - - MINOR - LINEAR - 1min - - - 821 - L0821: Right hand side of assignment not parenthesized - - - - MINOR - LINEAR - 1min - - - 825 - L0825: control flows into case/default without -fallthrough comment - - - - MINOR - LINEAR - 1min - - - 826 - L0826: Suspicious pointer-to-pointer conversion (area too small) - - - - MINOR - LINEAR - 1min - - - 827 - L0827: Loop not reachable - - - - MINOR - LINEAR - 1min - - - 828 - L0828: Semantics of function 'Name' copied to function 'Name' - - - - MINOR - LINEAR - 1min - - - 829 - L0829: A +headerwarn option was previously issued for header 'Symbol - - - - MINOR - LINEAR - 1min - - - 830 - L0830: Location cited in prior message - - - - MINOR - LINEAR - 1min - - - 831 - L0831: Reference cited in prior message - - - - MINOR - LINEAR - 1min - - - 832 - L0832: Parameter 'Symbol' not explicitly declared, int assumed - - - - MINOR - LINEAR - 1min - - - 833 - L0833: Symbol 'Symbol' is typed differently (String) in another module, Location, - - - - MINOR - LINEAR - 1min - - - 834 - L0834: Operator 'Name' followed by operator 'Name' is confusing. Use parentheses. - - - - MINOR - LINEAR - 1min - - - 835 - L0835: A zero has been given as [left/right] argument to operator 'Name' - - > and the unary operators - and +. - An enumeration constant whose value is 0 is permitted with operators: + - >> << Otherwise a message is issued. For example: enum color { red, blue = red+100, /* ok */ green= red*0x10 /* 835 */ }; The assignment operators that have an arithmetic or bitwise component, such as |=, are also examined. The message given is equivalent to that given with the same operator without the assignment component.]]> - - MINOR - LINEAR - 1min - - - 836 - L0836: Conceivable access of pointer pointing Integer bytes past nul character by operator 'String' - - - - MINOR - LINEAR - 1min - - - 838 - L0838: Previously assigned value to variable 'Symbol' has not been used - - 0 ) y = 2; y = 4; // Info 838 ... Here we can report that the assignment of 4 to y obliterates previously assigned values that were not used. We, of course, cannot report anything unusual about the assignment of 2. This will assign over a prior value of 1 that so far had not been used but the existence of an alternative path means that the value of 1 can still be employed later in the code and is accepted for the time being as reasonable. It is only the final assignment that raises alarm bells. See also Warning 438 in Section 13.3.]]> - - MINOR - LINEAR - 1min - - - 839 - L0839: Storage class of symbol 'Symbol' assumed static (Location) - - - - MINOR - LINEAR - 1min - - - 840 - L0840: Use of nul character in a string literal - - - - MINOR - LINEAR - 1min - - - 843 - L0843: Variable 'Symbol' (Location) could be declared as const - - - - MINOR - LINEAR - 1min - - - 844 - L0844: Pointer variable 'Symbol' (Location) could be declared as pointing to const - - - - MINOR - LINEAR - 1min - - - 845 - L0845: The [left/right] argument to operator 'Name' is certain to be 0 - - > && The reason that the left hand side of operator + (and friends) is not examined for zero is that zero is the identity operation for those operators and hence is often used as an initializing value. For example: sum = 0; for( ... ) sum = sum + what_ever; // OK, no message The message is not issued for arithmetic constant zeros. Info 835 in Section 13.4 is issued in that instance. - The message is also suspended when the expression has side-effects. For example: i = 0; buf[i++] = 'A'; We don't consider it reasonable to force the programmer to write: buf[0] = 'A'; i = 1;]]> - - MINOR - LINEAR - 1min - - - 846 - L0846: Signedness of bit-field is implementation defined - - - - MINOR - LINEAR - 1min - - - 847 - L0847: Thread 'Symbol' has unprotected call to thread unsafe function 'Symbol' - - - - MINOR - LINEAR - 1min - - - 848 - L0848: Worst case function for stack usage: String - - - - MINOR - LINEAR - 1min - - - 849 - L0849: Symbol 'Symbol' has same enumerator value 'String' as enumerator 'Symbol' - - - - MINOR - LINEAR - 1min - - - 850 - L0850: for loop index variable 'Symbol' whose type category is 'String' modified in body of the for loop that began at 'String' - - - - MINOR - LINEAR - 1min - - - 864 - L0864: Expression involving variable 'Symbol' possibly depends on order of evaluation - - - - MINOR - LINEAR - 1min - - - 866 - L0866: Unusual use of 'String' in argument to sizeof - - -memcpy( p, &b1, sizeof(&b1) ); // 866; intended to take sizeof(b1) -size_t s3 = sizeof(A[0]); // OK, get the size of an element. size_t s4 = sizeof(A[2]); // 866; Not incorrect, but ... // unusual in a sizeof(). - - - ]]> - - MINOR - LINEAR - 1min - - - 867 - L0867: Unrecognized pragma 'Name' will be ignored - - - - MINOR - LINEAR - 1min - - - 900 - L0900: Successful completion, 'Integer' messages produced - - - - INFO - LINEAR - 1min - - - 904 - L0904: Return statement before end of function 'Symbol' - - - - INFO - LINEAR - 1min - - - 905 - L0905: Non-literal format specifier used (with arguments) - - - - INFO - LINEAR - 1min - - - 909 - L0909: Implicit conversion from Type to bool - - - - INFO - LINEAR - 1min - - - 910 - L0910: Implicit conversion (Context) from 0 to pointer - - - - INFO - LINEAR - 1min - - - 911 - L0911: Implicit expression promotion from Type to Type - - - - INFO - LINEAR - 1min - - - 912 - L0912: Implicit binary conversion from Type to Type - - - - INFO - LINEAR - 1min - - - 913 - L0913: Implicit adjustment of expected argument type from Type to Type - - - - INFO - LINEAR - 1min - - - 914 - L0914: Implicit adjustment of function return value from Type to Type - - - - INFO - LINEAR - 1min - - - 915 - L0915: Implicit conversion (Context) Type to Type - - - - INFO - LINEAR - 1min - - - 916 - L0916: Implicit pointer assignment conversion (Context) - - - - INFO - LINEAR - 1min - - - 917 - L0917: Prototype coercion (Context) Type to Type - - - - INFO - LINEAR - 1min - - - 918 - L0918: Prototype coercion (Context) of pointers - - - - INFO - LINEAR - 1min - - - 919 - L0919: Implicit conversion (Context) Type to Type - - - - INFO - LINEAR - 1min - - - 920 - L0920: Cast from Type to void - - - - INFO - LINEAR - 1min - - - 921 - L0921: Cast from Type to Type - - - - INFO - LINEAR - 1min - - - 922 - L0922: Cast from Type to Type - - - - INFO - LINEAR - 1min - - - 923 - L0923: Cast from Type to Type - - - - INFO - LINEAR - 1min - - - 924 - L0924: Cast from Type to Type - - - - INFO - LINEAR - 1min - - - 925 - L0925: Cast from pointer to pointer - - - - INFO - LINEAR - 1min - - - 926 - L0926: Cast from pointer to pointer - - - - INFO - LINEAR - 1min - - - 927 - L0927: Cast from pointer to pointer - - - - INFO - LINEAR - 1min - - - 928 - L0928: Cast from pointer to pointer - - - - INFO - LINEAR - 1min - - - 929 - L0929: Cast from pointer to pointer - - - - INFO - LINEAR - 1min - - - 930 - L0930: Cast from Type to Type - - - - INFO - LINEAR - 1min - - - 931 - L0931: Both sides have side effects - - - - INFO - LINEAR - 1min - - - 932 - L0932: Passing near pointer to library function '(Symbol)' (Context) - - - - INFO - LINEAR - 1min - - - 933 - L0933: Passing near pointer to far function (Context) - - - - INFO - LINEAR - 1min - - - 934 - L0934: Taking address of near auto variable 'Symbol' (Context) - - - - INFO - LINEAR - 1min - - - 935 - L0935: int within struct - - - - INFO - LINEAR - 1min - - - 936 - L0936: old-style function definition for function 'Symbol' - - - - INFO - LINEAR - 1min - - - 937 - L0937: old-style function declaration for function 'Symbol' - - - - INFO - LINEAR - 1min - - - 938 - L0938: parameter 'Symbol' not explicitly declared - - - - INFO - LINEAR - 1min - - - 939 - L0939: return type defaults to int for function 'Symbol' - - - - INFO - LINEAR - 1min - - - 940 - L0940: omitted braces within an initializer - - -int a[2][2] = { 1, 2, 3, 4 }; - -This is legal C but may violate local programming standards. The worst violations are covered by Warning 651. - - ]]> - - INFO - LINEAR - 1min - - - 941 - L0941: Result 0 due to operand(s) equaling 0 in operation 'String' - - - - INFO - LINEAR - 1min - - - 942 - L0942: Possibly truncated addition promoted to float - - - - INFO - LINEAR - 1min - - - 943 - L0943: Too few initializers for aggregate 'Symbol' - - - - INFO - LINEAR - 1min - - - 944 - L0944: [left/right/] argument for operator 'String' always evaluates to [True/False] - - - - INFO - LINEAR - 1min - - - 945 - L0945: Undefined struct used with extern - - - - INFO - LINEAR - 1min - - - 946 - L0946: Relational or subtract operator applied to pointers - - - - INFO - LINEAR - 1min - - - 947 - L0947: Subtract operator applied to pointers - - - - INFO - LINEAR - 1min - - - 948 - L0948: Operator 'String' always evaluates to [True/False] - - - - INFO - LINEAR - 1min - - - 950 - L0950: Non-ANSI reserved word or construct: 'Symbol' - - - - INFO - LINEAR - 1min - - - 951 - L0951: Pointer to incomplete type 'Symbol' employed in operation - - - - INFO - LINEAR - 1min - - - 952 - L0952: Parameter 'Symbol' (Location) could be declared const - - -int f( char *p, int n ) { return *p = n; } - -can be redeclared as: -
-int f( char * const p, const int n ) { return *p = n; }
-
-There are few advantages to declaring an unchanging parameter a const. It signals to the person reading the code that a parameter is unchanging, but, in the estimate of most, reduces legibility. For this reason the message has been given an Elective Note status. -However, there is a style of programming that encourages declaring parameters const. For the above example, this style would declare f as -
-int f( char * p, int n);
-
-and would use the const qualifier only in the definition. Note that the two forms are compatible according to the standard. The declaration is considered the interface specification where the const's do not matter. The const's do matter in the definition of the function which is considered the implementation. Message 952 could be used to support this style. -Marking a parameter as const does not affect the type of argument that can be passed to the parameter. In particular, it does not mean that only const arguments may be passed. This is in contrast to declaring a parameter as pointer to const or reference to const. For these situations, Informational messages are issued (818 and 1764 respectively) and these do affect the kinds of arguments that may be passed. See also messages 953 and 954. - - ]]> -
- INFO - LINEAR - 1min -
- - 953 - L0953: Variable 'Symbol' (Location) could be declared as const - - - - INFO - LINEAR - 1min - - - 954 - L0954: Pointer variable 'Symbol' (Location) could be declared as pointing to a const - - - - INFO - LINEAR - 1min - - - 955 - L0955: Parameter name missing from prototype for function 'Symbol' - - - - INFO - LINEAR - 1min - - - 956 - L0956: Non const, non volatile static or external variable 'Symbol' - - - - INFO - LINEAR - 1min - - - 957 - L0957: Function 'Symbol' defined without a prototype in scope - - - - INFO - LINEAR - 1min - - - 958 - L0958: Padding of Integer byte(s) is required to align member on Integer byte boundary - - - - INFO - LINEAR - 1min - - - 959 - L0959: Nominal struct size (Integer bytes) is not an even multiple of the maximum member alignment (Integer bytes) - - - - INFO - LINEAR - 1min - - - 960 - L0960: Violates MISRA Year Required Rule Name, String - - MISRA is the "Guidelines for the use of the C Language in Vehicle Based Software". [10] The first version of the MISRA Standard was released in 1998 and the second in 2004. Lint references the rules from each version of the Standard using integers for 1998 and in decimal form for 2004, as per the Standard numbering style.

-

The list of required checks made for both MISRA 1998 and 2004 are:

-

-       (Rule 16/12.12) Bit representation of a floating point type used.
-       (Rule 19/7.1) Octal constant used.
-       (Rule 22/8.7) Could define variable at block scope.
-       (Rule 27/8.8) Object/function previously declared.
-       (Rule 32/9.3) Should initialize either all enum members or only the first.
-       (Rule 33/12.4) Side effects on right hand side of logical operator.
-       (Rule 34/12.5) Non-primary expression used with logical operator.
-       (Rule 36/12.6) Boolean expression required for operator.
-       (Rule 40/12.3) 'sizeof' used on expressions with side effect
-       (Rule 42/12.10) Comma operator used outside of 'for' expression.
-       (Rule 47/12.1) Dependence placed on C operator precedence.
-       (Rule 54/14.3) Null statement not in line by itself.
-       (Rule 57/14.5) continue statement should not be used.
-       (Rules 59/14.8 & 14.9) Left brace expected for if, else, for, do, and while.
-       (Rule 60/14.10) No 'else' at end of 'if ... else if' chain.
-       (Rule 63/15.4) Boolean value in switch expression.
-       (Rule 65/13.4) Floating point variable used as loop counter.
-       (Rule 68/8.6) Function not declared at file scope.
-       (Rule 69/16.1) Function has variable number of arguments.
-       (Rule 73/16.3) Either all parameters or no parameters should have identifiers.
-       (Rule 74/16.4) Parameter list differs from prior declaration for function.
-       (Rule 87/19.1) Declaration before #include.
-       (Rule 88/19.2) Header file name with non-standard character.
-       (Rule 91/19.5) '#define/#undef' used within a block.
-       (Rule 92/19.6) Use of '#undef' prohibited.
-       (Rule 98/19.12) Multiple use of '#' and/or '##' operators in macro definition.
-       (Rule 100/19.14) Non-standard use of 'defined' preprocessor operator.
-       (Rule 115/20.2) Re-use of C90 identifier/identifier pattern.
-
-       Required checks made exclusively for MISRA 1998 are:
-
-       (Rule 8) Multibyte characters and wide string literals prohibited.
-       (Rule 42) Comma operator used outside of 'for' expression.
-       (Rule 54) Null statement not in line by itself.
-       (Rule 58) break used outside of a switch.
-       (Rule 73) Either all parameters or no parameters should have identifiers.
-       (Rule 87) Declaration before #include.
-       (Rule 88) Header file name contains non-standard character.
-       (Rule 110) Bitfields inside union.
-
-       Required checks made exclusively for MISRA 2004 are:
-
-       (Rule 4.1) Prohibited escape sequence used.
-       (Rule 6.1) Disallowed use of non-character value.
-       (Rule 6.2) Disallowed use of non-numeric value.
-       (Rule 8.5) No definitions of objects or function in header files.
-       (Rules 10.1 & 10.2) Prohibited implicit conversion.
-       (Rules 10.3 & 10.4) Prohibited cast of complex expressions.
-       (Rule 10.5) Recasting required for operators '~' and '<<'.
-       (Rule 10.6) Unsigned integer literals require a 'U' suffix.
-       (Rule 11.5) Attempt to cast away const/volatile from a pointer or reference.
-
-       (Rule 12.7) Bitwise operator applied to signed underlying type.
-       (Rule 12.9) Prohibited operator applied to unsigned underlying type.
-       (Rule 12.10) Comma operator used.
-       (Rule 12.13) Increment or decrement combined with another operator.
-       (Rule 14.3) Null statement not in line by itself.
-       (Rule 14.6) More than one 'break' terminates loop.
-       (Rule 14.8) Left brace expected.
-       (Rule 16.3) All parameters shall have identifiers.
-       (Rule 16.9) Function identifier used without '&' or parenthesized parameter list.
-       (Rule 17.4) Pointer arithmetic other than array indexing used.
-
-
-       (Rule 18.4) Unions shall not be used.
-       (Rule 19.13) '#/##' operator used in macro.
-
- -

MISRA 1998 checking is achieved using the -misra(1) option. For -MISRA 2004 checks, use -misra(2)

- -

You may disable individual rules to your taste by using the Rule number in an esym option.

For example:

-

-    -esym( 960, 75, 8? )
-
-

will suppress MISRA rules 75 and any of the those between 80 and 89 inclusive that are issued as the result of a 960. See [10] for information on the MISRA guidelines.

-]]> -
- INFO - LINEAR - 1min -
- - 961 - L0961: Violates MISRA Year Advisory Rule Name, String" - - This message is issued for some violations of the MISRA advisory guidelines. Certain rules were advisories in the 1998 Standard and became required for the 2004 Standard and vice versa. Therefore, you might see some rules repeated here already listed above for message 960.

-

The list of advisory checks made for both MISRA 1998 and 2004 are: - (Rule 47/12.1) Dependence placed on C's operator precedence (Rule 87/19.1) Only preprocessor statements and comments before '#include'. (Rule 93/19.7) Use of function-like macros is discouraged. (Rule 102/17.5) More than two pointer indirection levels used. - Advisory checks made exclusively for MISRA 1998 are: - (Rule 18) Constant requires numerical suffix (Rule 28) 'register' class discouraged (Rule 40) 'sizeof' used on expressions with side effect (Rule 44) Redundant explicit casting (Rule 55) Non-case label (Rule 60) No 'else' at end of 'if ... else if' chain. (Rule 63) Boolean value in switch expression (Rule 92) Use of '#undef' is discouraged - Advisory checks made exclusively for MISRA 2004 are: - (Rule 19.2) Header file name contains non-standard character. (Rule 19.13) No use of '#' or '##'. - Messages can be suppressed based on rule number. See also Message 960.

]]> -
- INFO - LINEAR - 1min -
- - 962 - L0962: Macro 'Symbol' defined identically at another location (Location) - - - - INFO - LINEAR - 1min - - - 963 - L0963: Qualifier const or volatile follows/precedes a type; use -fqb/+fqb to reverse the test - - - - INFO - LINEAR - 1min - - - 964 - L0964: Header file FileName not directly used in module String - - - - INFO - LINEAR - 1min - - - 966 - L0966: Indirectly included header file 'FileName' not used by module 'String' - - - - INFO - LINEAR - 1min - - - 967 - L0967: Header file 'FileName' does not have a standard include guard - - - - INFO - LINEAR - 1min - - - 970 - L0970: Use of modifier or type 'Name' outside of a typedef - - - - INFO - LINEAR - 1min - - - 971 - L0971: Use of 'char' without 'signed' or 'unsigned' - - - - INFO - LINEAR - 1min - - - 973 - L0973: Unary operator in macro 'Symbol' not parenthesized - - - - INFO - LINEAR - 1min - - - 974 - L0974: Worst case function for stack usage: String - - - - INFO - LINEAR - 1min - - - 975 - L0975: Unrecognized pragma 'Name' will be ignored - - - - INFO - LINEAR - 1min - - - 1001 - L1001: Scope 'Name' must be a struct or class name - - - - CRITICAL - LINEAR - 1min - - - 1002 - L1002: 'this' must be used in class member function - - - - CRITICAL - LINEAR - 1min - - - 1003 - L1003: 'this' may not be used in a static member function - - - - CRITICAL - LINEAR - 1min - - - 1004 - L1004: Expected a pointer to member after .* or ->* - - * operators require pointer to members on the right hand side. [11, ?5.5]]]> - - CRITICAL - LINEAR - 1min - - - 1005 - L1005: Destructor declaration requires class - - - - CRITICAL - LINEAR - 1min - - - 1006 - L1006: Language feature 'String' not supported - - - - CRITICAL - LINEAR - 1min - - - 1007 - L1007: Pure specifier for function 'Symbol' requires a virtual function - - - - CRITICAL - LINEAR - 1min - - - 1008 - L1008: Expected '0' to follow '=', text ignored - - - - CRITICAL - LINEAR - 1min - - - 1009 - L1009: operator String not redefinable - - The three operators:

-

-        .*   ?   .
-
-

are not redefinable and may not be overloaded [11, 13.4].

]]> -
- CRITICAL - LINEAR - 1min -
- - 1010 - L1010: Expected a type or an operator - - - - CRITICAL - LINEAR - 1min - - - 1011 - L1011: Conversion Type Name too long - - - - CRITICAL - LINEAR - 1min - - - 1012 - L1012: Type not needed before 'operator type' - - - - CRITICAL - LINEAR - 1min - - - 1013 - L1013: Symbol 'Name' not a member of class 'Name' - - ' operator is not a member of the class (struct or union) expressed or implied by the left hand operand. [11, ?3.2]]]> - - CRITICAL - LINEAR - 1min - - - 1014 - L1014: Explicit storage class not needed for member function 'Symbol' - - - - CRITICAL - LINEAR - 1min - - - 1015 - L1015: Symbol 'Name' not found in class - - - - CRITICAL - LINEAR - 1min - - - 1016 - L1016: Symbol 'Symbol' is supposed to denote a class - - - - CRITICAL - LINEAR - 1min - - - 1017 - L1017: conflicting access-specifier 'String' - - - - CRITICAL - LINEAR - 1min - - - 1018 - L1018: Expected a type after 'new' - - - - CRITICAL - LINEAR - 1min - - - 1019 - L1019: Could not find match for function 'Symbol(String)' - - - - CRITICAL - LINEAR - 1min - - - 1020 - L1020: template specialization for 'Symbol' declared without a 'template<>' prefix - - A class template specialization is generally preceded by a 'template<>' clause as in:

-

-               template< class T > class A { };       // a template
-               template<> class A<int> { };           // a specialization
-
-

If the 'template<>' is omitted, you will get this message but it will still be interpreted as a specialization. Before the standardization of template syntax was completed, a template specialization did not require this clause and its absence is still permitted by some compilers. -

]]> -
- CRITICAL - LINEAR - 1min -
- - 1021 - L1021: No viable 'String' function defined for type 'Type' used as range expression - - - - CRITICAL - LINEAR - 1min - - - 1022 - L1022: Function: 'String' must be a class member - - There are four operators which may not be defined except as class members. These are:

-

-               =  ()  []  ->
-
-

The parameter String indicates which it is. [11, #3.4.3 and #3.4.6] -

]]> -
- CRITICAL - LINEAR - 1min -
- - 1023 - L1023: Call String(String) is ambiguous; candidates: String - - - - CRITICAL - LINEAR - 1min - - - 1024 - L1024: No function has same argument count as 'Name' - - - - CRITICAL - LINEAR - 1min - - - 1025 - L1025: No function matches invocation 'Name' on arg no. Integer - - - - CRITICAL - LINEAR - 1min - - - 1026 - L1026: Undominated function 'String' does not dominate 'String' on call to 'String' - - - - CRITICAL - LINEAR - 1min - - - 1027 - L1027: Non-consecutive default arguments in function 'String', assumed 0 - - Default arguments need to be consecutive. For example

-

-             void f(int i=0, int j, int k=0);
-
-

is illegal. [11, #2.6] -

]]> -
- CRITICAL - LINEAR - 1min -
- - 1028 - L1028: Last argument not default in first instance of function 'String', assumed 0 - - - - CRITICAL - LINEAR - 1min - - - 1029 - L1029: Default argument repeated in function 'String' - - - - CRITICAL - LINEAR - 1min - - - 1030 - L1030: Not all arguments after arg no. Integer are default in function 'String' - - - - CRITICAL - LINEAR - 1min - - - 1031 - L1031: Local variable 'Symbol' used in default argument expression - - - - CRITICAL - LINEAR - 1min - - - 1032 - L1032: Member 'String' cannot be called without object - - - - CRITICAL - LINEAR - 1min - - - 1033 - L1033: Static member functions cannot be virtual - - - - CRITICAL - LINEAR - 1min - - - 1034 - L1034: Static member 'Symbol' is global and cannot be redefined - - - - CRITICAL - LINEAR - 1min - - - 1035 - L1035: Non-static member 'Symbol' cannot initialize a default argument - - - - CRITICAL - LINEAR - 1min - - - 1036 - L1036: ambiguous reference to constructor; candidates: 'String' - - - - CRITICAL - LINEAR - 1min - - - 1037 - L1037: ambiguous reference to conversion function; candidates: 'String' - - - - CRITICAL - LINEAR - 1min - - - 1038 - L1038: type 'Name' not found, nested type 'Name::String' assumed - - - - CRITICAL - LINEAR - 1min - - - 1039 - L1039: Symbol 'Symbol' is not a member of class 'String' - - - - CRITICAL - LINEAR - 1min - - - 1040 - L1040: Symbol 'Symbol' is not a legal declaration within class 'String' - - - - CRITICAL - LINEAR - 1min - - - 1041 - L1041: Can't declare 'String', assumed 'operator String' - - - - CRITICAL - LINEAR - 1min - - - 1042 - L1042: At least one class-like operand is required with Name - - - - CRITICAL - LINEAR - 1min - - - 1043 - L1043: Attempting to 'delete' a non-pointer - - - - CRITICAL - LINEAR - 1min - - - 1046 - L1046: member 'Symbol', referenced in a static function, requires an object - - - - CRITICAL - LINEAR - 1min - - - 1047 - L1047: a template declaration must be made at file scope - - - - CRITICAL - LINEAR - 1min - - - 1048 - L1048: expected a constant expression - - - - CRITICAL - LINEAR - 1min - - - 1049 - L1049: Too many template arguments - - - - CRITICAL - LINEAR - 1min - - - 1050 - L1050: expected a template argument list '<...>' for template 'Symbol' - - - - CRITICAL - LINEAR - 1min - - - 1051 - L1051: Symbol 'Name' is both a function and a variable - - - - CRITICAL - LINEAR - 1min - - - 1052 - L1052: a type was expected, 'class' assumed - - - - CRITICAL - LINEAR - 1min - - - 1053 - L1053: 'String' cannot be distinguished from 'String' - - - - CRITICAL - LINEAR - 1min - - - 1054 - L1054: template variable declaration expects a type, int assumed - - - - CRITICAL - LINEAR - 1min - - - 1055 - L1055: Symbol 'Symbol' undeclared, assumed to return int - - - - CRITICAL - LINEAR - 1min - - - 1056 - L1056: assignment from void * is not allowed in C++ - - - - CRITICAL - LINEAR - 1min - - - 1057 - L1057: member 'Symbol' cannot be used without an object - - - - CRITICAL - LINEAR - 1min - - - 1058 - L1058: Initializing a non-const reference 'Symbol' with a non-lvalue - - - - CRITICAL - LINEAR - 1min - - - 1059 - L1059: Can't convert from 'Type' to 'Type' - - - - CRITICAL - LINEAR - 1min - - - 1060 - L1060: String member 'Symbol' is not accessible to non-member non-friend functions - - - - CRITICAL - LINEAR - 1min - - - 1061 - L1061: String member 'Symbol' is not accessible through non-public inheritance - - - - CRITICAL - LINEAR - 1min - - - 1062 - L1062: template must be either a class or a function - - the parser expects to find either the token class or a function declaration or definition. [10, ?14.5]]]> - - CRITICAL - LINEAR - 1min - - - 1063 - L1063: Argument to copy constructor for class 'Symbol' should be a reference - - A constructor for a class closely resembles a copy constructor. A copy constructor for class X is typically declared as:

-

-             X( const X &)
-
-

If you leave off the '&' then a copy constructor would be needed just to copy the argument into the copy constructor. This is a runaway recursion. [11,#2.1] -

]]> -
- CRITICAL - LINEAR - 1min -
- - 1064 - L1064: Template parameter list for template 'Symbol' inconsistent with Location - - - - CRITICAL - LINEAR - 1min - - - 1065 - L1065: Symbol 'Symbol' not declared as "C" conflicts with Location - - - - CRITICAL - LINEAR - 1min - - - 1066 - L1066: Symbol 'Symbol' declared as "C" conflicts with Location - - - - CRITICAL - LINEAR - 1min - - - 1067 - L1067: invalid prototype for function 'Symbol' - - - - CRITICAL - LINEAR - 1min - - - 1068 - L1068: Symbol 'Symbol' can not be overloaded - - - - CRITICAL - LINEAR - 1min - - - 1069 - L1069: Symbol 'Name' is not a base class of class 'Name' - - - - CRITICAL - LINEAR - 1min - - - 1070 - L1070: No scope in which to find symbol 'Name' - - - - CRITICAL - LINEAR - 1min - - - 1071 - L1071: Constructors and destructors can not have return type - - - - CRITICAL - LINEAR - 1min - - - 1072 - L1072: Reference variable 'Symbol' must be initialized - - - - CRITICAL - LINEAR - 1min - - - 1073 - L1073: Insufficient number of template parameters for 'Symbol'; 'String' assumed - - - - CRITICAL - LINEAR - 1min - - - 1074 - L1074: Expected a namespace identifier - - In a declaration of the form:

-

-             namespace name = scoped-identifier
-
-

the scoped-identifier must identify a namespace. -

]]> -
- CRITICAL - LINEAR - 1min -
- - 1075 - L1075: Ambiguous reference to symbol 'Symbol' and symbol 'Symbol' - - - - CRITICAL - LINEAR - 1min - - - 1076 - L1076: Anonymous union assumed to be 'static' - - - - CRITICAL - LINEAR - 1min - - - 1077 - L1077: Could not evaluate default template parameter 'String' - - The evaluation of template parameters is deferred until needed. Thus:

-

-             template< class T = abc > class A { /* ... */ };
-
-

will be greeted with an Error 1077 only if an instantiation of A<> requires evaluation of the default argument and if that evaluation cannot be made. In that event int is assumed for type parameters and 0 is assumed for object parameters. -

]]> -
- CRITICAL - LINEAR - 1min -
- - 1078 - L1078: class 'Symbol' should not have itself as a base class - - The following situation will trigger this message.

-

-             class A : public A { };
-
-

You can't define A in terms of itself as there is no escape from the recursive plummet. -

]]> -
- CRITICAL - LINEAR - 1min -
- - 1079 - L1079: Could not find '>' or ',' to terminate template parameter at Location - - The default value for a template parameter appears to be malformed. For example, suppose the user mistakenly substituted a ']' for a '>' producing the following:

-

-             template <class T = A< int ] >
-                 class X
-                     {
-                     };
-
-

This will cause PC-lint/FlexeLint to process to the end of the file looking (in vain) for the terminating pointy bracket. Not finding it will cause this message to be printed. Fortunately, the message will bear the Location of the malformed template. -

]]> -
- CRITICAL - LINEAR - 1min -
- - 1080 - L1080: Definition for class 'Name' is not in scope - - This message would be issued whenever a class definition were required and it were not available. For example:

-

-             class X;        // declare class X
-             X *p;           // OK, no definition required
-             X a;            // Error 1080
-
]]> -
- CRITICAL - LINEAR - 1min -
- - 1081 - L1081: Object parameter does not contain the address of a variable - - A template argument that is passed to a pointer parameter is supposed to identify a symbol. The expression passed does not do so. For example

-

-               template< int *P > class A { ... };
-               int a[10];
-               A< a+2 > x;     // a+2 does not represent a symbol
-
]]> -
- CRITICAL - LINEAR - 1min -
- - 1082 - L1082: Object parameter for a reference type should be an external symbol - - A template argument that is passed to a reference parameter is supposed to identify an external symbol. The expression passed does not do so. For example

-

-               template< int &I > class A { ... };
-               int a[10];
-               A< a[2] > x;     // a[2] does not represent a symbol
-
-

See also message 1081. -

]]> -
- CRITICAL - LINEAR - 1min -
- - 1083 - L1083: Ambiguous conversion between 2nd and 3rd operands of conditional operator - - - - CRITICAL - LINEAR - 1min - - - 1084 - L1084: Ambiguous use of template-id for instantiation of 'Type' - - When the language calls for a class template to be instantiated and the primary template is "overloaded" via one or more partial specializations, there is an attempt to see if the template arguments match any of those partial specializations.

-

(Note, explicit specializations would have been considered before determining that the class definition needs to be generated by way of instantiation.) If multiple partial specializations match then:

-
  • If one of the matching partial specializations is more specialized than all others then it is used for the instantiation.
  • -
  • Otherwise, the program is ill-formed, so Lint issues message 1084.
-

In the message, the matching partial specializations are provided as the list of candidates. Example:

-

-               template<class T1, class T2, int I> class A {};             //#1
-               template<class T1, class T2, int I> class A<T1*, T2, I> {}; //#2
-               template<class T1, class T2, int I> class A<T1, T2*, I> {}; //#3
-               A<int*, int*, 2> a; // ambiguous: matches #2 and #3
-                                   // (and neither template is more specialized than the other)
-
]]> -
- CRITICAL - LINEAR - 1min -
- - 1085 - L1085: Invalid definition of 'String' - - An attempt was made to define a member of a template before the template was defined. Example:

-

-               template<class T, class U> struct A
-                       {
-                       void
-                       };
-               template<class U, class T> void A<T,U>::f(){} // Error 1085
-
-

In this case, the template argument list is out of order; T and U have been interchanged. -

]]> -
- CRITICAL - LINEAR - 1min -
- - 1086 - L1086: Compound literals may only be used in C99 programs - - - - CRITICAL - LINEAR - 1min - - - 1087 - L1087: Previous declaration of 'Name' (Location) is incompatible with 'Name' (Location) which was introduced by the current using-declaration - - A using declaration such as:

-

-             using NS::name;
-
-

seems to be in error. It introduces a name that clashes with the name introduced earlier by another using-declaration. E.g.:

- -

-               namespace N { int i;}
-               namespace Q { void i();}
-               using N::i;
-               using Q::i; // Error 1087 issued here.
-
]]> -
- CRITICAL - LINEAR - 1min -
- - 1088 - L1088: A using-declaration must name a qualified-id - - This error is issued when a using-declaration references a name without the :: scope resolution operator; e.g.:

-

-               class A { protected: int n; };
-               class B : public A {
-               public:
-                   using n; // Error 1088: should be 'using A::n;'
-               };
-
-

See Section <ref,14. Added Bibliography,14.>, [34], 7.3.3 namespace.udecl. -

]]> -
- CRITICAL - LINEAR - 1min -
- - 1089 - L1089: A using-declaration must not name a namespace - - This error is issued when the rightmost part of the qualified-id in a using-declaration is the name of a namespace. E.g.:

-

-               namespace N { namespace Q{ void g(); } }
-               void f() {
-                   using ::N::Q; // Error 1089
-                   Q::g();
-               }
-
-

Instead, use a namespace-alias-definition:

-

-               namespace N { namespace Q{ void g(); } }
-               void f() {
-                   namespace Q = ::N::Q; // OK
-                   Q::g(); // OK, calls ::N::Q::g().
-               }
-
-

See Section <ref,14. Added Bibliography,14.>, [35], Issue 460. -

]]> -
- CRITICAL - LINEAR - 1min -
- - 1090 - L1090: A using-declaration must not name a template-id - - This error is issued when the rightmost part of the qualified-id in a using-declaration is a template-id. E.g.:

-

-               template<class T> class A {
-               protected:
-                   template<class U> class B{};
-               };
-
-               struct D : public A<int> {
-               public:
-                   using A<int>::B<char*>; // Error 1090
-                   };
-
-               D::B<char*> bc;
-
-

Instead, refer to the template name without template arguments:

-

-               template<class T> class A {
-               protected:
-                   template<class U> class B{};
-               };
-
-               struct D : public A<int> {
-               public:
-                   using A<int>::B; // OK
-                   };
-
-               D::B<char*> bc; // OK
-
-

See Section <ref,14. Added Bibliography,14.>, [34], 7.3.3 namespace.udecl. -

]]> -
- CRITICAL - LINEAR - 1min -
- - 1091 - L1091: 'Name' is not a base class of 'Name' - - This error is issued when the nested-name-specifier of the qualified-id in a using-declaration does not name a base class of the class containing the using-declaration; e.g.:

-

-               struct N {
-                   void f();
-               }
-
-               class A { protected: void f(); };
-               class B : A {
-               public:
-                   using N::f; // Error 1091
-               };
-
-

See Section <ref,14. Added Bibliography,14.>, [35], Issue 400. -

]]> -
- CRITICAL - LINEAR - 1min -
- - 1092 - L1092: A using-declaration that names a class member must be a member-declaration - - This error is issued when the nested-name-specifier of the qualified-id in a using-declaration names a class but the using-declaration does not appear where class members are declared. E.g.:

-

-               struct A { void f(); };
-
-               struct B : A{
-                   void g() {
-                       using A::f; // Error 1092
-                   }
-               };
-
-

See Section <ref,14. Added Bibliography,14.>, [34], 7.3.3 namespace.udecl. -

]]> -
- CRITICAL - LINEAR - 1min -
- - 1093 - L1093: A pure specifier was given for function 'Symbol' which was not declared virtual - - - - CRITICAL - LINEAR - 1min - - - 1094 - L1094: Could not find ')' or ',' to terminate default function argument at Location - - - - CRITICAL - LINEAR - 1min - - - 1095 - L1095: Effective type 'Type' of non-type template parameter #Integer (corresponding to argument expression 'String') depends on an unspecialized parameter of this partial specialization - - The ISO C++ Standard says that "the type of a template parameter corresponding to a specialized non-type argument shall not be dependent on a parameter of the specialization." See Section <ref,14. Added Bibliography,14.>, [34], 14.5.4 temp.class.spec. Example:

-

-           // primary template:
-           template<class T, T N, class U> struct B;
-
-           // PS #1:
-           template<class U> struct B<int,257,U>; // Ok
-
-           // PS #2:
-           template<class U> struct B<bool,257,U>; // Ok, same as:
-           template<class U> struct B<bool,true,U>; // Ok (redeclaration of #2)
-
-           // PS #3:
-           template<class U> struct B<T,257,U>; // Error 1095 here
-
-

In PS #3, the value 257 is the 'specialized non-type argument' and its corresponding parameter is 'N' whose type is T which was not made concrete. But in PS #1 and PS #2, T was given the concrete types 'int' and 'bool', respectively. -

]]> -
- CRITICAL - LINEAR - 1min -
- - 1096 - L1096: A target ctor must be the only mem-initializer in the mem-initializer-list of a delegating ctor - - C++0x requires that if a constructor delegates to another constructor, then the mem-initializer (the region between the colon and the function body) must contain only one item, and that item must be a call to another constructor (which is called the "target constructor"). Example:

-

-           struct A
-               {
-               int n;
-               A(int);
-               A( const A& p) : A(p.n) {} // Ok
-               A() :
-                   n(42),  A(32)  // Error 1096
-                   {}
-               };
-
]]> -
- CRITICAL - LINEAR - 1min -
- - 1097 - L1097: Delegating ctor delegates directly to itself, causing infinite recursion - - Example:

-

-           struct A
-               {
-               int n;
-               A(int x) : A(x){} // Error 1097
-               };
-
]]> -
- CRITICAL - LINEAR - 1min -
- - 1098 - L1098: Function template specialization 'Symbol' does not match any function template - - This message is issued for a declaration where the user apparently intended to name a specialization of a function template (e.g., in an explicit specialization, an explicit instantiation or a friend declaration of specialization), but no previously-declared function template is matched. Example:

-

-               template<class T> void f( const T& ); // #1
-
-               struct A{};
-               template<> void f( const A& ); // Ok
-               // (A is the deduced argument to T.)
-
-               struct B{};
-               template<> void f( const B ); // Error 1097.
-               // (A template argument cannot be deduced for T.)
-
]]> -
- CRITICAL - LINEAR - 1min -
- - 1099 - L1099: Ambiguous function template specialization 'Symbol' - - This message is issued for a declaration where the user apparently intended to name a specialization of a function template (e.g., in an explicit specialization, an explicit instantiation or a friend declaration of specialization), but the specialization matches multiple function templates, and none of the matched templates is more specialized than all of the other matching templates. The candidates (i.e., the matching templates) are provided in the message. Example:

-

-               template<class T> struct A {};
-
-               template<class T, class U> void f( T*, U    ); // #1
-               template<class T, class U> void f( T,  A<U> ); // #2
-
-               struct B{};
-               template<> void f( B, A<B> ); // Ok
-               // #1 does not match but #2 does.
-
-               template<> void f( char*, A<int> ); // Error 1099
-               // Both #1 and #2 match and neither is more specialized than the
-               // other.
-
-

This situation can be avoided in at least a couple of ways. One way is to explicitly specify one or more template arguments. Example:

-

-               // continuing from above...
-               template<> void f<char*>( char*, A<int> ); // Ok
-               // #1 does not match but #2 does.
-
-

Another way is to use SFINAE tactics in the declaration of one or more function templates, e.g. with boost::enable_if

]]> -
- CRITICAL - LINEAR - 1min -
- - 1100 - L1100: Declaration of 'Symbol' does not declare an explicit specialization, explicit instantiation or friend - - In a declaration that explicitly specifies template arguments with angle brackets immediately after the name of a function template, the declaration must declare either an explicit specialization, explicit instantiation or friend. (Note, an explicit specialization always begins with 'template<>' and an explicit instantiation always begins with 'template'---without angle brackets after the keyword 'template'.)

-

-               template<class T> struct A {};
-
-               template<class T> inline void f( A<T> ); // #1
-               void f( A<int> ); // #2 // Ok, declares an ordinary function
-
-               void f<char>( A<char> ); // Error 1100
-
]]> -
- CRITICAL - LINEAR - 1min -
- - 1101 - L1101: Type of variable 'Symbol' cannot be deduced from its initializer - - Example:

-

-               int f(void);
-               int f(char*);
-               auto n = f; // Error
-
-

In terms of deduction, this is equivalent to:

-

-               int f(void);
-               int f(char*);
-               template<class T> void g( const T& );
-               void h( void )
-                   {
-                   g( f ); // Error
-                   }
-
-

Here, 'f' refers to multiple overloaded functions, so it is an ambiguous reference and T cannot be deduced. (Code like this could still be well-formed however, e.g. if g is overloaded with a non-template function whose parameter type is 'ptr-to-function returning int taking (char*)'.) -

]]> -
- CRITICAL - LINEAR - 1min -
- - 1102 - L1102: auto type deduced inconsistently: 'Type' for 'Symbol' but 'Type' for 'Symbol' - - When multiple variables are defined in the same declaration, and when that declaration uses the keyword auto as the type-specifier (a feature of C++0x), the type for which auto is a placeholder must be the same for each variable. Example:

-

-               float g(void);
-               char* s();
-               auto a = 42; // Ok, auto is 'int'
-               auto b = g(); // Ok, auto is 'float'
-               auto c = 'q',
-                    *d = s(); // Ok, auto is 'char' (for both c and d)
-               auto x = 42, y = g(); // Error 1102 here
-
]]> -
- CRITICAL -
- - 1103 - L1103: Type 'Type' is not allowed as an enum-base - - When an enumeration type is declared with an explicit underlying type, that type must be integral. Example:

-

-               enum A : bool; // ok
-               enum B : short; // ok
-               enum C : unsigned long long; // ok
-               enum D : float; // Error 1103
-
]]> -
- CRITICAL -
- - 1104 - L1104: A reference to enumeration 'Symbol' should not use 'String' - - Although an enumeration may be declared or defined using a scope indicator or an underlying type indicator, these should not be applied when simply referencing the enumeration. E.g.

-

-               enum class A { red, green };
-               enum class A x;         // Error: don't need 'class'
-               enum A : unsigned { red, green };
-               enum A : unsigned y;    // Error: don't need ': unsigned'
-
]]> -
- CRITICAL -
- - 1105 - L1105: Use of ref qualification of 'Symbol' inconsistent with overloaded function 'Symbol' (Location)" - - If an explicit ref qualifier ('&' or '&&') of a nonstatic member function is employed, an explicit ref qualifier needs to be used with every member of the overload set. Thus:

-

-               class A
-                   {
-                   void f(int) &;  // ok (so far)
-                   void f(int);    // 1105
-                   void f(double); // 1105
-                   void g(int);    // ok (fresh function)
-                   void g(double); // still ok
-                   };
-
]]> -
- CRITICAL -
- - 1106 - L1106: Initializing value 'String' of enumerator 'Name' cannot be represented by the enumeration's underlying type 'Type' - - An enumerator is being initialized with a value that is inappropriate to the declared type of the initializer. Example:

-

-               enum E : unsigned char { e = 256 };
-
-

The value 256 cannot be represented by an unsigned char. -

]]> -
- CRITICAL -
- - 1107 - L1107: Mixing two different kinds of string literals - - Two string literals are being concatenated which have different types. Examples:

-

-               char *s = u"abc" U"def";
-               char *q = L"ghi" u"jkl";
-
-

This message is issued for mixing strings of char16_t, char32_t, and/or wchar_t (as shown). Literal string concatenation of any of these with an ordinary character literal is permitted and will receive Informational 707. -

]]> -
- CRITICAL - LINEAR - 1min -
- - 1108 - L1108: Use of deleted function 'Symbol' defined at 'Location' - - -This message is issued when a deleted function is used. Example:

-

-               void f( int ) = delete;
-               void f( double );
-               void g( double d, int n ) {
-                   f( d ); // Ok
-                   f( n ); // Error
-               }
-
]]> -
- CRITICAL - LINEAR - 1min -
- - 1110 - L1110: Cycle detected: explicit application of 'Name'::operator-> causes infinite implicit applications of the same operator - - When an overloaded operator-> is used as in

-

-               a->b
-
-

it is effectively expanded to:

-

-               a.operator->()->b
-
-

And this expansion repeats until an operator-> is found that does not yield a class type. But in the process of evaluating this expansion, it might be found that one of the operators returns a class type for which an overloaded operator-> was already expanded; in that case, Error 1110 is triggered. Example:

-

-               struct B;
-               struct A { struct B& operator->(); };
-               struct B { struct A& operator->(); };
-               int  f( A & p ) { p->g(); } // Error
-
]]> -
- CRITICAL - LINEAR - 1min -
- - 1111 - L1111: ISO C++ requires an explicit specialization/instantiation to appear at namespace scope - - This message is issued at the beginning of each explicit specialization/instantiation that does not appear at namespace scope. Example:

-

-               struct A {
-                   template <typename U> struct B {};
-
-                   // template <>  // Would be ill-formed by ISO C++.
-                   //     struct B<int> {};
-               };
-               template<> struct A::B<int> {}; // Ok.
-
-

There is an additional limitation with member class templates of class templates. As with members of a non-template class, one cannot write a specialization at class scope. Example:

-

-               template<typename T> struct G {
-                   template <typename U> struct H {};
-                   // template <>  // Would be ill-formed by ISO C++.
-                   //     struct H<int> {};
-               };
-
-

But the language specification does not even allow this to be expressed in a namespace-scope definition; there is no way to write an explicit specialization that is a member of a class template. Example:

-

-               template<typename T> struct J {
-                   template <typename U> struct K {};
-               };
-               // template<typename T>
-               //     template <>  // Would be ill-formed by ISO C++;
-               //         struct J<T>::K<int> {};
-
-

This is because the rules for explicit specializations say that 'template<>' is not allowed to appear after a non-empty template-parameter-list within the same declaration. However, one may write an explicit specialization that is a member of an implicitly-instantiated specialization of a class template. Example:

-

-               template<typename T> struct L {
-                   template <typename U> struct M {};
-               };
-               template <> template <> struct L<char>::M<int> {}; // Ok
-
-

Here, the body of the class L<char> is automatically generated by implicit instantiation (otherwise the reference to 'L<char>::M' would be ill-formed), while the body of L<char>:M<int> is provided in the explicit specialization. - -In March of 2009, the ISO C++ committee reviewed a report submitted against this example:

-

-              struct A {
-                 template<class T> struct B;
-                 template <class T> struct B<T*> { }; // well-formed
-                 template <> struct B<int*> { }; // ill-formed
-               };
-
-

While it might seem odd that one is able to write the partial specialization but not the full specialization, the committee (which at the time was in a "feature-freeze" mode and trying to finalize a draft for the next International Standard) decided that this capability would need to be regarded as an "extension", meaning that it could be considered as a new feature in a future standard but not as a bug-fix for C++0x. - -Note that the Microsoft compiler implements this extension. For that reason, the Lint option

-

-               -elib(1111)
-
-

appears in recent versions of our configuration files for Microsoft compilers

]]> -
- CRITICAL - LINEAR - 1min -
- - 1112 - L1112: In a declaration, the form 'auto D(parms)->type' is the only valid way to use a trailing-return-type - - In a declaration, the form 'auto D(parms)->type' (where D is either a name or a parenthesized region) is the only valid way to use a trailing-return-type -- For example, if you want to declare that f returns a pointer-to-int, you must write:

-

-               auto f() -> int *;
-
-         ... and not:
-
-               auto *f() -> int;
-
-

This also applies to a type-id (e.g., in a cast to a pointer-to-function, or as an argument to a template type-parameter)

]]> -
- CRITICAL - LINEAR - 1min -
- - 1113 - L1113: In this use of 'Template', type substitution failed for 'Type' - - Type is the type of Template; it is used at the cited location with concrete arguments, but substitution failed.

-

Example:

-

-           template<class T> using X = typename T::type;
-           typedef X<int> XI; // error 1113
-
-]]> -
- CRITICAL - LINEAR - 1min -
- - 1116 - L1116: Virtual function 'Symbol' overrides function marked with final - - - - CRITICAL - LINEAR - 1min - - - 1117 - L1117: Non-virtual function 'Symbol' marked with 'String' - - - - CRITICAL - LINEAR - 1min - - - 1118 - L1118: Virtual function 'Symbol' already marked with 'String' - - - - CRITICAL - LINEAR - 1min - - - 1119 - L1119: Virtual function 'Symbol' marked with override does not override - - - - CRITICAL - LINEAR - 1min - - - 1120 - L1120: Incomplete type 'Type' is not a valid range expression - - - - CRITICAL - LINEAR - 1min - - - 1121 - L1121: No viable 'String' function defined for type 'Type' used as range expressionn - - - - CRITICAL - LINEAR - 1min - - - 1122 - L1122: Range expression of type 'Type' has 'String' member but no 'String' member - - - - CRITICAL - LINEAR - 1min - - - 1123 - L1123: Attempt to derive from class 'Symbol' marked as 'final' at Location - - - - CRITICAL - LINEAR - 1min - - - 1124 - L1124: Digit separator not allowed: 'String' - - - - CRITICAL - LINEAR - 1min - - - 1125 - L1125: A type cannot be defined in a friend declaration - - Example:

-

-           class A {
-             friend struct B;    // ok
-             friend struct C {}; // error
-           };
-
]]> -
- CRITICAL - LINEAR - 1min -
- - 1126 - L1126: In std::underlying_type<T>, T must be an enumeration type; but here, T is 'Type'. - - - - CRITICAL - LINEAR - 1min - - - 1127 - L1127: catch handler after catch(...) - - - - CRITICAL - LINEAR - 1min - - - 1258 - L1258: Internal Error; contact Gimpel Software - - - - BLOCKER - LINEAR - 1min - - - 1268 - L1268: Internal Error; contact Gimpel Software - - - - BLOCKER - LINEAR - 1min - - - 1270 - L1270: Internal Error; contact Gimpel Software - - - - BLOCKER - LINEAR - 1min - - - 1401 - L1401: member 'Symbol' (Location) not initialized by constructor - - - - LINEAR - 1min - - - 1402 - L1402: member 'Symbol' (Location) not initialized - - - - LINEAR - 1min - - - 1403 - L1403: member 'Symbol' (Location) not initialized - - - - LINEAR - 1min - - - 1404 - L1404: deleting an object of type 'Symbol' before type is defined - - The following situation was detected:

-

-            class X;   ...   X *p;  ...  delete p;
-
-

That is, a placeholder declaration for a class is given and an object of that type is deleted before any definition is seen. This may or may not be followed by the actual class definition:

-

-            class X { ... };
-
-

A delete before the class is defined is dangerous because, among other things, any operator delete that may be defined within the class could be ignored. -

]]> -
- LINEAR - 1min -
- - 1405 - L1405: Header typeinfo must be included before typeid is used - - - - LINEAR - 1min - - - 1411 - L1411: Member with different signature hides virtual member 'Symbol' (Location) - - - - LINEAR - 1min - - - 1412 - L1412: Reference member 'Symbol' is not initialized - - - - LINEAR - 1min - - - 1413 - L1413: function 'Symbol' is returning a temporary via a reference - - - - LINEAR - 1min - - - 1414 - L1414: Assigning address of auto variable 'Symbol' to member of this - - The address of an auto variable was taken and assigned to a this member in a member function. For example:

-

-               struct A
-                   {
-                   char *x;
-                   void f()
-                       {
-                       char y[10];
-                       x = y;          // warning 1414
-                       }
-                   };
-
-

Here the address of y is being passed to member x but this is dangerous (if not ridiculous) since when the function returns, the storage allocated for y is deallocated and the pointer could very easily harm something. -

]]> -
- LINEAR - 1min -
- - 1415 - L1415: Pointer to non-POD class 'Name' passed to function 'Symbol' (Context) - - - - LINEAR - 1min - - - 1416 - L1416: An uninitialized reference 'Symbol' is being used to initialize reference 'Symbol' - - This message is usually issued when a reference to a member of a class is used to initialize a reference to another member of the same class before the first member was initialized. For example:

-

-               class C
-                   {
-                   int &n, &m;
-                   C( int &k ) : n(m), m(k) { /* ... */ }
-                   };
-
-

Here m is initialized properly to be identical to k. However, the initialization of n, taking place, as it does, before m is so initialized, is erroneous. It is undefined what location n will reference. -

]]> -
- LINEAR - 1min -
- - 1417 - L1417: reference member 'Symbol' not initialized by constructor initializer list - - This message is issued when a reference data member of a class does not appear in a mem-initializer. For example, the following code will result in a Warning 1417 for symbol m since a mem-initializer is the only way that m can be reference initialized.

-

-               class C
-                   {
-                   int &n, &m;
-                   C( int &k ) : n(k) { /* ... */ }
-                   };
-
]]> -
- LINEAR - 1min -
- - 1419 - L1419: Destructors should never throw - - - - LINEAR - 1min - - - 1501 - L1501: data member 'Symbol' has zero size - - - - LINEAR - 1min - - - 1502 - L1502: defined object 'Symbol' has no nonstatic data members - - - - LINEAR - 1min - - - 1503 - L1503: a tagged union is not anonymous - - - - LINEAR - 1min - - - 1504 - L1504: useless struct declaration - - - - LINEAR - 1min - - - 1505 - L1505: no access specifier provided, 'String' assumed - - A base class specifier provides no access specifier (public, private or protected). An explicit access specifier is always recommended since the default behavior is often not what is expected. For example:

-

-            class A : B { int a; };
-
-

would make B a private base class by default.

-

-            class A : private B { int a; };
-
-

is preferred if that's what you want. [11,#1.1] -

]]> -
- LINEAR - 1min -
- - 1506 - L1506: Call to virtual function 'Symbol' within a constructor or destructor - - - - LINEAR - 1min - - - 1507 - L1507: attempting to 'delete' an array - - - - LINEAR - 1min - - - 1509 - L1509: base class destructor for class 'Name' is not virtual - - - - LINEAR - 1min - - - 1510 - L1510: base class 'Name' has no destructor - - - - LINEAR - 1min - - - 1511 - L1511: Member hides non-virtual member 'Symbol' (Location) - - - - LINEAR - 1min - - - 1512 - L1512: destructor for base class 'Symbol' (Location) is not virtual - - - - LINEAR - 1min - - - 1513 - L1513: storage class ignored - - - - LINEAR - 1min - - - 1514 - L1514: Creating temporary to copy 'Type' to 'Type' (context: Context) - - - - LINEAR - 1min - - - 1515 - L1515: Default constructor not available for member 'Symbol' - - - - LINEAR - 1min - - - 1516 - L1516: Data member hides inherited member 'Symbol' (Location) - - - - LINEAR - 1min - - - 1520 - L1520: Multiple assignment operators for class 'Symbol' - - More than one assignment operator has been declared for a given class. For example, for class X there may have been declared:

-

-             void operator=(X);
-             void operator=(X) const;
-
-

Which is to be used for assignment? -

]]> -
- LINEAR - 1min -
- - 1521 - L1521: Multiple copy constructors for class 'Symbol' - - - - LINEAR - 1min - - - 1522 - L1522: Symbol 'Symbol' is an array of empty objects - - - - LINEAR - 1min - - - 1524 - L1524: new in constructor for class 'Name' which has no explicit destructor - - - - LINEAR - 1min - - - 1526 - L1526: Member function 'Symbol' (Location) not defined - - - - LINEAR - 1min - - - 1527 - L1527: static member 'Symbol' (Location) not defined - - - - LINEAR - 1min - - - 1528 - L1528: call to String does not match function template String - - - - LINEAR - 1min - - - 1529 - L1529: Symbol 'Symbol' not first checking for assignment to this - - The assignment operator does not appear to be checking for assignment of the value of a variable to itself (assignment to this). Specifically PC-lint/FlexeLint is looking for one of:

-

-                 if( &arg == this )
-                 if( &arg != this )
-                 if( this == &arg )
-                 if( this != &arg )
-
-

as the first statement of the function. - -It is important to check for a self assignment so as to know whether the old value should be subject to a delete operation. This is often overlooked by a class designer since it is counter-intuitive to assign to oneself. But through the magic of aliasing (pointers, references, function arguments) it is possible for an unsuspecting programmer to stumble into a disguised self-assignment [12, Item 17]. - -If you are currently using the following test

-

-                 if( arg == *this)
-
-

we recommend you replace this with the more efficient:

-

-                 if( &arg == this || arg == *this)
-
]]> -
- LINEAR - 1min -
- - 1531 - L1531: Symbol 'Symbol' (Location) should have compared argument against sizeof(class) - - - - LINEAR - 1min - - - 1532 - L1532: Symbol 'Symbol' not checking argument for NULL - - - - LINEAR - 1min - - - 1533 - L1533: Repeated friend declaration for symbol 'Symbol' - - - - LINEAR - 1min - - - 1534 - L1534: static variable 'Symbol' found within inline function in header - - - - LINEAR - 1min - - - 1535 - L1535: Exposing low access data through member 'Symbol' - - - - LINEAR - 1min - - - 1536 - L1536: Exposing low access member 'Symbol' - - A member function is returning the non-const address of a member either directly or via a reference. Moreover, the member's access (such as private or protected) is lower than the access of the function returning the address. For example:

-

-                 class X
-                     {
-                   private:
-                     int a;
-                   public:
-                     int *f() { return &a; }
-                     };
-
-

This looks like a breach of the access system [12, Item 30]. You may lower the access rights of the function, raise the accessibility of the member or make the return value a const pointer or reference. In the above example you could change the function to: -

-

-                 const int *f() { return &a; }
-
]]> -
- LINEAR - 1min -
- - 1537 - L1537: const function returns pointer data member 'Symbol' - - A const function is behaving suspiciously. It is returning a pointer data member (or equivalently a pointer to data that is pointed to by a data member). For example,

-

-                 class X
-                     {
-                     int *p;
-                     int *f() const { return p; }
-                     };
-
-

Since f is supposedly const and since p is presumptively pointing to data that is logically part of class X we certainly have the potential for a security breach. Either return a pointer to const or remove the const modifier to the function. [12, Item 29]. - -Note, if a const function returns the address of a data member then a 605 (capability increase) is issued. -

References

-

OOP55-CPP. Do not use pointer-to-member operators to access nonexistent members

- - ]]> -
- cert - security - LINEAR - 1min -
- - 1538 - L1538: base class 'Name' absent from initializer list for copy constructor - - The indicated base class did not appear in the initializer list for a copy constructor. Was this an oversight? If the initializer list does not contain an initializer for a base class, the default constructor is used for the base class. This is not normally appropriate for a copy constructor. The following is more typical:

-

-                 class B { ... };
-                 class D : public B
-                     {
-                     D( const D &arg ) : B( arg ) { ... }
-                     ...
-                     };
-
]]> -
- LINEAR - 1min -
- - 1539 - L1539: member 'Symbol' (Location) not assigned by assignment operator - - - - LINEAR - 1min - - - 1540 - L1540: pointer member 'Symbol' (Location) neither freed nor zeroed by destructor - - - - LINEAR - 1min - - - 1541 - L1541: member 'Symbol' (Location) possibly not initialized by constructor - - - - LINEAR - 1min - - - 1542 - L1542: member 'Symbol' (Location) possibly not initialized - - - - LINEAR - 1min - - - 1543 - L1543: member 'Symbol' (Location) possibly not initialized - - - - LINEAR - 1min - - - 1544 - L1544: value of variable 'Symbol' (Location) indeterminate (order of initialization) - - A variable (identified by Symbol) was used in the run-time initialization of a static variable. However this variable itself was initialized at run-time. Since the order of initialization cannot be predicted this is the source of possible error. - -Whereas addresses are completely known at initialization time values may not be. Whether the value or merely the address of a variable is used in the initialization of a second variable is not an easy thing to determine when an argument is passed by reference or via pointer. For example,

-

-             class X
-                 {
-                 X( const X & );
-                 };
-
-             extern X x1;
-             X x2 = x1;
-             X x1 = x2;
-
-

It is theoretically possible, but unlikely, that the constructor X() is interested only in the address of its argument and not its current value. If so, it only means you will be getting a spurious report which you can suppress based on variable name. However, if the const is missing when passing a reference parameter (or a pointer parameter) then we cannot easily assume that values are being used. In this case no report will be issued. The moral is that if you want to get the checking implied by this message you should make your constructor reference arguments const. -

]]> -
-
- - 1545 - L1545: value of variable 'Symbol' used previously to initialize variable 'Symbol' (Location) - - - - LINEAR - 1min - - - 1546 - L1546: direct throw of exception 'Name' within destructor 'Symbol' - - - - LINEAR - 1min - - - 1547 - L1547: Assignment of array to pointer to base class (Context) - - An assignment from an array of a derived class to a pointer to a base class was detected. For example:

-

-                 class B { };
-                 class D : public B {};
-                 D a[10];
-                 B *p = a;      // Warning 1547
-                 B *q = &a[0];  // OK
-
-

In this example p is being assigned the address of the first element of an array. This is fraught with danger since access to any element other than the zeroeth must be considered an error (we presume that B and D actually have or have the potential to have different sizes). [23, Item 3]. - -We do not warn about the assignment to q because it appears that the programmer realizes the situation and wishes to confine q to the base object of the zeroeth element of a only. As a further precaution against inappropriate array access, out of bounds warnings are issued for subsequent references to p[1] and q[1]. -

]]> -
- LINEAR - 1min -
- - 1548 - L1548: Exception specification for 'Symbol' conflicts with Location - - - - LINEAR - 1min - - - 1549 - L1549: Exception thrown for function 'Symbol' not declared to throw - - - - LINEAR - 1min - - - 1550 - L1550: exception 'Name' thrown by function 'Symbol' is not on throw-list of function 'Symbol' - - - - LINEAR - 1min - - - 1551 - L1551: function may throw exception 'Name' in destructor 'Symbol' - - - - LINEAR - 1min - - - 1552 - L1552: Converting pointer to array-of-derived to pointer to base - - This warning is similar to Warning 1547 and is sometimes given in conjunction with it. It uses value tracking to determine that an array (that could be dynamically allocated) is being assigned to a base class pointer. - -For example,

-

-                 Derived *d = new Derived[10];
-                 Base *b;
-                 b = d;      // Warning 1552
-                 b = &d[0];  // OK
-
-

[23, Item 3] Also, see the article by Mark Nelson (Bug++ of the Month, Windows developer's Journal, May 1997, pp. 43-44). -

]]> -
- LINEAR - 1min -
- - 1553 - L1553: struct 'Symbol' declared as extern "C" contains C++ substructure 'Symbol' (Location) - - - - LINEAR - 1min - - - 1554 - L1554: Direct pointer copy of member 'Symbol' within copy constructor: 'Symbol' - - In a copy constructor a pointer was merely copied rather than recreated with new storage. This can create a situation where two objects have the same data and this, in turn, causes problems when these objects are deleted or modified. For example, the following class will draw this warning:

-

-             class X
-                 {
-                 char *p;
-                 X( const X & x )
-                     { p = x.p; }
-                 ...
-                 };
-
-

Here, member p is expected to be recreated using new or some variant. -

]]> -
- LINEAR - 1min -
- - 1555 - L1555: Direct pointer copy of member 'Symbol' within copy assignment operator: 'Symbol' - - In a copy assignment operator a pointer was merely copied rather than recreated with new storage. This can create a situation where two objects have the same data and this, in turn, causes problems when these objects are deleted or modified. For example, the following class will draw this warning:

-

-             class X
-                 {
-                 char *p;
-                 X& operator=( const X & x )
-                     { p = x.p; }
-                 ...
-                 };
-
-

Here, member p is expected to be recreated using new or some variant. -

]]> -
- LINEAR - 1min -
- - 1556 - L1556: 'new Type(integer)' is suspicious - - A new expression had the form new T(Integer) where type T has no constructor. For example:

-

-             new int(10)
-
-

will draw this warning. The expression allocates an area of storage large enough to hold one integer. It then initializes that integer to the value 10. Could this have been a botched attempt to allocate an array of 10 integers? Even if it was a deliberate attempt to allocate and initialize a single integer, a casual inspection of the code could easily lead a reader astray. - -The warning is only given when the type T has no constructor. If T has a constructor then either a syntactic error will result because no constructor matches the argument or a match will be found. In the latter case no warning will or should be issued. -

]]> -
- LINEAR - 1min -
- - 1557 - L1557: const member 'Symbol' is not initialized - - - - LINEAR - 1min - - - 1558 - L1558: virtual coupled with inline is an unusual combination - - The function declared both 'virtual' and 'inline' has been detected. An example of such a situation is as follows:

-

-               class C
-                   {
-                   virtual inline void f();   // Warning 1558
-                   };
-
-

Virtual functions by their nature require an address and so inlining such a function seems contradictory. We recommend that the 'inline' function specifier be removed. -

]]> -
- LINEAR - 1min -
- - 1559 - L1559: Uncaught exception 'Name' may be thrown in destructor 'Symbol' - - - - LINEAR - 1min - - - 1560 - L1560: Uncaught exception 'Name' not on throw-list of function 'Symbol' - - - - LINEAR - 1min - - - 1561 - L1561: Reference initialization causes loss of const/volatile integrity (Context) - - A reference initialization is resulting in a capability gain that can cause a loss of const or volatile integrity. - -Typically the message is given on initializing a non-const reference with a const. For example:

-

-           void f( int &x );
-           const int n = 0;
-           ...
-           f(n);
-
-

Here, function f() could assign a value to its argument and thereby modify n which is declared to be const. - -The message can also be issued when a pointer is initialized. Consider the following example.

-

-           void h( const int *&q );
-           int *p;
-           ...
-           h(p);
-
-

It might seem that passing a regular (i.e., non-const) pointer to a const int * could cause no harm. That would be correct if it were not for the reference. If function h() were to assign a pointer to const to its parameter q then upon return from the call, p could be used to modify const data. - -There are many subtle cases that can boggle the mind. See the commentary to Message 605. -

]]> -
- LINEAR - 1min -
- - 1562 - L1562: Exception specification for 'Symbol' is not a subset of 'Symbol' (Location) - - The first symbol is that of an overriding virtual function for the second symbol. The exception specification for the first was found not to be a subset of the second. For example, it may be reasonable to have:

-

-               struct B   { virtual void f() throw(B); };
-               struct D:B { virtual void f() throw(D); };
-
-

Here, although the exception specification is not identical, the exception D is considered a subset of the base class B. - -It would not be reasonable for D::f() to throw an exception outside the range of those thrown by B::f() because in general the compiler will only see calls to B::f() and it should be possible for the compiler to deduce what exceptions could be thrown by examining the static call -

]]> -
- LINEAR - 1min -
- - 1563 - L1563: Suspicious third argument to ?: operator - - The third argument to ?: contained an unparenthesized assignment operator such as

-

-               p ? a : b = 1
-
-

If this is what was intended you should parenthesize the third argument as in:

-

-               p ? a : (b = 1)
-
-

Not only is the original form difficult to read but C, as opposed to C++, would parse this as:

-

-               (p ? a : b) = 1
-
]]> -
- LINEAR - 1min -
- - 1564 - L1564: Assigning a non-zero-one constant to a bool - - The following looks suspicious.

-

-               bool a = 34;
-
-

Although there is an implicit conversion from integral to bool and assigning an integer varaible to a bool to obtain its Boolean meaning is legitimate, assigning an integer such as this looks suspicious. As the message suggests, the warning is not given if the value assigned is either 0 or 1. An Elective Note would be raised in that instance. -

]]> -
- LINEAR - 1min -
- - 1565 - L1565: member 'Symbol' (Location) not assigned by initializer function - - - - LINEAR - 1min - - - 1566 - L1566: member 'Symbol' (Location) might have been initialized by a separate function but no '-sem(Name,initializer)' was seen - - A class data member (whose name and location are indicated in the message) was not directly initialized by a constructor. It may have been initialized by a separately called member function. If this is the case you may follow the advice given in the message and use a semantic option to inform PC-lint/FlexeLint that the separately called function is in fact an 'initializer'. For example:

-

-               class A {
-                       int a;
-                   public:
-                       void f();
-                       A() { f(); }
-                       };
-
-

Here f() is presumably serving as an initializer for the constructor A::A(). To inform PC-lint/FlexeLint of this situation, use the option:

-

-               -sem( A::f, initializer )
-
-

This will suppress Warning 1566 for any constructor of class A that calls A::f. -

]]> -
- LINEAR - 1min -
- - 1567 - L1567: Initialization of variable 'Symbol' (Location) is indeterminate as it uses variable 'Symbol' through calls: 'String' - - A variable was dynamically initialized using an expression that contained a call to a function and that function referenced a variable that was also dynamically initialized and was in some other module. For example:

-

-               a.cpp:                  b.cpp:
-
-               int g(void);            int f(void);
-               int y = g();            int x = f();
-               int f() { return y; }
-
-

The initialization of both x and y are dynamic. Although the order of dynamic initialization within a module is pre-ordained the order in which modules are initialized is not. Therefore it is perfectly possible for b.cpp to be initialized before a.cpp. Thus when the call is made upon function f() to initialize x, variable y may not yet have been initialized. -

]]> -
- LINEAR - 1min -
- - 1568 - L1568: Variable 'Symbol' (Location) accesses variable 'Symbol' before the latter is initialized through calls: 'String' - - A variable was dynamically initialized using an expression that contained a call to a function and that function referenced a variable that was also dynamically initialized but later in the module. For example:

-

-               int g(void);
-               int f(void);
-               int x = f();
-               int y = g();
-               int f() { return y; }
-
-

The initialization of both x and y are dynamic. The order of dynamic initialization within a module is in the order in which the initialization is specified. Thus when the call is made upon function f() to initialize x, variable y will not yet have been initialized. -

]]> -
- LINEAR - 1min -
- - 1569 - L1569: Initializing a member reference with a temporary. - - A member reference was initialized with a temporary. For example:

-

-           struct A { int &n;  A() : n(3) {} };
-
-

The constructor A() contains an initializer list within which it initializes n. But n will be bound to a temporary created by the compiler to hold the value 3. The lifetime of this temporary is limited; it "persists until the constructor exits" [10 section class.temporary] -

]]> -
- LINEAR - 1min -
- - 1570 - L1570: Initializing a reference class member with an auto variable 'Symbol' - - In a constructor initializer, a reference class member is being initialized to bind to an auto variable. Consider:

-

-           class X { int &n; X(int k) :n(k) {} };
-
-

In this example member n is being bound to variable k which, although a parameter, is nonetheless placed into auto storage. But the lifetime of k is only the duration of the call to the constructor, whereas the lifetime of n is the lifetime of the class object constructed. -

]]> -
- LINEAR - 1min -
- - 1571 - L1571: Returning an auto variable 'Symbol' via a reference type - - - - LINEAR - 1min - - - 1572 - L1572: Initializing a static reference variable with an auto variable 'Symbol' - - A static variable has a lifetime that will exceed that of the auto variable that it has been bound to. Consider

-

-           void f( int n ) { static int& r = n; ... }
-
-

The reference r will be permanently bound to an auto variable n. The lifetime of n will not extend beyond the life of the function. On the second and subsequent calls to function f the static variable r will be bound to a non-existent entity. -

]]> -
- LINEAR - 1min -
- - 1573 - L1573: Generic function template 'Symbol' declared in namespace associated with type 'Symbol' (Location) - - When a class (or union or enum) is declared within a namespace that namespace is said to be associated with the type. A Generic function template is any that has as parameters only intrinsic types or plain template arguments possibly adorned with reference or const or volatile qualification. Consider

-

-           namespace X
-               {
-               template< class T >
-                   void f( int, const T& );    // Generic
-               class A{};                      // Warning 1573
-               }
-
-

A call to function f that contained an argument of type X::A would, by ADL (Argument Dependent Lookup), need to also consider function X::f even though this function was not in the scope of the call. In the past this has led to strange an unexpected results. - -Some designers adopt the strategy of embedding the class within a sub namespace and employing a using-declaration to make it available to users of the original namespace. For example:

-

-           namespace X
-               {
-               template< class T >
-                   void f( int, const T& );    // Generic
-               namespace X1
-                   {
-                   class A{};                  // No Warning
-                   }
-               using X1::A;
-               }
-
-

Now an argument of type X::A will not automatically trigger a consideration of X::f. -

]]> -
- LINEAR - 1min -
- - 1574 - L1574: Returning the address of an auto variable indirectly through reference variable 'Symbol' - - Within a function whose return type is reference to some type, a return statement is returning a reference which has been initialized (possibly indirectly) with an auto variable. For example:

-

-               int &f( int k )
-                   {
-                   int &r = k;
-                   return r;
-                   }
-
]]> -
- LINEAR - 1min -
- - 1576 - L1576: Explicit specialization does not occur in the same file as corresponding function template 'Symbol' (Location) - - - - LINEAR - 1min - - - 1577 - L1577: Partial or explicit specialization does not occur in the same file as primary template 'Symbol' (Location) - - - - LINEAR - 1min - - - 1578 - L1578: Pointer member 'Symbol' (Location) neither freed nor zeroed by cleanup function - - - - LINEAR - 1min - - - 1579 - L1579: Pointer member 'Symbol' (Location) might have been freed by a separate function but no '-sem(Name,cleanup)' was seen - - A class data member (whose name and location are indicated in the message) was not directly freed by the class destructor. There was a chance that it was cleared by a separately called member function. If this is the case you may follow the advice given in the message and use a semantic option to inform PC-lint/FlexeLint that the separately called function is in fact a 'cleanup' function. For example:

-

-               class A {
-                       int *p;
-                   public:
-                       void release_ptrs();
-                       ~A() { release_ptrs(); }
-                       };
-
-

Here release_ptrs() is presumably serving as a cleanup function for the destructor ~A::A(). To inform PC-lint/FlexeLint of this situation, use the option:

-

-               -sem( A::release_ptrs, cleanup )
-
-

A separate message (Warning 1578) will be issued if the cleanup function fails to clear all pointers. See also Warning 1566. -

]]> -
- LINEAR - 1min -
- - 1701 - L1701: redundant access-specifier 'String' - - - - MINOR - LINEAR - 1min - - - 1702 - L1702: operator 'Name' is both an ordinary function 'String' and a member function 'String' - - ', etc.) are usually defined external to a class definition so that they can support non-objects on the left hand side. [11, ?13.4.2]]]> - - MINOR - LINEAR - 1min - - - 1703 - L1703: Function 'String' arbitrarily selected. Refer to Error 'Integer' - - - - MINOR - LINEAR - 1min - - - 1704 - L1704: Constructor 'Symbol' has private access specification - - - - MINOR - LINEAR - 1min - - - 1705 - L1705: static class members may be accessed by the scoping operator - - - - MINOR - LINEAR - 1min - - - 1706 - L1706: Declaration with scope operator is unusual within a class - - -class X { int X::n; ... - -will elicit this message. If the (redundant) class specification (X::) were replaced by some different class specification and the declaration was not friend an error (1040) would be issued. [11, ?9.2] - - ]]> - - MINOR - LINEAR - 1min - - - 1707 - L1707: static assumed for String - - - - MINOR - LINEAR - 1min - - - 1708 - L1708: typedef 'Symbol' not declared as "C" conflicts with Location - - - - MINOR - LINEAR - 1min - - - 1709 - L1709: typedef 'Symbol' declared as "C" conflicts with Location - - - - MINOR - LINEAR - 1min - - - 1710 - L1710: An implicit 'typename' was assumed - - class A { T::N x; // Info 1710 }; Many compilers will accept this construct since the only interpretation consistent with valid syntax is that T::N represents a type. (But if the 'x' weren't there it would be taken as an access declaration and more frequently would be a non-type).]]> - - MINOR - LINEAR - 1min - - - 1711 - L1711: class 'Symbol' (Location) has a virtual function but is not inherited - - - - MINOR - LINEAR - 1min - - - 1712 - L1712: default constructor not defined for class 'Name' - - - - MINOR - LINEAR - 1min - - - 1713 - L1713: Parentheses have inconsistent interpretation - - - - MINOR - LINEAR - 1min - - - 1714 - L1714: Member function 'Symbol' (Location) not referenced - - - - MINOR - LINEAR - 1min - - - 1715 - L1715: static member 'Symbol' (Location) not referenced - - - - MINOR - LINEAR - 1min - - - 1716 - L1716: Virtual member function 'Symbol' (Location) not referenced - - - - MINOR - LINEAR - 1min - - - 1717 - L1717: empty prototype for function declaration, assumed '(void)' - - - - MINOR - LINEAR - 1min - - - 1718 - L1718: expression within brackets ignored - - - - MINOR - LINEAR - 1min - - - 1719 - L1719: assignment operator for class 'Symbol' has non-reference parameter - - -X& operator =(const X &) - -If the argument is not a reference then your program is subject to implicit function calls and less efficient operation. [11, ?13.4.3] - - ]]> - - MINOR - LINEAR - 1min - - - 1720 - L1720: assignment operator for class 'Symbol' has non-const parameter - - -X& operator =(const X &) - -If the argument is not const then your program will not be diagnosed as completely as it might otherwise be. [11, ?13.4.3] - - ]]> - - MINOR - LINEAR - 1min - - - 1721 - L1721: operator =() for class 'Symbol' is not assignment operator - - -X& operator =(const X &) - -A member function whose name is operator =, but which doesn't have that form, is not an assignment operator. This could be a source of subtle confusion for a program reader. If this is not an error you may selectively suppress this message for the given class. [11, ?13.4.3] - - ]]> - - MINOR - LINEAR - 1min - - - 1722 - L1722: assignment operator for class 'Symbol' does not return a reference to class - - -X& operator =(const X &) - -The reason for returning a reference to class is to support multiple assignment as in: -
-a = b = c
-
-[11, ?13.4.3] - - ]]> -
- MINOR - LINEAR - 1min -
- - 1723 - L1723: Template 'Symbol' arbitrarily selected. Refer to Error 'Integer' - - This is a supplemental message to the Error that immediately preceded, which was about a failure to select a single best partial specialization for an instantiation. Its purpose is to show some of the context of subsequent processing (which is now in a state of recovery).

-

Example:

-

-           template<class T, class U> struct A;
-           template<class T, class U> struct A<T*, U> {  };
-           template<class T, class U> struct A<T, U*> {  };
-           A<int*, char*>  x; // Error 1084 followed by Info 1723
-
-]]> -
- MINOR - LINEAR - 1min -
- - 1724 - L1724: Argument to copy constructor for class 'Symbol' should be a const reference - - -X( const X & ); - -If you leave off the 'const' then some diagnostics will not be possible. [19] - - ]]> - - MINOR - LINEAR - 1min - - - 1725 - L1725: class member 'Symbol' is a reference - - - - MINOR - LINEAR - 1min - - - 1726 - L1726: taking address of overloaded function name 'Symbol' - - - - MINOR - LINEAR - 1min - - - 1727 - L1727: inline 'Symbol' not previously defined inline at (Location) - - - - MINOR - LINEAR - 1min - - - 1728 - L1728: Symbol 'Symbol' was previously defined inline at (Location) - - - - MINOR - LINEAR - 1min - - - 1729 - L1729: Initializer inversion detected for member 'Symbol' - - - - MINOR - LINEAR - 1min - - - 1730 - L1730: class/struct inconsistency for symbol 'Symbol' (conflicts with Location) - - - - MINOR - LINEAR - 1min - - - 1732 - L1732: new in constructor for class 'Name' which has no assignment operator - - - - MINOR - LINEAR - 1min - - - 1733 - L1733: new in constructor for class 'Name' which has no copy constructor - - - - MINOR - LINEAR - 1min - - - 1734 - L1734: Had difficulty compiling template function: 'Symbol' - - - - MINOR - LINEAR - 1min - - - 1735 - L1735: Virtual function 'Symbol' has default parameter - - - - MINOR - LINEAR - 1min - - - 1736 - L1736: Redundant access specifier (String) - - - - MINOR - LINEAR - 1min - - - 1737 - L1737: Symbol 'Symbol' hides global operator new - - - - MINOR - LINEAR - 1min - - - 1738 - L1738: non-copy constructor 'Symbol' used to initialize copy constructor - - - - MINOR - LINEAR - 1min - - - 1739 - L1739: Binary operator 'Symbol' should be non-member function - - - - MINOR - LINEAR - 1min - - - 1740 - L1740: pointer member 'Symbol' (Location) not directly freed or zeroed by destructor - - - - MINOR - LINEAR - 1min - - - 1741 - L1741: member 'Symbol' (Location) conceivably not initialized by constructor - - - - MINOR - LINEAR - 1min - - - 1742 - L1742: member 'Symbol' (Location) conceivably not initialized - - - - MINOR - LINEAR - 1min - - - 1743 - L1743: member 'Symbol' (Location) conceivably not initialized - - - - MINOR - LINEAR - 1min - - - 1744 - L1744: member 'Symbol' (Location) possibly not initialized by private constructor - - - - MINOR - LINEAR - 1min - - - 1745 - L1745: member 'Symbol' (Location) not assigned by private assignment operator - - - - MINOR - LINEAR - 1min - - - 1746 - L1746: parameter 'Symbol' of function 'Symbol' could be made const reference - - - - MINOR - LINEAR - 1min - - - 1747 - L1747: binary operator 'Symbol' returning a reference - - - - MINOR - LINEAR - 1min - - - 1748 - L1748: non-virtual base class 'Name' included twice in class 'Name' - - - - MINOR - LINEAR - 1min - - - 1749 - L1749: base class 'Symbol' of class 'Symbol' need not be virtual - - - - MINOR - LINEAR - 1min - - - 1750 - L1750: local template 'Symbol' (Location) not referenced - - - - MINOR - LINEAR - 1min - - - 1751 - L1751: unnamed namespace in header - - - - MINOR - LINEAR - 1min - - - 1752 - L1752: catch parameter Integer is not a reference - - - - MINOR - LINEAR - 1min - - - 1753 - L1753: Overloading special operator 'Symbol' - - - - MINOR - LINEAR - 1min - - - 1754 - L1754: Expected symbol 'Symbol' to be declared for class 'Symbol' - - - - MINOR - LINEAR - 1min - - - 1755 - L1755: global template 'Symbol' (Location) not referenced - - - - MINOR - LINEAR - 1min - - - 1757 - L1757: Discarded instance of post decrement/increment - - - - MINOR - LINEAR - 1min - - - 1758 - L1758: Prefix increment/decrement operator 'Symbol' returns a non-reference - - - - MINOR - LINEAR - 1min - - - 1759 - L1759: Postfix increment/decrement operator 'Symbol' returns a reference. - - - - MINOR - LINEAR - 1min - - - 1760 - L1760: Redundant template 'Symbol' defined identically at Location - - - - MINOR - LINEAR - 1min - - - 1761 - L1761: Declaration of function 'Symbol' hides overloaded function 'Symbol' (Location) - - - - MINOR - LINEAR - 1min - - - 1762 - L1762: Member function 'Symbol' could be made const - - - - MINOR - LINEAR - 1min - - - 1763 - L1763: Member function 'Symbol' marked as const indirectly modifies class - - - - MINOR - LINEAR - 1min - - - 1764 - L1764: Reference parameter 'Symbol' (Location) could be declared const reference - - -int f( int & k ) { return k; } - -can be redeclared as: -
-int f( const int & k ) { return k; }
-
-Declaring a parameter a reference to const offers advantages that a mere reference does not. In particular, you can pass constants, temporaries and const types into such a parameter where otherwise you may not. In addition it can offer better documentation. -Other situations in which a const can be added to a declaration are covered in messages 818, 952, 953 and 954. - - ]]> -
- MINOR - LINEAR - 1min -
- - 1768 - L1768: Virtual function 'Symbol' has an access (String) different from the access (String) in the base class (String) - - - - MINOR - LINEAR - 1min - - - 1769 - L1769: Member or base class 'Symbol' has no constructor - - - - MINOR - LINEAR - 1min - - - 1770 - L1770: function 'Symbol' defined without function 'String' - - - - MINOR - LINEAR - 1min - - - 1771 - L1771: function 'Symbol' replaces global function - - - - MINOR - LINEAR - 1min - - - 1772 - L1772: Assignment operator 'Symbol' is not returning *this - - - - MINOR - LINEAR - 1min - - - 1773 - L1773: Attempt to cast away const (or volatile) - - - - MINOR - LINEAR - 1min - - - 1774 - L1774: Could use dynamic_cast to downcast ptr to polymorphic type 'Symbol' - - - - MINOR - LINEAR - 1min - - - 1775 - L1775: catch block does not catch any declared exception - - - - MINOR - LINEAR - 1min - - - 1776 - L1776: Converting string literals to Type is not const safe (Context) - - -char *p = "string"; - -will trigger this message. This pointer could then be used to modify the string literal and that could produce some very strange behavior. -Such an assignment is legal but "deprecated" by the C++ Standard. The reason for not ruling it illegal is that numerous existing functions have their arguments typed as char * and this would break working code. -Note that this message is only given for string literals. If an expression is typed as pointer to const char in some way other than via string literal, then an assignment of that pointer to a non-const pointer will receive a more severe warning. - - ]]> - - MINOR - LINEAR - 1min - - - 1777 - L1777: Template recursion limit (Integer) reached, use -tr_limit(n) - - - - MINOR - LINEAR - 1min - - - 1778 - L1778: Assignment of string literal to variable 'Symbol' (Location) is not const safe - - - - MINOR - LINEAR - 1min - - - 1780 - L1780: Returning address of reference parameter 'Symbol' - - - - MINOR - LINEAR - 1min - - - 1781 - L1781: Passing address of reference parameter 'Symbol' into caller address space - - - - MINOR - LINEAR - 1min - - - 1782 - L1782: Assigning address of reference parameter 'Symbol' to a static variable - - - - MINOR - LINEAR - 1min - - - 1784 - L1784: Symbol 'Symbol' previously declared as "C", compare with Location - - - - MINOR - LINEAR - 1min - - - 1785 - L1785: Implicit conversion from Boolean (Context) (Type to Type) - - - - MINOR - LINEAR - 1min - - - 1786 - L1786: Implicit conversion to Boolean (Context) (Type to Type) - - - - MINOR - LINEAR - 1min - - - 1787 - L1787: Access declarations are deprecated in favor of using declarations - - - - MINOR - LINEAR - 1min - - - 1788 - L1788: Variable 'Symbol' (Location) (type 'Name') is referenced only by its constructor or destructor - - - - MINOR - LINEAR - 1min - - - 1789 - L1789: Template constructor 'Symbol' cannot be a copy constructor - - - - MINOR - LINEAR - 1min - - - 1790 - L1790: Base class 'Symbol' has no non-destructor virtual functions - - - - MINOR - LINEAR - 1min - - - 1791 - L1791: No token on this line follows the 'return' keyword - - - - MINOR - LINEAR - 1min - - - 1792 - L1792: Assignment operator for class 'Symbol' does not return a const reference to class - - - - MINOR - LINEAR - 1min - - - 1793 - L1793: While calling 'Symbol': Initializing the implict object parameter 'Type' (a non-const reference) with a non-lvalue - - - - MINOR - LINEAR - 1min - - - 1794 - L1794: Using-declaration introduces 'Name' (Location), which has the same parameter list as 'Name' (Location), which was also introduced here by previous using-declaration 'Name' (Location) - - - - MINOR - LINEAR - 1min - - - 1795 - L1795: Defined template 'Symbol' was not instantiated. - - - - MINOR - LINEAR - 1min - - - 1796 - L1796: Explicit specialization of overloaded function template 'Symbol' - - - - MINOR - LINEAR - 1min - - - 1901 - L1901: Creating a temporary of type 'Symbol' - - - - INFO - LINEAR - 1min - - - 1902 - L1902: useless ';' follows '}' in function definition - - - - INFO - LINEAR - 1min - - - 1904 - L1904: Old-style C comment - - - - INFO - LINEAR - 1min - - - 1905 - L1905: implicit default constructor generated for class 'Name' - - - - INFO - LINEAR - 1min - - - 1907 - L1907: implicit destructor generated for class 'Name' - - - - INFO - LINEAR - 1min - - - 1908 - L1908: 'virtual' assumed for destructor'~Name()' (inherited from base class 'Name() - - - - INFO - LINEAR - 1min - - - 1909 - L1909: 'virtual' assumed, see: function 'Symbol' (Location) - - - - INFO - LINEAR - 1min - - - 1911 - L1911: Implicit call of constructor 'Symbol' (see text) - - - - INFO - LINEAR - 1min - - - 1912 - L1912: Implicit call of conversion function from class 'Name' to type 'Type' - - - - INFO - LINEAR - 1min - - - 1914 - L1914: Default constructor 'Symbol' (Location) not referenced - - - - INFO - LINEAR - 1min - - - 1915 - L1915: Overriding virtual function 'Symbol' is not marked with override - - - - INFO - LINEAR - 1min - - - 1916 - L1916: Ellipsis encountered - - - - INFO - LINEAR - 1min - - - 1917 - L1917: Empty prototype for String, assumed '(void)' - - -int f(); // Info 1717 int f() { return 1; } // Elective Note 1917 - -The reason for this is that the declaration form has a different meaning in C and C++. In C it is an incomplete declaration saying nothing about arguments. In C++ the declaration says there are no arguments. The definition, however, means the same in both languages. See also message 1918. [11, ?8.2.5] - - ]]> - - INFO - LINEAR - 1min - - - 1918 - L1918: empty prototype for member declaration, assumed (void) - - - - INFO - LINEAR - 1min - - - 1919 - L1919: Multiple assignment operators for class 'Symbol' - - - - INFO - LINEAR - 1min - - - 1920 - L1920: Casting to a reference - - - - INFO - LINEAR - 1min - - - 1921 - L1921: Symbol 'Symbol' not checking argument against sizeof(class) - - -This note is given for either operator new or operator delete when defined as member functions. As member functions they are called when new (or delete) is applied to a class type or any derived class type. The difficulty is with the derived class type. Any specialized allocator is likely to be useless for a derived class type and hence experts suggest that a test be made of the size_t argument against sizeof(class). Specifically PC-lint/FlexeLint is looking for one of:

-
-    if( arg == sizeof(class) ) 
-    if( arg != sizeof(class) ) 
-    if( sizeof(class) == arg ) 
-    if( sizeof(class) != arg )
-
-or the equivalent. If any such function is found that is a member of a class that is the base of a derivation, then in addition to Note 1921, we issue Warning 1531. (see Steve Simpson, "More on Memory Management", Dr. Dobb's Journal, August 1994, p. 10). -

References

-

MEM00-CPP. Overloaded new operators should check that their size argument matches the size of their class

- - ]]> -
- cert - INFO - LINEAR - 1min -
- - 1922 - L1922: Symbol 'Symbol' not checking argument for NULL - - -This message is given for a function operator delete which is not checking its parameter for being the NULL pointer. We would normally expect to see some such check as:

-
-    if( arg ) 
-    if( arg == 0 ) 
-    if( arg != NULL )
-
-etc. Classes which have destructors will normally filter out passing the NULL pointer into the operator delete so that this message is only in the Elective Note category. If there is no destructor you obtain a warning. See Warning 1532. - ]]> -
- INFO - LINEAR - 1min -
- - 1923 - L1923: macro 'Symbol' could become const variable - - - - INFO - LINEAR - 1min - - - 1924 - L1924: C-style cast - - - - INFO - LINEAR - 1min - - - 1925 - L1925: Symbol 'Symbol' is a public data member - - - - INFO - LINEAR - 1min - - - 1926 - L1926: Symbol 'Symbol's default constructor implicitly called - - - - INFO - LINEAR - 1min - - - 1927 - L1927: Symbol 'Symbol' did not appear in the constructor initializer list - - - - INFO - LINEAR - 1min - - - 1928 - L1928: Symbol 'Name' did not appear in the constructor initializer list - - - - INFO - LINEAR - 1min - - - 1929 - L1929: function 'Symbol' returning a reference - - - - INFO - LINEAR - 1min - - - 1930 - L1930: Conversion operator 'Symbol' found - - - - INFO - LINEAR - 1min - - - 1931 - L1931: Constructor 'Symbol' can be used for implicit conversions - - - - INFO - LINEAR - 1min - - - 1932 - L1932: Base class 'Symbol' is not abstract. - - - - INFO - LINEAR - 1min - - - 1933 - L1933: Call to unqualified virtual function 'Symbol' from non-static member function - - -void X::g() { f(); // Note 1933 X::f(); // ok -- non virtual call. } - -Even if total abstinence is unwarranted, turning on message 1933 occasionally can be helpful in detecting situations when constructors or destructors call virtual functions. - - ]]> - - INFO - LINEAR - 1min - - - 1934 - L1934: Shift operator 'Symbol' should be non-member function - - - - INFO - LINEAR - 1min - - - 1935 - L1935: Dynamic initialization for class object 'Symbol1' (references 'Symbol2') - - - X x: - -This will elicit Elective Note 1935 that x is being initialized dynamically by a call to X::X(). Now, if this constructor were to be accessing information that depended on the order of evaluation (such as accessing the value of x itself) the result would be undefined. We have no evidence of this at this point. and for this reason the message is in the Elective Note category. However, programmers with a suspected order-of-initialization problem will probably want to turn this on. See also 1936, 1937, 1544 and 1545. - - ]]> - - INFO - LINEAR - 1min - - - 1936 - L1936: Dynamic initialization for scalar 'Symbol1' (references 'Symbol2') - - - - INFO - LINEAR - 1min - - - 1937 - L1937: Static variable 'Symbol' has a destructor. - - - - INFO - LINEAR - 1min - - - 1938 - L1938: constructor 'Symbol' accesses global data. - - - - INFO - LINEAR - 1min - - - 1939 - L1939: Down cast detected - - - - INFO - LINEAR - 1min - - - 1940 - L1940: Address of reference parameter 'Symbol' transferred outside of function - - - - INFO - LINEAR - 1min - - - 1941 - L1941: Assignment operator for class 'Symbol' does not return a const reference to class - - - - INFO - LINEAR - 1min - - - 1942 - L1942: Unqualified name 'Symbol' subject to misinterpretation owing to dependent base class - - - - INFO - LINEAR - 1min - - - 1960 - L1960: Violates MISRA C++ Required Rule Name, String - - In addition to a C coding standard, MISRA has also compiled a C++ one. We suggest use of the options file au-misra-cpp.lnt to activate these and other MISRA C++ messages.

-

The list of checks made are as follows:

-

-       (Rule 0-1-8)  Void return type for function without external side-effects.
-       (Rule 2-13-2) Octal constant or escape sequence used.
-       (Rule 2-13-4) Lower case literal suffix.
-       (Rule 3-1-1)  Object/function definitions in headers.
-       (Rule 3-1-2)  Function not declared at file scope.
-       (Rule 3-2-3)  Object/function previously declared in location.
-       (Rule 3-9-3)  Bit representation of a floating point type used.
-       (Rule 4-5-1)  Boolean expression used with non-permitted operator.
-       (Rule 4-5-3)  Plain char used with prohibited operator.
-       (Rule 5-0-3)  Implicit conversion of cvalue.
-       (Rule 5-0-4)  Implicit conversion changes signedness.
-       (Rule 5-0-5)  Implicit conversion between integer and floating point types.
-       (Rule 5-0-6)  Implicit conversion to smaller type.
-       (Rule 5-0-7)  Cast of cvalue between integer and floating point types.
-       (Rule 5-0-8)  Cast of cvalue to larger type.
-       (Rule 5-0-9)  Cast of cvalue changes signedness.
-       (Rule 5-0-10) Recasting required for operators '~' and '<<'.
-       (Rule 5-0-11) Disallowed use of non-character value.
-       (Rule 5-0-12  Disallowed use of non-numeric value.
-       (Rule 5-0-15) Pointer arithmetic other than array indexing used.
-       (rule 5-0-19) More than two pointer indirection levels used.
-       (Rule 5-0-21) Bitwise operator applied to signed underlying type.
-       (Rule 5-2-1)  Non-postfix expression used with logical operator.
-       (Rule 5-2-5)  Attempt to cast away const/volatile from a pointer or reference.
-       (Rule 5-2-12) Array-pointer decay when passing the array to a function.
-       (Rule 5-3-1)  Boolean expresion required for operator.
-       (Rule 5-3-2)  Prohibited operator applied to unsigned underlying type: .
-       (Rule 5-3-3)  Overloading unary &.
-       (Rule 5-3-4)  'sizeof' used on expressions with side effect.
-       (Rule 5-14-1) Side effects on right hand side of logical operator.
-       (Rule 5-18-1) Comma operator used.
-       (Rule 6-2-3)  Null statement not in line by itself.
-       (Rules 6-3-1 and 6-4-1) Left brace expected for if, else, for, do, switch and while.
-       (Rule 6-4-2)  No 'else' at end of 'if ... else if' chain.
-       (Rule 6-4-7)  Boolean value in switch expression.
-       (Rule 6-6-2)  Gotos jumping to an earlier point in the code.
-       (Rule 6-6-3)  continue statement should not be used.
-       (Rule 6-6-4)  More than one 'break' terminates loop.
-       (Rule 7-3-1)  Global declarations other than main(), namespace declarations, extern "C" declarations and arithmetic typedefs.
-       (Rule 7-3-2)  Using the identifier main for functions other than the global one.
-       (Rule 7-3-3)  Unnamed namespaces in headers.
-       (Rule 7-3-4)  No using-directives allowed.
-       (Rule 7-3-6)  using-directives or using declarations (except class and/or block scope using declarations) in header files.
-       (Rule 8-0-1)  Multiple declarators in a declaration.
-       (Rule 8-4-1)  Function has variable number of arguments.
-       (Rule 8-4-2)  Function parameter list differs
-       (Rule 8-4-4)  Function identifier used without '&' or parenthisized parameter list.
-       (Rule 8-5-3)  Should initialize either all enum members or only the first.
-       (Rule 9-5-1)  Unions shall not be used.
-       (Rule 11-0-1) Non-private data member within a no-POD structure.
-       (Rule 12-8-2) Public copy constructor in abstract class.
-       (Rule 14-8-1) Explicit specialization of overloaded function templates.
-       (Rule 15-1-2) Explicit throw of the Null macro.
-       (Rule 15-1-3) Empty throw outside of a catch block.
-       (Rule 15-3-7) Catch handler after catch(...) in a try-catch sequence.
-       (Rule 16-0-1) Only preprocessor statements and comments before '#include'.
-       (Rule 16-0-2) '#define/#undef' used within a block.
-       (Rule 16-0-3) Use of '#undef' is discouraged.
-       (Rule 16-0-4) Use of function-like macros is discouraged.
-       (Rule 16-1-1) Non-standard use of 'defined' preprocessor operator.
-       (Rule 16-2-4) Header file name with non-standard character: .
-       (Rule 16-3-1) Multiple use of '#' and/or '##' operators in macro definition.
-       (Rule 17-0-2) Re-use of reserved identifier
-
-

You may disable individual rules to your taste by using the Rule number in an esym option; see Message 960.

- ]]> -
- INFO - LINEAR - 1min -
- - 1961 - L1961: virtual member function 'Symbol' could be made const - - - - INFO - LINEAR - 1min - - - 1962 - L1962: Non-const member function 'Symbol' contains a deep modification. - - - - INFO - LINEAR - 1min - - - 1963 - L1963: Violates MISRA C++ Advisory Rule Name, String - - This message is issued for some violations of the MISRA C++ advisory guidelines. We suggest use of the options file au-misra-cpp.lnt to activate these and other MISRA C++ messages.

-

The list of checks made are as follows:

-

-       (Rule 2-5-1)  Possible digraph used.
-       (Rule 5-0-2)  Dependence placed on C's operator precedence.
-       (Rule 5-2-10) Increment or decrement combined with another operator.
-       (Rule 14-8-2) Mixing template and non-template functions in a viable sets.
-       (Rule 15-0-2) Throwing a pointer expression.
-       (Rule 16-2-5) Header file name with non-standard character.
-       (Rule 16-3-2) No use of '#' or '##'.
-
-]]> -
- INFO - LINEAR - 1min -
- - 9001 - L9001: Octal constant used - - - - INFO - LINEAR - 1min - - - 9003 - L9003: could define variable 'Symbol' at block scope - - - - INFO - LINEAR - 1min - - - 9004 - L9004: object/function 'Symbol' previously declared - - - - INFO - LINEAR - 1min - - - 9005 - L9005: attempt to cast away const/volatile from a pointer or reference - - - - INFO - LINEAR - 1min - - - 9006 - L9006: 'sizeof' used on expression with side effect - - - - INFO - LINEAR - 1min - - - 9007 - L9007: side effects on right hand of logical operator, 'String' - - - - INFO - LINEAR - 1min - - - 9008 - L9008: comma operator used - - - - INFO - LINEAR - 1min - - - 9009 - L9009: floating point variable used as loop counter - - - - INFO - LINEAR - 1min - - - 9011 - L9011: more than one 'break' terminates loop - - - - INFO - LINEAR - 1min - - - 9012 - L9012: sub-statement should be a compound statement - - - - INFO - LINEAR - 1min - - - 9013 - L9013: no 'else' at end of 'if ... else if' chain - - - - INFO - LINEAR - 1min - - - 9014 - L9014: default missing from switch statement - - - - INFO - LINEAR - 1min - - - 9015 - L9015: macro argument is used both with and without '#/##' and is subject to further replacement - - - - INFO - LINEAR - 1min - - - 9016 - L9016: pointer arithmetic other than array indexing used - - - - INFO - LINEAR - 1min - - - 9017 - L9017: pointer arithmetic by increment or decrement used - - - - INFO - LINEAR - 1min - - - 9018 - L9018: declaration of union type or object of union type, 'Type' - - - - INFO - LINEAR - 1min - - - 9019 - L9019: declaration of 'String' before #include - - - - INFO - LINEAR - 1min - - - 9020 - L9020: header file name with non-standard character 'String' - - - - INFO - LINEAR - 1min - - - 9021 - L9021: use of '#undef' is discouraged: 'String' - - - - INFO - LINEAR - 1min - - - 9022 - L9022: unparenthesized macro parameter in definition of macro 'String' - - - - INFO - LINEAR - 1min - - - 9023 - L9023: Multiple use of '#/##' operators in definition of macro 'String' - - - - INFO - LINEAR - 1min - - - 9024 - L9024: '#/##' operator used in macro 'String' - - - - INFO - LINEAR - 1min - - - 9025 - L9025: More than two pointer indirection levels used for type 'Type' - - - - INFO - LINEAR - 1min - - - 9026 - L9026: Function-like macro, 'String', defined - - - - INFO - LINEAR - 1min - - - 9027 - L9027: Unpermitted operand to operator 'String' - - - - INFO - LINEAR - 1min - - - 9028 - L9028: Unpermitted arithmetic involving an essentially character type - - - - misra - INFO - LINEAR - 1min - - - 9029 - L9029: Mismatched essential type categories for binary operator - - - - misra - INFO - LINEAR - 1min - - - 9030 - L9030: Impermissible cast - - - - misra - INFO - LINEAR - 1min - - - 9031 - L9031: Composite expression assigned to a wider essential type - - - - misra - INFO - LINEAR - 1min - - - 9032 - L9032: Composite expression with smaller essential type than other operand - - - - misra - INFO - LINEAR - 1min - - - 9033 - L9033: Impermissible cast of composite expression - - - - misra - INFO - LINEAR - 1min - - - 9034 - L9034: Expression assigned to a narrower or different essential type - - - - misra - INFO - LINEAR - 1min - - - 9035 - L9035: Variable length array declared - - - - INFO - LINEAR - 1min - - - 9036 - L9036: Conditional expression should have essentially Boolean type - - - - misra - INFO - LINEAR - 1min - - - 9037 - L9037: Conditional of #if does not evaluate to 0 or 1 - - - - INFO - LINEAR - 1min - - - 9038 - L9038: Flexible array member declared - - - - INFO - LINEAR - 1min - - - 9039 - L9039: Prohibited escape sequence usage - - - - INFO - LINEAR - 1min - - - 9041 - L9041: goto 'Symbol' appears in block 'String' which is not nested in block 'String' which contains the label. - - It has been deemed safer by some experts that the block (i.e. compound statement) containing the goto should be the same as or nested within the block containing the label. Thus

-

-           {  label:  {  goto label;  }  }
-
-

is permitted but

-

-           {  goto label;  {  label:  }  }
-
-

is not. To assist the programmer, the message refers to the blocks using an identification code (Example: "1.2.1"). This identification scheme is defined as follows.

-
    -
  • The outer block has an identification of 1.
  • -
  • If a particular block is identified by x then its immediate subblocks, if any, are identified as x.1, x.2, x.3, etc.
  • -
-

Thus in the following 'code',

-

-           {  {  }  { { label: } { } } }
-
-

label: lies in block 1.2.1.

]]> -
- INFO - LINEAR - 1min -
- - 9042 - L9042: departure from MISRA switch syntax - - - - INFO - LINEAR - 1min - - - 9043 - L9043: static keyword between brackets of array declaration - - - - INFO - LINEAR - 1min - - - 9044 - L9044: function parameter modified - - - - INFO - LINEAR - 1min - - - 9045 - L9045: non-hidden definition of type 'Type' - - - - INFO - LINEAR - 1min - - - 9046 - L9046: Typographical ambiguity with respect to symbol, 'Symbol', Reasons, Location - - - - INFO - LINEAR - 1min - - - 9047 - L9047: FILE pointer dereferenced - - - - INFO - LINEAR - 1min - - - 9048 - L9048: unsigned integer literal without a 'U' suffix - - - - INFO - LINEAR - 1min - - - 9049 - L9049: increment/decrement operation combined with other operation with side-effects - - - - INFO - LINEAR - 1min - - - 9050 - L9050: dependence placed on C/C++ operator precedence - - - - INFO - LINEAR - 1min - - - 9051 - L9051: macro 'Symbol' defined with the same name as a C keyword - - - - INFO - LINEAR - 1min - - - 9052 - L9052: macro 'Symbol' defined with the same name as a C++ keyword - - - - INFO - LINEAR - 1min - - - 9053 - L9053: the shift value is at least the precision of the essential type of the left hand side - - - - INFO - LINEAR - 1min - - - 9054 - L9054: designated initializer used with array of unspecified dimension - - - - INFO - LINEAR - 1min - - - 9055 - L9055: Most closely enclosing compound statement of a case/default is not the body of a switch - - - - INFO - LINEAR - 1min - - - 9056 - L9056: Inline function 'Symbol' defined with storage-class specifier 'String' - - - - INFO - LINEAR - 1min - - - 9057 - L9057: Lowercase L follows 'u' in literal suffix - - - - INFO - LINEAR - 1min - - - 9058 - L9058: tag 'Symbol' (Location) unused outside of typedefs - - - - INFO - LINEAR - 1min - - - 9059 - L9059: C comment contains C++ comment - - - - INFO - LINEAR - 1min - - - 9060 - L9060: trigraph in comment - - - - INFO - LINEAR - 1min - - - 9063 - L9063: no comment or action in else-branch - - - - INFO - LINEAR - 1min - - - 9064 - L9064: goto references earlier label - - - - INFO - LINEAR - 1min - - - 9066 - L9066: C++ comment contains C comment - - - - INFO - LINEAR - 1min - - - 9067 - L9067: array declared without explicit dimension - - - - INFO - LINEAR - 1min - - - 9068 - L9068: partial array initialization - - - - INFO - LINEAR - 1min - - - 9069 - L9069: in initializer for symbol 'Symbol', initializer of type 'Type' needs braces or designator - - - - INFO - LINEAR - 1min - - - 9070 - L9070: recursive function 'Symbol', location Location - - - - INFO - LINEAR - 1min - - - 9071 - L9071: defined macro 'Name' is reserved to the compiler String - - - - INFO - LINEAR - 1min - - - 9072 - L9072: parameter list differs from prior declaration for function 'Symbol' - - - - INFO - LINEAR - 1min - - - 9074 - L9074: conversion between a pointer to function and another type - - - - INFO - LINEAR - 1min - - - 9075 - L9075: external symbol 'Symbol' defined without a prior declaration - - - - INFO - LINEAR - 1min - - - 9076 - L9076: conversion between a pointer to incomplete type and another type - - - - INFO - LINEAR - 1min - - - 9077 - L9077: missing unconditional break from final switch case - - - - INFO - LINEAR - 1min - - - 9078 - L9078: conversion between a pointer and integer type - - - - INFO - LINEAR - 1min - - - 9079 - L9079: conversion from pointer to void to pointer to other type - - - - INFO - LINEAR - 1min - - - 9080 - L9080: integer null pointer constant used - - - - INFO - LINEAR - 1min - - - 9081 - L9081: too few independent cases for switch - - - - INFO - LINEAR - 1min - - - 9082 - L9082: switch statement should either begin or end with default label - - - - INFO - LINEAR - 1min - - - 9083 - L9083: undefined macro 'String' matches an identifier reserved to the compiler - - - - INFO - LINEAR - 1min - - - 9084 - L9084: result of assignment operator used in larger expression - - - - INFO - LINEAR - 1min - - - 9085 - L9085: statement or comment should appear in default case - - - - INFO - LINEAR - 1min - - - 9086 - L9086: include directives should have single arguments - - - - INFO - LINEAR - 1min - - - 9087 - L9087: cast performed between a pointer to object type and a pointer to a different object type - - - - INFO - LINEAR - 1min - - - 9088 - L9088: named signed single-bit bit-field - - - - INFO - LINEAR - 1min - - - 9089 - L9089: potential side-effect in argument to sizeof - - - - INFO - LINEAR - 1min - - - 9090 - L9090: unconditional break missing from switch case - - - - INFO - LINEAR - 1min - - - 9091 - L9091: casting from pointer type to integer type - - - - INFO - LINEAR - 1min - - - 9092 - L9092: casting between a pointer to void and an integral type - - - - INFO - LINEAR - 1min - - - 9102 - L9102: possible digraph, 'String' - - - - INFO - LINEAR - 1min - - - 9104 - L9104: octal escape sequence used - - - - INFO - LINEAR - 1min - - - 9105 - L9105: unsigned octal and hexadecimal literals require a 'U' suffix - - - - INFO - LINEAR - 1min - - - 9106 - L9106: lower case literal suffix, 'String' - - - - INFO - LINEAR - 1min - - - 9107 - L9107: header cannot be included in more than one translation unit because of the definition of symbol 'Symbol' - - - - INFO - LINEAR - 1min - - - 9108 - L9108: function 'Symbol' not declared at file scope - - - - INFO - LINEAR - 1min - - - 9109 - L9109: type 'Symbol' previously declared at location 'Location' - - - - INFO - LINEAR - 1min - - - 9110 - L9110: bit representation of a floating point type used - - - - INFO - LINEAR - 1min - - - 9111 - L9111: boolean expression used with non-permitted operator 'String' - - - - INFO - LINEAR - 1min - - - 9112 - L9112: plain char used with prohibited operator 'String' - - - - INFO - LINEAR - 1min - - - 9113 - L9113: dependence placed on C/C++ operator precedence - - - - INFO - LINEAR - 1min - - - 9114 - L9114: implicit conversion of integer cvalue expression - - - - INFO - LINEAR - 1min - - - 9115 - L9115: implicit conversion from integer to floating point type - - - - INFO - LINEAR - 1min - - - 9116 - L9116: implicit conversion of floating point cvalue expression - - - - INFO - LINEAR - 1min - - - 9117 - L9117: implicit conversion changes signedness - - - - INFO - LINEAR - 1min - - - 9118 - L9118: implicit conversion from floating point to integer type - - - - INFO - LINEAR - 1min - - - 9119 - L9119: implicit conversion of integer to smaller type - - - - INFO - LINEAR - 1min - - - 9120 - L9120: implicit conversion of floating point to smaller type - - - - INFO - LINEAR - 1min - - - 9121 - L9121: cast of cvalue expression from integer to floating point type - - - - INFO - LINEAR - 1min - - - 9122 - L9122: cast of cvalue expression from floating point to integer type - - - - INFO - LINEAR - 1min - - - 9123 - L9123: cast of integer cvalue expression to larger type - - - - INFO - LINEAR - 1min - - - 9124 - L9124: cast of floating point cvalue expression to larger type - - - - INFO - LINEAR - 1min - - - 9125 - L9125: cast of cvalue expression changes signedness - - - - INFO - LINEAR - 1min - - - 9126 - L9126: operators '~' and '<<' require recasting to underlying type for sub-integers - - - - INFO - LINEAR - 1min - - - 9127 - L9127: disallowed use of non-character value String - - - - INFO - LINEAR - 1min - - - 9128 - L9128: plain char mixed with type other than plain char - - - - INFO - LINEAR - 1min - - - 9129 - L9129: disallowed use of non-numeric value String - - - - INFO - LINEAR - 1min - - - 9130 - L9130: bitwise operator 'String' applied to signed underlying type - - - - INFO - LINEAR - 1min - - - 9131 - L9131: non-postfix expression used with logical operator - - - - INFO - LINEAR - 1min - - - 9132 - L9132: array type passed to function expecting a pointer - - - - INFO - LINEAR - 1min - - - 9133 - L9133: boolean expression required for operator 'String' - - - - INFO - LINEAR - 1min - - - 9134 - L9134: prohibited operator 'String' applied to unsigned underlying type - - - - INFO - LINEAR - 1min - - - 9135 - L9135: unary operator & overloaded - - - - INFO - LINEAR - 1min - - - 9136 - L9136: out of bounds value for right hand side of shift operator - - - - INFO - LINEAR - 1min - - - 9137 - L9137: floating point test for equality or inequality - - - - INFO - LINEAR - 1min - - - 9138 - L9138: null statement not in line by itself - - - - INFO - LINEAR - 1min - - - 9139 - L9139: case label follows default in switch statement - - - - INFO - LINEAR - 1min - - - 9140 - L9140: continue statement detected - - - - INFO - LINEAR - 1min - - - 9141 - L9141: global declaration of symbol 'Symbol' - - - - INFO - LINEAR - 1min - - - 9142 - L9142: non-global function, main, declared - - - - INFO - LINEAR - 1min - - - 9144 - L9144: using-directive used - - - - INFO - LINEAR - 1min - - - 9145 - L9145: using-directive/declaration in header file - - - - INFO - LINEAR - 1min - - - 9146 - L9146: multiple declarators in a declaration - - - - INFO - LINEAR - 1min - - - 9147 - L9147: function identifier 'Symbol' used without '&' or parenthesized parameter list - - - - INFO - LINEAR - 1min - - - 9148 - L9148: '=' should initialize either all enum members or only the first for enumerator 'Symbol' - - - - INFO - LINEAR - 1min - - - 9149 - L9149: bit field must be explicitly signed integer, unsigned integer, or bool - - - - INFO - LINEAR - 1min - - - 9150 - L9150: non-private data member 'Symbol' within a non-POD structure - - - - INFO - LINEAR - 1min - - - 9151 - L9151: public copy assignment operator in abstract class - - - - INFO - LINEAR - 1min - - - 9152 - L9152: explicit specialization of overloaded function templates 'String' and 'String' - - - - INFO - LINEAR - 1min - - - 9153 - L9153: viable set contains both function 'Symbol' and template 'Symbol' - - - - INFO - LINEAR - 1min - - - 9154 - L9154: pointer expression thrown - - - - INFO - LINEAR - 1min - - - 9156 - L9156: empty throw outside of a catch block - - - - INFO - LINEAR - 1min - - - 9158 - L9158: '#define' used within a block for macro 'Name' - - - - INFO - LINEAR - 1min - - - 9159 - L9159: '#undef' used within a block for macro 'Name' - - - - INFO - LINEAR - 1min - - - 9160 - L9160: all preprocessing directives must be valid - - - - INFO - LINEAR - 1min - - - 9162 - L9162: use of 'String' at global scope - - - - INFO - LINEAR - 1min - - - 9163 - L9163: increment/decrement operator combined with another operator - - - - INFO - LINEAR - 1min - - - 9165 - L9165: function 'Symbol' defined with a variable number of arguments - - - - INFO - LINEAR - 1min - - - 9166 - L9166: function parameter list differs from prior declaration/overloaded function - - - - INFO - LINEAR - 1min - - - M1.1 - M1.1: Strict ANSI checking (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M1.2 - M1.2: No undefined or unspecified behavior (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M1.4 - M1.4: Identifier names must be unique in first 31 characters (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M2.1 - M2.1: No in-line assembly language (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M2.2 - M2.2: Do not use // comments (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M2.3 - M2.3: No nested comments (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M2.4 - M2.4: No nested comments (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M3.4 - M3.4: Report on pragma use (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M3.6 - M3.6: libraries should conform to MISRA standard (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M4.1 - M4.1: do not use non-ANSI escape sequences (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M4.2 - M4.2: do not use trigraphs (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M5.1 - M5.1: identifier names must be unique in first 31 characters (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M5.2 - M5.2: complain about name hiding (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M5.3 - M5.3: Do not reuse typedef names (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M5.4 - M5.4: Do not reuse tag names (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M5.5 - M5.5: Complain about name hiding (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M5.6 - M5.6: Complain about name hiding (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M5.7 - M5.7: Do not reuse identifier names (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M6.1 - M6.1: disallowed use of plain char (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M6.2 - M6.2: disallowed use of plain char (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M6.3 - M6.3: do not use modifiers (int, char, etc) outside of a typedef (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M6.4 - M6.4: bitfield type should be unsigned int or signed int (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M6.5 - M6.5: small bit field should be unsigned int (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M7.1 - M7.1: Octal constant used (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M8.1 - M8.1: use function prototypes (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M8.2 - M8.2: function has no explicit type (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M8.3 - M8.3: declaration and definition should have identical parameter types (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M8.4 - M8.4: symbol redeclared (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M8.5 - M8.5: No definitions of objects or function in header files (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M8.6 - M8.6: Function not declared at file scope (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M8.7 - M8.7: could define variable at block scope (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M8.8 - M8.8: object/function previously declared (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M8.9 - M8.9: symbol previously defined (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M8.10 - M8.10: symbol could be made static (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M8.11 - M8.11: symbol previously used as static (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M8.12 - M8.12: array has 0 dimension (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M9.1 - M9.1: symbol not initialized (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M9.2 - M9.2: omitted braces within an initializer (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M9.3 - M9.3: Should initialize either all enum members or only the first (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M10.1 - M10.1: loss of precision / possible loss of fraction (MISRA C) - - -
  • it is not a conversion to a wider integer type of the same signedness, or
  • -
  • the expression is complex, or
  • -
  • the expression is not constant and is a function argument, or
  • -
  • the expression is not constant and is a return expression
  • - - - ]]> -
    - misra - INFO - LINEAR - 1min -
    - - M10.2 - M10.2: prototype coercion (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M10.3 - M10.3: prohibited cast of complex integer expression (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M10.4 - M10.4: prohibited cast of complex floating point (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M10.5 - M10.5: recasting required for << and - operators (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M10.6 - M10.6: unsigned integer literals require a 'U' suffix (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M11.1 - M11.1: cast pointer to non-pointer (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M11.2 - M11.2: cast pointer to non-pointer (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M11.3 - M11.3: cast pointer to non-pointer (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M11.4 - M11.4: cast pointer to pointer (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M11.5 - M11.5: attempt to cast away const/volatile from a pointer or reference (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M12.1 - M12.1: dependence on C's operator precedence (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M12.2 - M12.2: order of evaluation (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M12.3 - M12.3: 'sizeof' used on expressions with side effect (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M12.4 - M12.4: Side effects on right hand side of logical operator (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M12.5 - M12.5: non-primary expression used with logical operator (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M12.6 - M12.6: boolean expression required for logical operator (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M12.7 - M12.7: Bitwise operator applied to signed underlying type (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M12.8 - M12.8: excessive shift value (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M12.9 - M12.9: Prohibited operator applied to unsigned underlying type (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M12.10 - M12.10: Comma operator used outside of 'for' expression (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M12.11 - M12.11: overflow in computing constant (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M12.12 - M12.12: bit representation of a floating point type used (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M12.13 - M12.13: increment or decrement combined with another operator (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M13.1 - M13.1: boolean test of assignment (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M13.2 - M13.2: boolean test of assignment (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M13.3 - M13.3: testing floats for equality (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M13.4 - M13.4: Floating point variable used as loop counter (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M13.5 - M13.5: "for" loop expressions do not match (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M13.6 - M13.6: detect loop variables modified within the loop (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M13.7 - M13.7: constant value Boolean (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M14.1 - M14.1: unreachable code (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M14.2 - M14.2: non-null statement has no effect (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M14.3 - M14.3: Null statement not in line by itself (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M14.4 - M14.4: do not use goto (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M14.5 - M14.5: continue statement should not be used (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M14.6 - M14.6: More than one 'break' terminates loop (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M14.7 - M14.7: return before function end (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M14.8 - M14.8: use braces around body of switch, else, for, do, while (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M14.9 - M14.9: use braces around body of if, else, else if (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M14.10 - M14.10: No 'else' at end of 'if ... else if' chain (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M15.0 - M15.0: use MISRA switch syntax (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M15.1 - M15.1: need a switch (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M15.2 - M15.2: use break to terminate case (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M15.3 - M15.3: case label follows default in switch statement (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M15.4 - M15.4: Boolean value in switch expression (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M15.5 - M15.5: switch does not have a case (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M16.1 - M16.1: Function has variable number of arguments (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M16.2 - M16.2: do not use recursive functions (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M16.3 - M16.3: use identifiers for all parameters in a prototype (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M16.4 - M16.4: function parameter list differs from prior declaration (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M16.5 - M16.5: function declaration is missing type info (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M16.6 - M16.6: too few or too many arguments for prototype (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M16.7 - M16.7: use const on parameters where appropriate (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M16.8 - M16.8: function should return a value (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M16.9 - M16.9: function identifier used without "&" or parenthesized parameter list (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M16.10 - M16.10: ignoring return value of function (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M17.1 - M17.1: pointer arithmetic used on non-array (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M17.2 - M17.2: relational or subtract operator applied to pointers (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M17.3 - M17.3: relational or subtract operator applied to pointers (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M17.4 - M17.4: pointer arithmetic by increment or decrement (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M17.5 - M17.5: more than two pointer indirection levels used (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M17.6 - M17.6: assigning address of auto to outer scope symbol or to static (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M18.1 - M18.1: vacuous type for variable (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M18.4 - M18.4: Unions shall not be used,MISRA Rule 18.4 - - - - misra - INFO - LINEAR - 1min - - - M19.1 - M19.1: only preprocessor statements and comments before '#include' (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M19.2 - M19.2: header file name with non-standard character (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M19.3 - M19.3: need < or " after #include (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M19.4 - M19.4: expression-like macro not parenthesized (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M19.5 - M19.5: '#define/#undef' used within a block (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M19.6 - M19.6: Use of '#undef' prohibited (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M19.7 - M19.7: use function instead of function-like macro (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M19.8 - M19.8: syntax error in call of macro (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M19.9 - M19.9: preprocessor directives in macro invocation (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M19.10 - M19.10: expression-like macro not parenthesized (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M19.11 - M19.11: undefined preprocessor variable (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M19.12 - M19.12: Multiple use of '#' and/or '##' operators in macro definition (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M19.13 - M19.13: do not use of # or ## operators in macro definition (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M19.14 - M19.14: Non-standard use of 'defined' preprocessor operator (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M19.15 - M19.15: repeated include file (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M19.16 - M19.16: #endif or #else is not followed by EOL (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M19.17 - M19.17: #if not closed within file (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M20.1 - M20.1: do not redefine standard functions (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M20.2 - M20.2: re-use of reserved identifier (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M20.3 - M20.3: calls to standard library functions are checked (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M20.4 - M20.4: do not use dynamic heap allocation (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M20.5 - M20.5: do not use errno (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M20.6 - M20.6: do not use offsetof (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M20.7 - M20.7: do not use longjmp, setjmp (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M20.8 - M20.8: do not use signal, raise (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M20.9 - M20.9: do not use stdio.h (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M20.10 - M20.10: do not use atof, atio, atoll (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M20.11 - M20.11: do not use abort, exit, getenv, system (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M20.12 - M20.12: do not use time, strftime, clock, difftime, mktime (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M21.1 - M21.1: static analysis by using PC-lint/FlexeLint (MISRA C) - - - - misra - INFO - LINEAR - 1min - - - M0-1-1 - M0-1-1: Unreachable (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M0-1-2 - M0-1-2: infeasible path (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M0-1-3 - M0-1-3: unused variable (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M0-1-4 - M0-1-4: symbol not referenced or accessed (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M0-1-5 - M0-1-5: unused type declaration (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M0-1-6 - M0-1-6: last value assigned to variable not used (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M0-1-7 - M0-1-7: ignoring return value of function (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M0-1-8 - M0-1-8: Void return type for function without external side-effects (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M0-1-9 - M0-1-9: dead(redundant) code (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M0-1-10 - M0-1-10: unused function (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M0-1-11 - M0-1-11: unused function parameter (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M0-1-12 - M0-1-12: unused function parameter (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M0-2-1 - M0-2-1: unions shall not be used (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M0-3-2 - M0-3-2: ignoring return value of function (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M1-0-1 - M1-0-1: strict ANSI / ISO (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M2-3-1 - M2-3-1: do not use trigraphs (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M2-5-1 - M2-5-1: possible digraph used (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M2-7-1 - M2-7-1: do not nest comments (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M2-10-1 - M2-10-1: suspicious constant (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M2-10-2 - M2-10-2: report on name hiding (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M2-10-6 - M2-10-6: symbol redeclared (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M2-13-1 - M2-13-1: non-ANSI escape sequence (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M2-13-2 - M2-13-2: octal constant or escape sequence used (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M2-13-3 - M2-13-3: unsigned octal & hexadecimal literals require a ‘U’ suffix (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M2-13-4 - M2-13-4: Lower case literal suffix (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M2-13-5 - M2-13-5: mixing narrow and wide string literals in concatenation (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M3-1-1 - M3-1-1: Object/function definitions in headers (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M3-1-2 - M3-1-2: Function not declared at file scope (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M3-1-3 - M3-1-3: Array has dimension 0 (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M3-2-1 - M3-2-1: Symbol is redeclared or redefined (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M3-2-2 - M3-2-2: Symbol is redeclared or redefined (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M3-2-3 - M3-2-3: Object/function type previously declared (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M3-2-4 - M3-2-4: Symbol is redeclared or redefined (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M3-3-1 - M3-3-1: Header declaration for symbol could be moved from header to module/symbol could be made static (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M3-3-2 - M3-3-2: Static symbol not declared static (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M3-9-2 - M3-9-2: Type or modifier used outside of typedef (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M3-9-3 - M3-9-3: Bit representation of a floating point type used (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M4-5-1 - M4-5-1: Boolean expression used with non-permitted operator (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M4-5-3 - M4-5-3: Plain char used with prohibited operator (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M4-10-2 - M4-10-2: Implicit conversion from 0 to pointer (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M5-0-1 - M5-0-1: Order of evaluation (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M5-0-2 - M5-0-2: Dependence placed on C's operator precedence (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M5-0-3 - M5-0-3: Implicit conversion of cvalue (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M5-0-4 - M5-0-4: Implicit conversion changes signedness (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M5-0-5 - M5-0-5: Implicit conversion between integer and floating point types (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M5-0-6 - M5-0-6: Implicit conversion to smaller type (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M5-0-7 - M5-0-7: Cast of cvalue between integer and floating point types (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M5-0-8 - M5-0-8: Cast of cvalue to larger type (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M5-0-9 - M5-0-9: Cast of cvalue changes signedness (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M5-0-10 - M5-0-10: Recasting required for operators '~' and '<<' (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M5-0-11 - M5-0-11: Type other than plain char (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M5-0-12 - M5-0-12: Disallowed use of non-numeric value (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M5-0-13 - M5-0-13: Implicit conversion (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M5-0-14 - M5-0-14: Implicit conversion (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M5-0-15 - M5-0-15: pointer arithmetic other than array indexing used (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M5-0-16 - M5-0-16: Out-of-bounds pointer (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M5-0-17 - M5-0-17: Subtract operator applied to pointers (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M5-0-18 - M5-0-18: Relational operator applied to pointers (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M5-0-19 - M5-0-19: More than two pointer indirection levels used (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M5-0-21 - M5-0-21: Bitwise operator applied to signed underlying type (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M5-2-1 - M5-2-1: non-postfix expression used with logical operator (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M5-2-2 - M5-2-2: use dynamic_cast to downcast polymorphic type (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M5-2-4 - M5-2-4: C-style cast (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M5-2-5 - M5-2-5: attempt to cast away const/volatile from a pointer or reference (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M5-2-6 - M5-2-6: Suspicious cast / unusual pointer cast (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M5-2-7 - M5-2-7: Pointer conversion to an unrelated type (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M5-2-8 - M5-2-8: Cast from integer or pointer to void to a pointer to an object (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M5-2-9 - M5-2-9: Cast from pointer to integral type (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M5-2-10 - M5-2-10: Increment or decrement combined with another operator (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M5-2-11 - M5-2-11: overloading special operators – ',' '&&' '||' (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M5-2-12 - M5-2-12: Array-pointer decay when passing the array to a function (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M5-3-1 - M5-3-1: boolean expression required for operator: '||'; the -strong(B,...) option can help provide Boolean-by-enforcement (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M5-3-2 - M5-3-2: Prohibited operator applied to unsigned underlying type (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M5-3-3 - M5-3-3: Overloading unary & (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M5-3-4 - M5-3-4: 'sizeof' used on expressions with side effect (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M5-8-1 - M5-8-1: excessive shift value (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M5-14-1 - M5-14-1: Side effects on right hand side of logical operator (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M5-18-1 - M5-18-1: Comma operator used (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M5-19-1 - M5-19-1: Overflow in computing constant (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M6-2-1 - M6-2-1: Assignment operator used in sub-expression (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M6-2-2 - M6-2-2: Testing floats for equality (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M6-2-3 - M6-2-3: Null statement not in line by itself (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M6-3-1 - M6-3-1: Left brace expected for if, else, for, do, switch and while (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M6-4-1 - M6-4-1: Left brace expected for if, else, for, do, switch and while (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M6-4-2 - M6-4-2: No 'else' at end of 'if ... else if' chain (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M6-4-5 - M6-4-5: Control flows into case/default (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M6-4-6 - M6-4-6: Switch statement has no default or case follows default (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M6-4-7 - M6-4-7: Boolean value in switch expression (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M6-4-8 - M6-4-8: Switch does not have a case (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M6-5-3 - M6-5-3: Reuse of for loop variable could cause chaos (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M6-6-2 - M6-6-2: Gotos jumping to an earlier point in the code (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M6-6-3 - M6-6-3: continue statement should not be used (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M6-6-4 - M6-6-4: More than one 'break' terminates loop (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M6-6-5 - M6-6-5: Return before function end (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M7-1-1 - M7-1-1: Use const on parameters where appropriate (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M7-1-2 - M7-1-2: Use const on parameters where appropriate (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M7-3-1 - M7-3-1: Global declarations other than main(), namespace declarations, extern "C" declarations and arithmetic typedefs (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M7-3-2 - M7-3-2: Using the identifier main for functions other than the global one (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M7-3-3 - M7-3-3: Unnamed namespaces in headers (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M7-3-4 - M7-3-4: No using-directives allowed (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M7-3-6 - M7-3-6: Using-directives or using declarations (except class and/or block scope using declarations) in header files (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M7-4-2 - M7-4-2: Only use the asm declaration to introduce assembly code (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M7-5-1 - M7-5-1: Returning address of auto variable (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M7-5-2 - M7-5-2: Assigning address of auto to static (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M7-5-3 - M7-5-3: Returning address of reference to a const parameter address of reference parameter transferred outside of function (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M7-5-4 - M7-5-4: Worst case function for stack usage (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M8-0-1 - M8-0-1: Multiple declarators in a declaration (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M8-3-1 - M8-3-1: Virtual function has default parameter (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M8-4-1 - M8-4-1: Function has variable number of arguments (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M8-4-2 - M8-4-2: Function parameter list differs from prior declaration (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M8-4-3 - M8-4-3: Function should return a value (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M8-4-4 - M8-4-4: Function parameter list differs from prior declaration (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M8-5-1 - M8-5-1: Symbol not initialized (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M8-5-2 - M8-5-2: Omitted braces within an initializer (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M8-5-3 - M8-5-3: Should initialize either all enum members or only the first (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M9-3-1 - M9-3-1: Const member function anomaly (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M9-3-2 - M9-3-2: Member function returns non-const address (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M9-3-3 - M9-3-3: Member function could be made const (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M9-5-1 - M9-5-1: Unions shall not be used (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M9-6-2 - M9-6-2: Bit field type should be int (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M9-6-3 - M9-6-3: Bit field type should be int (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M9-6-4 - M9-6-4: Small bit field is signed rather than unsigned (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M10-1-1 - M10-1-1: Base class need not be virtual (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M10-1-3 - M10-1-3: Non-virtual base class included twice in class (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M10-3-2 - M10-3-2: 'virtual' assumed for function (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M11-0-1 - M11-0-1: Non-private data member within a non-POD structure (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M12-1-1 - M12-1-1: Call to virtual function within a constructor or destructor (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M12-1-2 - M12-1-2: Symbol did not appear in constructor initializer list (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M12-8-1 - M12-8-1: Constructor access global data (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M12-8-2 - M12-8-2: Public copy constructor in abstract class (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M14-5-1 - M14-5-1: Generic function template associated with type (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M14-5-2 - M14-5-2: Template constructor cannot be a copy constructor (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M14-5-3 - M14-5-3: Operator =() for class is not assignment operator (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M14-6-1 - M14-6-1: Unqualified name subject to misinterpretation (MISRA C++) - - ]]> - - misra - INFO - LINEAR - 1min - - - M14-7-1 - M14-7-1: Template was defined but not instantiated (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M14-7-3 - M14-7-3: Specialization occurs in different file than template (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M14-8-1 - M14-8-1: Explicit specialization of overloaded function templates (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M14-8-2 - M14-8-2: Mixing template and non-template functions in a viable set (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M15-0-2 - M15-0-2: Throwing a pointer expression (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M15-0-3 - M15-0-3: Case/default within loop; may have been misplaced (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M15-1-2 - M15-1-2: Explicit throw of the NULL macro (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M15-1-3 - M15-1-3: Empty throw outside of a catch block (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M15-3-1 - M15-3-1: Exception thrown within destructor (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M15-3-4 - M15-3-4: Uncaught exception not on throw-list (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M15-3-5 - M15-3-5: Catch parameter is not a reference (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M15-3-7 - M15-3-7: Catch handler after catch(...) in a try-catch sequence (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M15-4-1 - M15-4-1: Exception specification conflict (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M15-5-1 - M15-5-1: Exception thrown within destructor (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M15-5-2 - M15-5-2: Exception not in throw-list of function (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M15-5-3 - M15-5-3: Exception thrown within destructor / uncaught exception not on throw-list (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M16-0-1 - M16-0-1: Only preprocessor statements and comments before '#include' (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M16-0-2 - M16-0-2: '#define/#undef' used within a block (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M16-0-3 - M16-0-3: Use of '#undef' is discouraged (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M16-0-4 - M16-0-4: Use of function-like macros is discouraged (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M16-0-5 - M16-0-5: Apparent preprocessor directive in macro (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M16-0-6 - M16-0-6: Unparenthesized parameter in macro is passed an expression (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M16-0-7 - M16-0-7: Undefined preprocessor variable (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M16-0-8 - M16-0-8: Unrecognized name after # / endif or else not followed by EOL (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M16-1-1 - M16-1-1: Non-standard use of 'defined' preprocessor operator (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M16-1-2 - M16-1-2: #if not closed off within file (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M16-2-2 - M16-2-2: Macro could become const variable (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M16-2-3 - M16-2-3: Header file lacks standard include guard (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M16-2-4 - M16-2-4: Header file name with non-standard character (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M16-2-5 - M16-2-5: header file name with non-standard character (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M16-2-6 - M16-2-6: need &< or " after #include (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M16-3-1 - M16-3-1: Multiple use of '#' and/or '##' operators in macro definition/FlexeLint (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M16-3-2 - M16-3-2: no use of '#' or '##' (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M17-0-1 - M17-0-1: complain about #define standard functions (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M17-0-2 - M17-0-2: Re-use of C++ identifier pattern (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M17-0-4 - M17-0-4: Use of +elib options to lint library code (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M17-0-5 - M17-0-5: Do not use setjmp and longjmp (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M18-0-1 - M18-0-1: Do not use C library (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M18-0-2 - M18-0-2: Do not use atof, atoi, atol (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M18-0-3 - M18-0-3: Do not use abort, exit, getenv, system (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M18-0-4 - M18-0-4: Do not use functions in ctime header (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M18-0-5 - M18-0-5: Do not use inbounded functions in cstring header (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M18-2-1 - M18-2-1: Do not use offsetof (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M18-4-1 - M18-4-1: Do not use dynamic heap memory allocation functions (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M18-7-1 - M18-7-1: Do not use csignal functions (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M19-3-1 - M19-3-1: Do not use errno (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M27-0-1 - M27-0-1: Do not use cstdio functions (MISRA C++) - - - - misra - INFO - LINEAR - 1min - - - M2012-1.1 - M2012-1.1: Violations of the standard C (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-1.2 - M2012-1.2: Language extensions (MISRA C 2012) - - - - misra-c2012 - LINEAR - 1min - - - M2012-1.3 - M2012-1.3: Unspecified behaviour (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-2.1 - M2012-2.1: Unreachable code (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-2.2 - M2012-2.2: Dead code (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-2.3 - M2012-2.3: Unused type declarations (MISRA C 2012) - - - - misra-c2012 - LINEAR - 1min - - - M2012-2.4 - M2012-2.4: Unused tag declarations (MISRA C 2012) - - - - misra-c2012 - LINEAR - 1min - - - M2012-2.5 - M2012-2.5: Unused macro declarations (MISRA C 2012) - - - - misra-c2012 - LINEAR - 1min - - - M2012-2.6 - M2012-2.6: Unused label declarations (MISRA C 2012) - - - - misra-c2012 - LINEAR - 1min - - - M2012-2.7 - M2012-2.7: Unused parameters in functions (MISRA C 2012) - - - - misra-c2012 - LINEAR - 1min - - - M2012-3.1 - M2012-3.1: /* or // used within a comment (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-3.2 - M2012-3.2: Line-splicing in // comment (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-4.1 - M2012-4.1: Escape sequences not terminated (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-4.2 - M2012-4.2: Trigraphs (MISRA C 2012) - - - - misra-c2012 - LINEAR - 1min - - - M2012-5.1 - M2012-5.1: Indistinct external identifiers (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-5.2 - M2012-5.2: Indistinct identifiers in same scope (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-5.3 - M2012-5.3: Identifier hiding other identifier (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-5.4 - M2012-5.4: Indistinct macro identifier (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-5.5 - M2012-5.5: Identifiers indistinct from macro names (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-5.6 - M2012-5.6: A typedef identifier not unique (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-5.7 - M2012-5.7: Tag name identifier not unique (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-5.8 - M2012-5.8: Identifiers with external linkage not unique (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-5.9 - M2012-5.9: Identifiers with internal linkage not unique (MISRA C 2012) - - - - misra-c2012 - LINEAR - 1min - - - M2012-6.1 - M2012-6.1: Bit-fields have not appropriate type (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-6.2 - M2012-6.2: Single-bit is signed type (MISRA C 2012) - - - - misra-c2012 - LINEAR - 1min - - - M2012-7.1 - M2012-7.1: Octal constants (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-7.2 - M2012-7.2: Unsigned constant integer required a 'U' or 'u' (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-7.3 - M2012-7.3: 'l' used in a literal suffix (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-7.4 - M2012-7.4: String literal assigned to wrong object (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-8.1 - M2012-8.1: Types not explicitly specified (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-8.2 - M2012-8.2: Function prototype missing or incomplete (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-8.3 - M2012-8.3: Different declaration of object function (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-8.4 - M2012-8.4: Non compatible declaration with external linkage (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-8.5 - M2012-8.5: An external element declared in several files (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-8.6 - M2012-8.6: Symbol is redeclared or redefined (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-8.7 - M2012-8.7: Functions or objects defined with external linkage and is referenced in only one translation unit (MISRA C 2012) - - - - misra-c2012 - LINEAR - 1min - - - M2012-8.8 - M2012-8.8: Storage class of symbol assumed static (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-8.9 - M2012-8.9: Object define outside of block for single function usage (MISRA C 2012) - - - - misra-c2012 - LINEAR - 1min - - - M2012-8.10 - M2012-8.10: Inline function defined without a storage-class specifier (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-8.11 - M2012-8.11: Externale array without explicit size (MISRA C 2012) - - - - misra-c2012 - LINEAR - 1min - - - M2012-8.12 - M2012-8.12: Element of enum whithout unique value (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-8.13 - M2012-8.13: Pointer parameter could be declared as pointing to const (MISRA C 2012) - - - - misra-c2012 - LINEAR - 1min - - - M2012-8.14 - M2012-8.14: Restrict type used (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-9.1 - M2012-9.1: Symbol read before been set (MISRA C 2012) - - - - misra-c2012 - BLOCKER - LINEAR - 1min - - - M2012-9.2 - M2012-9.2: Not initialized in braces (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-9.3 - M2012-9.3: Init of array not complete (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-9.4 - M2012-9.4: Element initialized more than once (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-9.5 - M2012-9.5: Size of the array not specified explicitly (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-10.1 - M2012-10.1: Inapropriate essential type (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-10.2 - M2012-10.2: Inapropriate ussage of character type in operation (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-10.3 - M2012-10.3: Assignation of a narrower essential type (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-10.4 - M2012-10.4: Operation with different type category (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-10.5 - M2012-10.5: Cast to an inappropriate type (MISRA C 2012) - - - - misra-c2012 - LINEAR - 1min - - - M2012-10.6 - M2012-10.6: Assignation to object with wider essential type (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-10.7 - M2012-10.7: Implicit conversion in arithmetic conversion (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-10.8 - M2012-10.8: Type conversion of composit expression (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-11.1 - M2012-11.1: Convertion between pointer to function and other type (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-11.2 - M2012-11.2: Conversion between incomplete pointer type and other type (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-11.3 - M2012-11.3: Cast between 2 pointers with different type (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-11.4 - M2012-11.4: Conversion between pointer to object and pointer to integer (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-11.5 - M2012-11.5: Conversion between pointer to void and pointer to object (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-11.6 - M2012-11.6: Conversion between pointer to void and arithmetic type (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-11.7 - M2012-11.7: Conversion between pointer to object and non-integer arithmetic type (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-11.8 - M2012-11.8: Pointer remove qualification to object (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-11.9 - M2012-11.9: Macro NULL used inappropriately (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-12.1 - M2012-12.1: Precedence of expression non explicit (MISRA C 2012) - - - - misra-c2012 - LINEAR - 1min - - - M2012-12.2 - M2012-12.2: The shift value is at least the precision of the essential type of the left hand side (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-12.3 - M2012-12.3: Usage of coma operator (MISRA C 2012) - - - - misra-c2012 - LINEAR - 1min - - - M2012-12.4 - M2012-12.4: Overflow in computing constant for operation (MISRA C 2012) - - - - misra-c2012 - LINEAR - 1min - - - M2012-12.5 - M2012-12.5: The parameter of the sizeof call is invalid (MISRA C 2012) - - - - misra-c2012 - LINEAR - 1min - - - M2012-13.1 - M2012-13.1: Initializer list with persistent side effect (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-13.2 - M2012-13.2: Different value of expression and persistent side effect (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-13.3 - M2012-13.3: Unexpected side effect for (++) or (--) operation (MISRA C 2012) - - - - misra-c2012 - LINEAR - 1min - - - M2012-13.4 - M2012-13.4: Utilisation of assignment operator result (MISRA C 2012) - - - - misra-c2012 - LINEAR - 1min - - - M2012-13.5 - M2012-13.5: Side effects on right hand of logical operator (MISRA C 2012) - - - - misra-c2012 - LINEAR - 1min - - - M2012-13.6 - M2012-13.6: Sizeof used on expression with side effect (MISRA C 2012) - - - - misra-c2012 - BLOCKER - LINEAR - 1min - - - M2012-14.1 - M2012-14.1: Use of floating type in a loop (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-14.2 - M2012-14.2: For loop not correct (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-14.3 - M2012-14.3: Always evaluate to same value (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-14.4 - M2012-14.4: Usage of non boolean control expression in if statement (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-15.1 - M2012-15.1: Usage of Goto (MISRA C 2012) - - - - misra-c2012 - LINEAR - 1min - - - M2012-15.2 - M2012-15.2: Goto jump outside of autorized position (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-15.3 - M2012-15.3: Label declared outside of goto block or enclosing block (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-15.4 - M2012-15.4: More than one goto or break to terminate operation (MISRA C 2012) - - - - misra-c2012 - LINEAR - 1min - - - M2012-15.5 - M2012-15.5: More than one end point to exit function (MISRA C 2012) - - - - misra-c2012 - LINEAR - 1min - - - M2012-15.6 - M2012-15.6: Sub-statement should be a compound statement (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-15.7 - M2012-15.7: Else statment missing (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-16.1 - M2012-16.1: Switch statement not well formed (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-16.2 - M2012-16.2: Most closely-enclosing compound statement is not the body of a switch statement (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-16.3 - M2012-16.3: Break missing to terminate case (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-16.4 - M2012-16.4: Default missing in the switch-case (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-16.5 - M2012-16.5: Default not in first or salt label (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-16.6 - M2012-16.6: Switch statment does not have enough case (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-16.7 - M2012-16.7: Usage of boolean type for switch statment (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-17.1 - M2012-17.1: Usage of stdarg.h is forbidden (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-17.2 - M2012-17.2: Function calling itself (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-17.3 - M2012-17.3: Function declared implicitly (MISRA C 2012) - - - - misra-c2012 - BLOCKER - LINEAR - 1min - - - M2012-17.4 - M2012-17.4: Function should return a value (MISRA C 2012) - - - - misra-c2012 - BLOCKER - LINEAR - 1min - - - M2012-17.5 - M2012-17.5: Array has wrong size in function argument (MISRA C 2012) - - - - misra-c2012 - LINEAR - 1min - - - M2012-17.6 - M2012-17.6: Usage of static parameter of an array between [] (MISRA C 2012) - - - - misra-c2012 - BLOCKER - LINEAR - 1min - - - M2012-17.7 - M2012-17.7: Velue returned by function not used (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-17.8 - M2012-17.8: Modification of function parameter (MISRA C 2012) - - - - misra-c2012 - LINEAR - 1min - - - M2012-18.1 - M2012-18.1: Likely creation of out-of-bounds pointer (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-18.2 - M2012-18.2: Substraction between different array with pointers (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-18.3 - M2012-18.3: Relational or subtract operator applied to pointers (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-18.4 - M2012-18.4: Increment or subtract operator applied tp pointer (MISRA C 2012) - - - - misra-c2012 - LINEAR - 1min - - - M2012-18.5 - M2012-18.5: More than 2 level of pointer (MISRA C 2012) - - - - misra-c2012 - LINEAR - 1min - - - M2012-18.6 - M2012-18.6: Address of object with automatic storage affected to non persistant object (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-18.7 - M2012-18.7: Usage of flexible array (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-18.8 - M2012-18.8: Variable-length length arrya (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-19.1 - M2012-19.1: Assignation or copy to an overlapping object (MISRA C 2012) - - - - misra-c2012 - BLOCKER - LINEAR - 1min - - - M2012-19.2 - M2012-19.2: Usage of Union Keyword (MISRA C 2012) - - - - misra-c2012 - LINEAR - 1min - - - M2012-20.1 - M2012-20.1: #include misplaced (MISRA C 2012) - - - - misra-c2012 - LINEAR - 1min - - - M2012-20.2 - M2012-20.2: Wrong character used in header file name (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-20.3 - M2012-20.3: #include followed by wrong sequence (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-20.4 - M2012-20.4: Macro name defined with a keyword (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-20.5 - M2012-20.5: Usage of #undef (MISRA C 2012) - - - - misra-c2012 - LINEAR - 1min - - - M2012-20.6 - M2012-20.6: Apparent preprocessor directive in invocation of macro (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-20.7 - M2012-20.7: Unparenthesized parameter in macro (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-20.8 - M2012-20.8: Conditional of #if does not evaluate to 0 or 1 (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-20.9 - M2012-20.9: Undefined preprocessor variable (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-20.10 - M2012-20.10: #or ## processor operator used (MISRA C 2012) - - - - misra-c2012 - LINEAR - 1min - - - M2012-20.11 - M2012-20.11: Stringize operator followed by macro parameter followed by pasting operator (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-20.12 - M2012-20.12: Macro operator usedas an operand to # or ## and is subject to replacement (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-20.13 - M2012-20.13: Not a valid preprocessing directive (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-20.14 - M2012-20.14: #else, #elif or #endif not in same file than #if, #ifdef or #ifndef (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-21.1 - M2012-21.1: Illegal macro name with # usage (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-21.2 - M2012-21.2: Illegal macro name using reserved identifier (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-21.3 - M2012-21.3: Usage of memory allocation and deallocation from stdlib.h is forbidden (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-21.4 - M2012-21.4: Usage of setjmp.h is forbidden (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-21.5 - M2012-21.5: Usage of signal.h is forbidden (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-21.6 - M2012-21.6: Usage of input/output functions (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-21.7 - M2012-21.7: Usage of atol, atol and atoll is forbidden (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-21.8 - M2012-21.8: Usage of abort, exit, getenv and system is forbidden (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-21.9 - M2012-21.9: Usage of bsearch and qsort is forbidden (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-21.10 - M2012-21.10: Usage of time and date function forbidden (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-21.11 - M2012-21.11: Usage of tgmath.h is forbidden (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-21.12 - M2012-21.12: Usage of exception handling from fenv.h is forbidden (MISRA C 2012) - - - - misra-c2012 - LINEAR - 1min - - - M2012-21.13 - M2012-21.13: Value passed to ctype.h function has an invalid type (MISRA C 2012) - - - - misra-c2012 - LINEAR - 1min - - - M2012-21.15 - M2012-21.15: Different pointer types in memcpy, memmove or memcmp function parameters (MISRA C 2012) - - - - misra-c2012 - LINEAR - 1min - - - M2012-21.16 - M2012-21.16: Invalid pointer types in memcmp function parameters (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-21.17 - M2012-21.17: Read or write access beyond the bounds of an object passed as a parameter to function in string.h (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-21.18 - M2012-21.18: Size_t argument passed to string.h functions must be valid (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-22.1 - M2012-22.1: Custodial pointer has not been freed or returned (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-22.2 - M2012-22.2: Block of memory freed in bad conditions (MISRA C 2012) - - - - misra-c2012 - BLOCKER - LINEAR - 1min - - - M2012-22.3 - M2012-22.3: Read and write function made in same time (MISRA C 2012) - - - - misra-c2012 - CRITICAL - LINEAR - 1min - - - M2012-22.4 - M2012-22.4: Try to write on read only stream (MISRA C 2012) - - - - misra-c2012 - BLOCKER - LINEAR - 1min - - - M2012-22.5 - M2012-22.5: Pointer to file dereferenced (MISRA C 2012) - - - - misra-c2012 - BLOCKER - LINEAR - 1min - - - M2012-22.6 - M2012-22.6: Value to pointer to file used after been closed (MISRA C 2012) - - - - misra-c2012 - BLOCKER - LINEAR - 1min - - - 1301 - L1301: integer sequences must have non-negative sequence length - - - - tool-error - BLOCKER - LINEAR - 1min - - - 1302 - L1302: integer sequences must have integral element type - - - - tool-error - BLOCKER - LINEAR - 1min - - - 1407 - L1407: incrementing expression of type bool - - - - LINEAR - 1min - - - 1420 - L1420: 'mutable' applied to a reference type is non-standard - - - - LINEAR - 1min - - - 1421 - L1421: template parameter illegally redefines default argument - - - - LINEAR - 1min - - - 1731 - L1731: public virtual function __symbol__ - - - - LINEAR - 1min - - - 175 - L0175: cannot pass __string__ to variadic __string__; expected type from format string was __type__ - - - - CRITICAL - BUG - LINEAR - 1min - - - 176 - L0176: operand of type __type__ cannot be cast to function pointer type __type__ - - - - CRITICAL - BUG - LINEAR - 1min - - - 1766 - L1766: catch(...) encountered without preceding catch clause - - - - LINEAR - 1min - - - 177 - L0177: operand of type __type__ cannot be cast to object pointer type __type__ - - - - CRITICAL - BUG - LINEAR - 1min - - - 178 - L0178: function pointer of type __type__ cannot be cast to type __type__ - - - - CRITICAL - BUG - LINEAR - 1min - - - 179 - L0179: object pointer of type __type__ cannot be cast to type __type__ - - - - CRITICAL - BUG - LINEAR - 1min - - - 1798 - L1798: block scope declaration of __symbol__ is taken to mean a member of __symbol__ but does not introduce a name - - - - LINEAR - 1min - - - 1906 - L1906: exception specification for function __symbol__ - - - - LINEAR - 1min - - - 1943 - L1943: declaration of __symbol__ of type __type__ may require global runtime construction - - - - LINEAR - 1min - - - 1944 - L1944: declaration of __symbol__ of type __type__ requires a global destructor - - - - LINEAR - 1min - - - 1945 - L1945: declaration of __symbol__ of type __type__ requires an exit-time destructor - - - - LINEAR - 1min - - - 1966 - L1966: catch(...) encountered after catch clause - - - - LINEAR - 1min - - - 1970 - L1970: use of default capture (__string__) in lambda expression - - - - LINEAR - 1min - - - 1971 - L1971: use of function try block for non-constructor function __symbol__ - - - - LINEAR - 1min - - - 1972 - L1972: empty declaration - - - - LINEAR - 1min - - - 1973 - L1973: deletion of non-parameter pointer to const - - - - LINEAR - 1min - - - 2001 - L2001: request for __string__ integer type with at least __integer__ bits could not be processed - - - - CRITICAL - BUG - LINEAR - 1min - - - 2006 - L2006: no hexadecimal digits following \__string__ escape sequence - - - - CRITICAL - BUG - LINEAR - 1min - - - 2400 - L2400: unexpected internal condition '__string__' - - - - LINEAR - 1min - - - 2401 - L2401: cannot mix positional and non-positional arguments in format string - - - - LINEAR - 1min - - - 2402 - L2402: '__string__' specified field __string__ is missing a matching 'int' argument - - - - LINEAR - 1min - - - 2403 - L2403: field __string__ should have type __type__, but argument has type __type__ - - - - LINEAR - 1min - - - 2404 - L2404: invalid position specified for __string__ - - - - LINEAR - 1min - - - 2405 - L2405: __string__ used with '__string__' conversion specifier is undefined - - - - LINEAR - 1min - - - 2406 - L2406: no closing ']' for '%[' in scanf format string - - - - LINEAR - 1min - - - 2407 - L2407: zero field width in scanf format string is unused - - - - LINEAR - 1min - - - 2408 - L2408: cannot pass __string__ object of type __type__ to variadic __string__; expected type from format string was __type__ - - - - LINEAR - 1min - - - 2409 - L2409: format string should not be a wide string - - - - LINEAR - 1min - - - 2410 - L2410: re-entrant initializer for static local variable __symbol__ causes undefined behavior - - - - LINEAR - 1min - - - 2423 - L2423: apparent domain error for function __symbol__, argument __integer__ (value=__string__) outside of accepted range (__string__) - - - - LINEAR - 1min - - - 2425 - L2425: user-defined function semantic '__string__' was rejected during call to function __symbol__ because __string__ - - - - LINEAR - 1min - - - 2426 - L2426: return value (__string__) of call to function __symbol__ conflicts with return semantic '__string__' - - - - LINEAR - 1min - - - 2427 - L2427: initializer_list elements will be destroyed before returning - - The array associated with an initializer list is allocated with a -temporary lifetime. The lifetime of the array will not be extended -beyond the full expression of a return statement. The returned -initializer list will contain dangling pointers. For example:

    -
    
    -    #include <initializer_list>
    -
    -    std::initializer_list<int> f() {
    -        return { 1, 2, 3 }; // The memory used to store the array
    -                            // elements will be freed before returning.
    -    }
    -
    -    void g() {
    -        auto x = f(); // Attempting to access the elements of x will read invalid memory.
    -    }
    ]]> -
    - LINEAR - 1min -
    - - 2430 - L2430: missing whitespace between macro name __name__ and definition - - - - LINEAR - 1min - - - 2431 - L2431: __#line/GNU line__ directive starting with zero is not interpreted as an octal number - - - - LINEAR - 1min - - - 2432 - L2432: macro __name__ used as header guard is followed by a #define of a similar but different macro '__name__' - - - - LINEAR - 1min - - - 2433 - L2433: conversion specifier '__string__' is not allowed for bounds-checked format function - - - - LINEAR - 1min - - - 2434 - L2434: memory was potentially deallocated - - - - LINEAR - 1min - - - 2435 - L2435: duplicate '__string__' declaration specifier - - - - LINEAR - 1min - - - 2436 - L2436: function __symbol__ declared 'noreturn' should not return - - - - LINEAR - 1min - - - 2437 - L2437: indirection of non-volatile null pointer may be optimized out - - - - LINEAR - 1min - - - 2438 - L2438: comparing values of different enumeration types (__type__ and __type__) - - - - LINEAR - 1min - - - 2439 - L2439: lint comment does not contain any options - - - - LINEAR - 1min - - - 2440 - L2440: __string__ '__string__' in comparison is never null - - The address of a function, array, or variable was directly compared to -null. This is suspicious because the address of a function or variable -can never be null in well-formed code. Note that this message is not -given for null checks of function or object pointers. For example:

    -
    
    -    void foo(int *pi) {
    -        if (!pi) return;        // Okay
    -        if (&pi == 0) return;   // 2440
    -        if (foo != 0) return;   // 2440
    -    }
    -
    -

    The first string parameter is one of 'function', 'array', or 'address -of' and the second string parameter represents the corresponding -function, array, or variable.

    ]]> -
    - LINEAR - 1min -
    - - 2441 - L2441: __string__ '__string__' used in boolean context is never null - - The address of a function, array, or variable was used in a boolean -context. This is suspicious because such an address can never be false. -Note that this message is not given for function or object pointers. For -example:

    -
    
    -    void foo(int *pi) {
    -        if (!pi) return;    // Okay
    -        if (&pi) return;    // 2441
    -        if (!foo) return;   // 2441
    -    }
    -
    -

    The first string parameter is one of 'function', 'array', or 'address -of' and the second string parameter represents the corresponding -function, array, or variable.

    ]]> -
    - LINEAR - 1min -
    - - 2444 - L2444: case value is not in enumeration __type__ - - - - LINEAR - 1min - - - 2445 - L2445: cast from __type__ to __type__ increases required alignment from __integer__ to __integer__ - - - - LINEAR - 1min - - - 2446 - L2446: pasting formed '__string__', an invalid preprocessing token - - - - LINEAR - 1min - - - 2447 - L2447: 'main' function should not be declared as '__string__' - - - - LINEAR - 1min - - - 2448 - L2448: 'main' function should return type 'int' - - - - LINEAR - 1min - - - 2450 - L2450: null character ignored - - - - LINEAR - 1min - - - 2452 - L2452: __string__ converts between pointers to integer types with different sign - - - - LINEAR - 1min - - - 2453 - L2453: incompatible pointer to integer conversion __string__ __string__ - - - - LINEAR - 1min - - - 2454 - L2454: incompatible pointer types __string__ __string__ - - - - LINEAR - 1min - - - 2455 - L2455: incompatible function pointer types __string__ __string__ - - A function pointer type was implicitly converted to an incompatible -function pointer type. For example:

    -
    
    -    void foo(int i) {
    -        int (*pf)(float) = &foo;    // Warning 2455
    -    }
    ]]> -
    - LINEAR - 1min -
    - - 2456 - L2456: C++ language linkage specification encountered in C mode - - - - LINEAR - 1min - - - 2465 - L2465: redefinition of tag __type__ will not be visible outside of this function - - - - LINEAR - 1min - - - 2466 - L2466: __symbol__ was used despite being marked as 'unused' - - - - LINEAR - 1min - - - 2491 - L2491: unknown expression '__string__' in sizeof will evaluate to 0, use -pp_sizeof to change the value used for evaluation - - - - LINEAR - 1min - - - 2501 - L2501: negation of value of unsigned type __type__ yields a value of signed type __type__ due to integral promotion - - - - LINEAR - 1min - - - 2586 - L2586: __string__ __name__ is deprecated - - - - LINEAR - 1min - - - 2623 - L2623: possible domain error for function __symbol__, argument __integer__ (value=__string__) outside of accepted range (__string__) - - - - LINEAR - 1min - - - 2641 - L2641: implicit conversion of enum __symbol__ to floating point type __type__ - - - - LINEAR - 1min - - - 2650 - L2650: constant '__integer__' out of range for '__string__' portion of compound comparison operator '__string__' - - 255) { } // 650 - 'a' can't be greater than 255 - if (a >= 255) { } // 2650 - 'a' could be equal but not greater than 255 - -Message 2650 is issued on line 4 because while a could be equal to 255, -it cannot be greater than 255 so the use of the >= operator is -suspicious (perhaps a was intended to be compared to a different value). -See also message 650 which is issued when the provided constant is out -of range for the entire comparison operator.]]> - - LINEAR - 1min - - - 2662 - L2662: pointer arithmetic on pointer that may not refer to an array - - This message is issued instead of 662 when a pointer that appears likely -not to refer to an array is subject to integer arithmetic. Addition, -subtraction, and array subscripting are considered. Referring to the -value itself with the operand zero is ignored. For example:

    -
    
    -    void f(int a) {
    -        int* p = &a;
    -        p[0] = 0;
    -        p[1] = 0;   // Warning 2662
    -        p + 0;
    -        p + 1;      // Warning 2662
    -    }
    ]]> -
    - LINEAR - 1min -
    - - 2701 - L2701: __variable/function__ __symbol__ declared outside of header is not defined in the same source file - - - - LINEAR - 1min - - - 2702 - L2702: static symbol __symbol__ declared in header not referenced - - - - LINEAR - 1min - - - 2703 - L2703: dangling else, add braces to body of parent statement to make intent explicit - - - - LINEAR - 1min - - - 2704 - L2704: potentially negating the most negative number - - - - LINEAR - 1min - - - 2705 - L2705: type qualifier(s) '__string__' applied to return type __has/have__ no effect - - - - LINEAR - 1min - - - 2706 - L2706: integer constant value does not match any enumerator in enumeration __type__ - - - - LINEAR - 1min - - - 2707 - L2707: function __symbol__ could be declared as 'noreturn' - - - - LINEAR - 1min - - - 2709 - L2709: array subscript is of type 'char' - - - - LINEAR - 1min - - - 2712 - L2712: large pass-by-value parameter __symbol__ of type __type__ (__integer__ bytes) for function __symbol__ - - - - LINEAR - 1min - - - 2713 - L2713: large return type __type__ (__integer__ bytes) for function __symbol__ - - - - LINEAR - 1min - - - 2715 - L2715: token pasting of ',' and __VA_ARGS__ is a GNU extension - - - - LINEAR - 1min - - - 2716 - L2716: tentative array definition for variable __symbol__ assumed to have one element - - - - LINEAR - 1min - - - 2865 - L2865: __string__ - - - - LINEAR - 1min - - - 2901 - L2901: stack usage information: __detail__ - - - - LINEAR - 1min - - - 2902 - L2902: discarded instance of post-__string__ operator - - - - LINEAR - 1min - - - 2932 - L2932: macro __name__ used as header guard is followed by a #define of a different macro '__name__' - - - - LINEAR - 1min - - - 319 - L0319: size option misconfiguration: '__type__' has size __integer__ and '__type__' has size __integer__ - - - - tool-error - BLOCKER - LINEAR - 1min - - - 331 - L0331: file '__parameter__' has been modified since the precompiled header '__parameter__' was built - - - - tool-error - BLOCKER - LINEAR - 1min - - - 334 - L0334: precompiled header failure: '__string__'; skipping this module; consider deleting the PCH, '__string__', and trying again - - - - tool-error - BLOCKER - LINEAR - 1min - - - 336 - L0336: source file is not valid UTF-8 - - - - tool-error - BLOCKER - LINEAR - 1min - - - 338 - L0338: precompiled header error: __string__; skipping this module; consider examining include path options and trying again - - - - tool-error - BLOCKER - LINEAR - 1min - - - 339 - L0339: precompiled header for '__string__' was not created due to errors - - - - tool-error - BLOCKER - LINEAR - 1min - - - 3401 - L3401: parameter to move constructor __symbol__ is an rvalue reference to const - - - - LINEAR - 1min - - - 3402 - L3402: lambda capture default captures 'this' by value - - - - LINEAR - 1min - - - 3403 - L3403: use of std::move on value of forwarding reference type __type__; was std::forward<__string__> intended? - - A forwarding reference (sometimes referred to as a universal reference) -was given as an argument to std::move. Either the formation of a -forwarding reference instead of an rvalue reference or the use of -std::move instead of std::forward was likely accidental. For example:

    -
    
    -    template<typename T>
    -    void f(T&& t) {
    -        g(std::move(t)); // might unexpectedly move from the caller's lvalue
    -    }
    ]]> -
    - LINEAR - 1min -
    - - 3405 - L3405: __symbol__ is specified with C linkage but returns type __type__ which is incompatible with C - - - - LINEAR - 1min - - - 3406 - L3406: incomplete return type __type__ for function __symbol__ specified with C linkage - - - - LINEAR - 1min - - - 3407 - L3407: __symbol__ should not return null unless declared with 'throw()' or 'noexcept' - - - - LINEAR - 1min - - - 3408 - L3408: address of reference in comparison is never null in well-formed C++ - - The address of a reference was directly compared to null. This is -suspicious because the address of a reference can never be null in -well-formed code

    -
    
    -    void foo(int &i) {
    -      int &ri = i;
    -      if (&i == 0) return;   // 3408
    -      if (&i != 0) return;   // 3408
    -    }
    ]]> -
    - LINEAR - 1min -
    - - 3409 - L3409: address of reference in boolean context is never null in well-formed C++ - - The address of a reference was used in a boolean context. This is -suspicious because such an address can never be false. For example:

    -
    
    -    void foo(int &i) {
    -      int &ri = i;
    -      if (&i) return;    // 3409
    -      if (&ri) return;   // 3409
    -      if (!&i) return;   // 3409
    -    }
    ]]> -
    - LINEAR - 1min -
    - - 3410 - L3410: conversion function converting __type__ to itself will never be used - - - - LINEAR - 1min - - - 3411 - L3411: conversion function converting __type__ to its base class __type__ will never be used - - - - LINEAR - 1min - - - 3412 - L3412: __type__ has virtual functions but non-virtual destructor - - - - LINEAR - 1min - - - 3413 - L3413: __delete/destructor__ called on non-final __type__ that has virtual functions but non-virtual destructor - - - - LINEAR - 1min - - - 3414 - L3414: __delete/destructor__ called on __type__ that is abstract but has non-virtual destructor - - - - LINEAR - 1min - - - 3415 - L3415: pointer initialized to temporary array - - - - LINEAR - 1min - - - 3416 - L3416: 'this' pointer used in boolean context is never null - - - - LINEAR - 1min - - - 3417 - L3417: 'this' pointer used in comparison is never null - - - - LINEAR - 1min - - - 3418 - L3418: 'reinterpret_cast' __string__ class __symbol__ __string__ its __string__ __symbol__ behaves differently than 'static_cast' - - - - LINEAR - 1min - - - 3420 - L3420: extraneous template parameter list in template specialization - - An extraneous template parameter list was provided in the declaration of -a template specialization. For example:

    -
    
    -    template <typename T>
    -    T foo(T);
    -
    -    template<>       // warning 3420
    -    template<>
    -    int foo(int);
    ]]> -
    - LINEAR - 1min -
    - - 3421 - L3421: __string__ template partial specialization contains __string__ that cannot be deduced so the specialization will never be used - - - - LINEAR - 1min - - - 3423 - L3423: __case value/enumerator value/non-type template argument/array size/constexpr if__ __cannot be narrowed from type to type__ - - A case value, enumerator value, non-type template argument, or array -size was provided that cannot be narrowed to the required type. For -example:

    -
    
    -    void foo(unsigned u) {
    -        switch(u) {
    -        case -1:         // warning 3423, cannot narrow -1 to unsigned
    -            break;
    -            ...
    -            }
    -    }
    -
    -    template <unsigned char I>
    -    struct S { unsigned char value = I; };
    -    S<300> s;           // warning 3423, cannot narrow 300 to unsigned char
    ]]> -
    - LINEAR - 1min -
    - - 3424 - L3424: constexpr __function/constructor__ never produces a constant expression - - - - LINEAR - 1min - - - 3425 - L3425: type __type__ cannot be narrowed to __type__ in initializer list - - - - LINEAR - 1min - - - 3426 - L3426: non-constant-expression cannot be narrowed from type __type__ to __type__ in initializer list - - - - LINEAR - 1min - - - 3427 - L3427: constant expression evaluates to __string__ which cannot be narrowed to type __type__ - - - - LINEAR - 1min - - - 3428 - L3428: out-of-line declaration of a member must be a definition - - - - LINEAR - 1min - - - 3429 - L3429: parenthesized initialization of a member array is a GNU extension - - - - LINEAR - 1min - - - 3430 - L3430: taking the address of a temporary object of type __type__ - - An attempt was made to take the address of a temporary object. For -example:

    -
    
    -    struct X { ... };
    -
    -    void foo() {
    -        &X();       // warning 3430
    -    }
    ]]> -
    - LINEAR - 1min -
    - - 3431 - L3431: in-class initializer for static data member of type __type__ requires 'constexpr' specifier - - - - LINEAR - 1min - - - 3432 - L3432: invalid suffix on literal, C++11 requires a space between literal and identifier - - - - LINEAR - 1min - - - 3450 - L3450: subtracting value of member __symbol__ from the address referred to by the 'this' pointer; use of -> to access the member may have been intended - - in -> was forgotten. -For example: - - struct X { - bool value; - bool getValue() const { - return this-value; // intended to be this->value - } - }; - -If for some reason explicitly applying a negative offset to the this -pointer based on a member value is actually desired then the member name -can be enclosed in parentheses to avoid confusion.]]> - - LINEAR - 1min - - - 365 - L0365: command pipe error: __string__ - - - - tool-error - BLOCKER - LINEAR - 1min - - - 366 - L0366: regex error: __string__ - - - - tool-error - BLOCKER - LINEAR - 1min - - - 367 - L0367: maximum hook recursion depth (__integer__ levels) reached - - - - tool-error - BLOCKER - LINEAR - 1min - - - 368 - L0368: invalid conditional expression: __string__ - - - - tool-error - BLOCKER - LINEAR - 1min - - - 369 - L0369: hook field error while processing '__string__': __string__ - - - - tool-error - BLOCKER - LINEAR - 1min - - - 370 - L0370: options executed within a module cannot invoke additional modules - - - - tool-error - BLOCKER - LINEAR - 1min - - - 3701 - L3701: use of __symbol__ implicitly invokes converting constructor __symbol__; __symbol__ could be used - - - - LINEAR - 1min - - - 3702 - L3702: lambda capture default captures 'this' by value - - - - LINEAR - 1min - - - 3703 - L3703: ellipsis at this point creates a C-style varargs function - - An ellipsis was encountered, which was probably intended to declare a -function parameter pack but instead declares a variable argument -function. For example:

    -
    
    -    template <typename... T>
    -    void foo() {
    -        bar([] {
    -            void g(T t...);     // warning 3703, probably meant g(T... t);
    -        }...);
    -    }
    ]]> -
    - LINEAR - 1min -
    - - 3704 - L3704: empty parentheses here declare a function, not a variable - - - - LINEAR - 1min - - - 3705 - L3705: parenthetic disambiguation results in function declaration - - A syntactic construct was encountered that could be interpreted as -either a variable declaration or a function declaration (sometimes -referred to as the ";most vexing parse";). The disambiguation rules -require that it be interpreted as a function declaration, which may not -be what the programmer intended. For example:

    -
    
    -    struct X { };
    -    struct Y {
    -        Y(const X&);
    -    };
    -
    -    void foo() {
    -        Y y(X());   // warning 3705
    -    }
    -
    -

    Here y is interpreted as a function that returns an object of type Y and -takes a single parameter that is a pointer to a function taking no -arguments and returning type X. In particular, it is not interpreted as -a declaration of an object of type Y initialized with a temporary of -type X as was almost certainly intended.

    - -

    There are several ways to force interpretation of a variable -declaration. In and later the simplest way is to employ uniform -initialization syntax, for example any of the following would work:

    -
    
    -    Y y1(X{});    // OK, variable declaration
    -    Y y2{X()};    // OK, variable declaration
    -    Y y3{X{}};    // OK, variable declaration
    -
    -

    Prior to , an extra pair of parenthesis can be used to force the desired -interpretation, e.g.:

    -
    
    -    Y y4((X()));   // OK, variable declaration
    -
    -

    The same issue can appear with casts, for example:

    -
    
    -    void foo(double d) {
    -        int i( int(d) );    // warning 3705
    -    }
    -
    -

    In this case, i is not a variable initialized with the truncated value -of d but rather a function returning int and taking int. In addition to -the methods mentioned above to force a variable declaration, the -functional cast can be converted to a C-style cast or a named cast, -e.g.:

    -
    
    -    int i1( (int) d );              // OK, variable declaration
    -    int i2( static_cast<int>(d) );  // OK, variable declaration
    ]]> -
    - LINEAR - 1min -
    - - 3706 - L3706: abstract class __symbol__ marked '__final/sealed__' - - - - LINEAR - 1min - - - 3707 - L3707: unknown linkage language '__string__' - - - - LINEAR - 1min - - - 373 - L0373: lint comments cannot appear after a #include directive on the same line - - - - tool-error - BLOCKER - LINEAR - 1min - - - 3901 - L3901: reference to __data member/member function__ __symbol__ of __symbol__ does not use an explicit 'this->' - - member to access the member. For example: - - struct A { - int value; - int getValue() { return this->value; } // OK, explicit this-> - void setValue(int v) { value = v; } // note 3901 - }; - -Some authors suggest always using this-> to access members to prevent -the potential for confusion when local objects or functions with the -same name as a member exist in the same scope. See also message 578, -which will be issued if a local symbol is declared that hides a member.]]> - - LINEAR - 1min - - - 3902 - L3902: thrown object of type __type__ is not a class derived from std::exception - - - - LINEAR - 1min - - - 450 - L0450: namespace __symbol__ declared within an extern ";C"; region - - - - LINEAR - 1min - - - 463 - L0463: could not parse '__string__' as a strong type: __string__ - - - - LINEAR - 1min - - - 466 - L0466: conversion __to/from__ pointer to function with no prototype (__context__) - - - - LINEAR - 1min - - - 473 - L0473: argument '__string__' is of insufficient length for array parameter __symbol__ declared as __type__ - - - - LINEAR - 1min - - - 474 - L0474: constant switch condition '__string__' not handled by switch - - - - LINEAR - 1min - - - 477 - L0477: array __symbol__ could be declared static - - - - LINEAR - 1min - - - 490 - L0490: __string__ - - - - LINEAR - 1min - - - 492 - L0492: incomplete format specifier '__string__' - - - - LINEAR - 1min - - - 493 - L0493: position arguments in format strings start counting at 1 (not 0) - - - - LINEAR - 1min - - - 494 - L0494: data argument position '__integer__' exceeds the number of data arguments (__integer__) - - - - LINEAR - 1min - - - 495 - L0495: format string body contains NUL character - - - - LINEAR - 1min - - - 496 - L0496: format string is not null terminated - - - - LINEAR - 1min - - - 497 - L0497: format string is empty - - - - LINEAR - 1min - - - 498 - L0498: unbounded scanf conversion specifier '__string__' may result in buffer overflow - - - - LINEAR - 1min - - - 499 - L0499: using length modifier '__string__' with conversion specifier '__string__' is not supported by ISO C - - - - LINEAR - 1min - - - 513 - L0513: the option '__string__' is not currently supported - - - - LINEAR - 1min - - - 523 - L0523: expression statement involving __string__ '__name__' lacks side effects - - - - LINEAR - 1min - - - 576 - L0576: excess elements in __string__ initializer - - - - LINEAR - 1min - - - 597 - L0597: suspicious use of unary operator could be confused for compound assignment (__string__) - - - - LINEAR - 1min - - - 599 - L0599: cannot open file matching wild card pattern '__string__' - - - - LINEAR - 1min - - - 709 - L0709: no intervening module since the last '-pch' option - - - - LINEAR - 1min - - - 8000 - L8000: __string__ - - - - CRITICAL - BUG - LINEAR - 1min - - - 837 - L0837: switch condition is a constant expression - - - - LINEAR - 1min - - - 853 - L0853: entering nested comment - - - - LINEAR - 1min - - - 854 - L0854: trigraph sequence converted to '__string__' character - - - - LINEAR - 1min - - - 855 - L0855: positional arguments are a non-ISO extension - - - - LINEAR - 1min - - - 856 - L0856: flag '__string__' is ignored when flag '__string__' is present - - - - LINEAR - 1min - - - 857 - L0857: argument 1 of type __type__ is not compatible with argument 2 of type __type__ in call to function __symbol__ - - - - LINEAR - 1min - - - 865 - L0865: __detail__ - - - - LINEAR - 1min - - - 868 - L0868: degenerate switch encountered - - - - LINEAR - 1min - - - 870 - L0870: no '-max_threads=N' option was encountered prior to the first module; only a single thread will be used by default - - - - LINEAR - 1min - - - 879 - L0879: semantic monikers are '__string__' and '__string__' - - - - LINEAR - 1min - - - 882 - L0882: sizeof applied to parameter __symbol__ of function __symbol__ declared an incomplete array type __type__ - - - - LINEAR - 1min - - - 890 - L0890: see section __detail__ ";__detail__"; in the manual for details - - - - LINEAR - 1min - - - 891 - L0891: reference information __text varies__ - - - - LINEAR - 1min - - - 892 - L0892: did you mean to __multiply/divide__ by a factor of type '__strong-type__'? - - - - LINEAR - 1min - - - 893 - L0893: expanded from macro - - - - LINEAR - 1min - - - 894 - L0894: during specific walk __detail__ - - - - LINEAR - 1min - - - 896 - L0896: semantic expression expands to '__string__' - - - - LINEAR - 1min - - - 897 - L0897: in instantiation of __string__ __symbol__ triggered here - - - - LINEAR - 1min - - - 901 - L0901: variable __symbol__ of type __type__ not initialized by definition - - - - LINEAR - 1min - - - 902 - L0902: non-static function __symbol__ declared outside of a header - - - - LINEAR - 1min - - - 907 - L0907: implicit conversion to 'void *' from type __type__ - - - - LINEAR - 1min - - - 9073 - L9073: parameter __integer__ of function __symbol__ has type alias name type difference with previous declaration (__type__ vs __type__) - - - - CRITICAL - BUG - LINEAR - 1min - - - 908 - L0908: implicit conversion from 'void *' to type __type__ - - - - LINEAR - 1min - - - 9093 - L9093: the name '__name__' is reserved to the compiler - - - - CRITICAL - BUG - LINEAR - 1min - - - 9094 - L9094: return type of function __symbol__ has type alias name difference with previous declaration (__type__ vs __type__) - - - - CRITICAL - BUG - LINEAR - 1min - - - 9095 - L9095: symbol __symbol__ has same name as previously defined macro - - - - CRITICAL - BUG - LINEAR - 1min - - - 9096 - L9096: symbol __symbol__ has same name as subsequently defined macro - - - - CRITICAL - BUG - LINEAR - 1min - - - 9097 - L9097: unparenthesized argument to sizeof operator - - - - CRITICAL - BUG - LINEAR - 1min - - - 9098 - L9098: pointer argument __integer__ (of type __type__) to function __symbol__ does not point to a pointer type or an essentially signed, unsigned, boolean, or enum type - - - - CRITICAL - BUG - LINEAR - 1min - - - 9103 - L9103: identifier '__name__' with static storage is reused - - - - CRITICAL - BUG - LINEAR - 1min - - - 9167 - L9167: macro '__name__' defined in __string__ __symbol__ not undefined in same __string__ - - - - CRITICAL - BUG - LINEAR - 1min - - - 9168 - L9168: variable __symbol__ has type alias name difference with previous declaration (__type__ vs __type__) - - - - CRITICAL - BUG - LINEAR - 1min - - - 9169 - L9169: constructor __symbol__ can be used for implicit conversions from fundamental type __type__ - - - - CRITICAL - BUG - LINEAR - 1min - - - 9170 - L9170: pure function __symbol__ overrides non-pure function __symbol__ - - - - CRITICAL - BUG - LINEAR - 1min - - - 9171 - L9171: downcast of polymorphic type __type__ to type __type__ - - - - CRITICAL - BUG - LINEAR - 1min - - - 9172 - L9172: bitwise operator '__operator__' used with non-constant operands of differing underlying types - - - - CRITICAL - BUG - LINEAR - 1min - - - 9173 - L9173: use of non-placement allocation function __symbol__ - - - - CRITICAL - BUG - LINEAR - 1min - - - 9174 - L9174: __type__ is a virtual base class of __symbol__ - - - - CRITICAL - BUG - LINEAR - 1min - - - 9175 - L9175: function __symbol__ has void return type and no external side-effects - - - - CRITICAL - BUG - LINEAR - 1min - - - 9176 - L9176: pointer type __type__ converted to unrelated pointer type __type__ - - - - CRITICAL - BUG - LINEAR - 1min - - - 9204 - L9204: hexadecimal escape sequence used - - - - tool-error - BLOCKER - LINEAR - 1min - - - 9209 - L9209: plain character data used with prohibited operator __string__ - - - - tool-error - BLOCKER - LINEAR - 1min - - - 9212 - L9212: bit field type __type__ is not explicitly signed int or unsigned int - - - - tool-error - BLOCKER - LINEAR - 1min - - - 9224 - L9224: expression is not effectively boolean and must be explicitly tested for zero - - An expression that is not ";effectively boolean"; is being implicitly -tested for zero in the controlling expression of an if statement, an -iteration statement, or the first operand of a conditional operator. For -example, given that x is an integer:

    -
    
    -    if (x)
    -
    -

    will elicit this message while:

    -
    
    -    if (x != 0)
    -
    -

    will not. ";Effectively boolean"; value are produced by the operators ==, -!=, <=, >=, <, >, !, ||, and &&.

    ]]> -
    - tool-error - BLOCKER - LINEAR - 1min -
    - - 9225 - L9225: integral expression of underlying type __underlying-type__ cannot be implicitly converted to type __type__ because it is not a wider integer type of the same signedness - - - - tool-error - BLOCKER - LINEAR - 1min - - - 9226 - L9226: integral expression of underlying type __underlying-type__ cannot be implicitly converted to type __type__ because it is __string__ - - - - tool-error - BLOCKER - LINEAR - 1min - - - 9227 - L9227: floating expression of underlying type __underlying-type__ cannot be implicitly converted to type __type__ because it is not a wider floating type - - - - tool-error - BLOCKER - LINEAR - 1min - - - 9228 - L9228: floating expression of underlying type __underlying-type__ cannot be implicitly converted to type __type__ because it is __string__ - - - - tool-error - BLOCKER - LINEAR - 1min - - - 9229 - L9229: complex integral expression may only be cast to another integral type of the same signedness no wider than the original type - - - - tool-error - BLOCKER - LINEAR - 1min - - - 9230 - L9230: complex floating expression may only be cast to another floating type no wider than the original type - - - - tool-error - BLOCKER - LINEAR - 1min - - - 9231 - L9231: result of __operator__ operator applied to operand of type __type__ must be immediately cast to __type__ - - - - tool-error - BLOCKER - LINEAR - 1min - - - 9232 - L9232: expected/did not expect an effectively boolean argument for operator __operator__ - - - - tool-error - BLOCKER - LINEAR - 1min - - - 9233 - L9233: bitwise operator __operator__ may not be applied to operand with signed underlying type - - - - tool-error - BLOCKER - LINEAR - 1min - - - 9234 - L9234: shift amount exceeds size of operand's underlying type - - - - tool-error - BLOCKER - LINEAR - 1min - - - 9235 - L9235: unary minus applied to operand with unsigned underlying type - - - - tool-error - BLOCKER - LINEAR - 1min - - - 9236 - L9236: assignment operator may not be used within a boolean-valued expression - - - - tool-error - BLOCKER - LINEAR - 1min - - - 9237 - L9237: conversion between pointer to function type __type__ and differing non-integral type __type__ - - - - tool-error - BLOCKER - LINEAR - 1min - - - 9238 - L9238: switch condition may not be boolean - - - - tool-error - BLOCKER - LINEAR - 1min - - - 9240 - L9240: __left/right__ side of logical operator '__operator__' is not a primary expression - - - - tool-error - BLOCKER - LINEAR - 1min - - - 9252 - L9252: testing floating point for equality using exact value - - - - tool-error - BLOCKER - LINEAR - 1min - - - 9254 - L9254: continue statement encountered - - - - tool-error - BLOCKER - LINEAR - 1min - - - 9259 - L9259: C comment contains '://' sequence - - - - tool-error - BLOCKER - LINEAR - 1min - - - 9260 - L9260: C++ style comment used - - - - tool-error - BLOCKER - LINEAR - 1min - - - 9264 - L9264: array subscript applied to variable __symbol__ declared with non-array type __type__ - - - - tool-error - BLOCKER - LINEAR - 1min - - - 9272 - L9272: parameter __integer__ of function __symbol__ has different name than overridden function __symbol__ (__symbol__ vs __symbol__) - - - - tool-error - BLOCKER - LINEAR - 1min - - - 9273 - L9273: parameter __integer__ of function __symbol__ has type alias name difference with overridden function __symbol__ (__type__ vs __type__) - - - - tool-error - BLOCKER - LINEAR - 1min - - - 9287 - L9287: cast from pointer to object type (__type__) to pointer to char type (__type__) - - - - tool-error - BLOCKER - LINEAR - 1min - - - 9288 - L9288: unnamed signed single-bit bitfield - - - - tool-error - BLOCKER - LINEAR - 1min - - - 9294 - L9294: return type of function __symbol__ has type alias name difference with overridden function __symbol__ (__type__ vs __type__) - - - - tool-error - BLOCKER - LINEAR - 1min - - - 9295 - L9295: conversion between object pointer type __type__ and non-integer arithmetic essential type '__essential-type__' - - - - tool-error - BLOCKER - LINEAR - 1min - - - 9401 - L9401: function __symbol__ returns pointer to void - - - - LINEAR - 1min - - - 9402 - L9402: function __symbol__ parameter __integer__ is void pointer - - - - LINEAR - 1min - - - 9403 - L9403: function __symbol__ parameter __integer__ has same unqualified type (__type__) as previous parameter - - - - LINEAR - 1min - - - 9404 - L9404: destructor for class __symbol__ should be declared 'noexcept' - - - - LINEAR - 1min - - - 9405 - L9405: move constructor for class __symbol__ should be declared 'noexcept' - - - - LINEAR - 1min - - - 9406 - L9406: move assignment operator __symbol__ should be declared 'noexcept' - - - - LINEAR - 1min - - - 9407 - L9407: copy assignment operator __symbol__ should not be virtual - - - - LINEAR - 1min - - - 9408 - L9408: copy assignment operator __symbol__ should take a const reference type - - - - LINEAR - 1min - - - 9409 - L9409: copy assignment operator __symbol__ should return a non-const lvalue-reference type - - - - LINEAR - 1min - - - 9410 - L9410: move assignment operator __symbol__ should not be virtual - - - - LINEAR - 1min - - - 9411 - L9411: move assignment operator __symbol__ should take a non-const reference type - - - - LINEAR - 1min - - - 9412 - L9412: move assignment operator __symbol__ should return a non-const lvalue-reference type - - - - LINEAR - 1min - - - 9413 - L9413: class __symbol__ contains data members of differing access levels - - - - LINEAR - 1min - - - 9416 - L9416: typedef used to define name __symbol__ - - - - LINEAR - 1min - - - 9417 - L9417: data member __symbol__ has protected access level - - - - LINEAR - 1min - - - 972 - L0972: unusual character '__string__' in '__kind__' literal - - - - LINEAR - 1min - - - 977 - L0977: non-literal non-boolean used in __type__ __string__ - - - - LINEAR - 1min - - - 978 - L0978: the name '__name__' matches a pattern reserved to the compiler __string__ - - - - LINEAR - 1min - - - 979 - L0979: function __symbol__ could be marked with a 'pure' semantic - - - - LINEAR - 1min - - - 980 - L0980: macro name '__name__' matches a pattern reserved to the compiler __string__ - - - - LINEAR - 1min - - - 981 - L0981: cast of expression of type __type__ to same type is redundant - - - - LINEAR - 1min - - - 983 - L0983: behavior of dash in scan list is implementation defined - - - - LINEAR - 1min - - - 986 - L0986: target type __type__ of type alias __symbol__ is deprecated - - - - LINEAR - 1min - - - 987 - L0987: constructor parameter __symbol__ shadows the field __symbol__ of __symbol__ - - - - LINEAR - 1min - - - 9901 - L9901: return value '__string__' for call to function __symbol__ updated to '__string__' via return semantic '__string__' - - - - LINEAR - 1min - - - 9902 - L9902: return value '__string__' for call to function __symbol__ not updated by return semantic '__string__' which adds no new information - - - - LINEAR - 1min - - - 9903 - L9903: __essential-type-preview__ - - - - LINEAR - 1min - - - 9904 - L9904: hook event: '__string__' - - - - LINEAR - 1min - - - 9905 - L9905: value tracking debug assertion not known to be unequivocally true - - - - LINEAR - 1min - - - 999 - L0999: defaulting to __string__ concurrent threads - - - - LINEAR - 1min - -
    + + + + CustomRuleTemplate + MULTIPLE + Rule template for PC-Lint custom rules + + +Follow these steps to make your custom rules available in SonarQube: +

    +
      +
        +
      1. Create a new rule in SonarQube by "copying" this rule template and specify the CheckId of your custom rule, a title, a description, and a default severity.
      2. +
      3. Enable the newly created rule in your quality profile
      4. +
      +
    1. Relaunch an analysis on your projects, et voilà, your custom rules are executed!
    2. +
    + ]]> +
    +
    + + 1 + L0001: Unclosed Comment (Location) + + + + CRITICAL + BUG + LINEAR + 1min + + + 2 + L0002: Unclosed Quote + + + + CRITICAL + BUG + LINEAR + 1min + + + 3 + L0003: #else without a #if + + + + CRITICAL + BUG + LINEAR + 1min + + + 4 + L0004: Too many #if levels + + + + CRITICAL + BUG + LINEAR + 1min + + + 5 + L0005: Too many #endif's + + + + CRITICAL + BUG + LINEAR + 1min + + + 6 + L0006: Stack Overflow + + + + CRITICAL + BUG + LINEAR + 1min + + + 7 + L0007: Unable to open include file: FileName + + + + CRITICAL + LINEAR + 1min + + + 8 + L0008: Unclosed #if (Location) + + + + CRITICAL + BUG + LINEAR + 1min + + + 9 + L0009: Too many #else's in #if (Location) + + + + CRITICAL + BUG + LINEAR + 1min + + + 10 + L0010: Expecting 'String' + + + + CRITICAL + LINEAR + 1min + + + 11 + L0011: Excessive Size + + + + CRITICAL + BUG + LINEAR + 1min + + + 12 + L0012: Need < or " + + + + CRITICAL + BUG + LINEAR + 1min + + + 13 + L0013: Bad type + + + + CRITICAL + BUG + LINEAR + 1min + + + 14 + L0014: Symbol 'Symbol' previously defined (Location) + + + + CRITICAL + LINEAR + 1min + + + 15 + L0015: Symbol 'Symbol' redeclared (TypeDiff) (Location) + + + + CRITICAL + BUG + LINEAR + 1min + + + 16 + L0016: Unrecognized name + + + + CRITICAL + LINEAR + 1min + + + 17 + L0017: Unrecognized name + + + + CRITICAL + LINEAR + 1min + + + 18 + L0018: Symbol 'Symbol' redeclared (TypeDiff) conflicts with Location + + + + CRITICAL + BUG + LINEAR + 1min + + + 19 + L0019: Useless Declaration + + + + bad-practice + LINEAR + 1min + + + 20 + L0020: Illegal use of = + + + + CRITICAL + BUG + LINEAR + 1min + + + 21 + L0021: Expected { + + + + CRITICAL + LINEAR + 1min + + + 22 + L0022: Illegal operator + + + + CRITICAL + BUG + LINEAR + 1min + + + 23 + L0023: Expected colon + + + + CRITICAL + BUG + LINEAR + 1min + + + 24 + L0024: Expected an expression, found 'String' + + + + CRITICAL + LINEAR + 1min + + + 25 + L0025: Illegal constant + + + + CRITICAL + BUG + LINEAR + 1min + + + 26 + L0026: Expected an expression, found 'String' + + + + CRITICAL + LINEAR + 1min + + + 27 + L0027: Illegal character (0xhh) + + + + CRITICAL + LINEAR + 1min + + + 28 + L0028: Redefinition of symbol 'Symbol' Location + + + + CRITICAL + BUG + LINEAR + 1min + + + 29 + L0029: Duplicated type-specifier + + + + CRITICAL + BUG + LINEAR + 1min + + + 30 + L0030: Expected a constant + + + + CRITICAL + BUG + LINEAR + 1min + + + 31 + L0031: Redefinition of symbol 'Symbol' conflicts with Location + + + + CRITICAL + BUG + LINEAR + 1min + + + 32 + L0032: Field size (member 'Symbol') should not be zero + + + + CRITICAL + BUG + LINEAR + 1min + + + 33 + L0033: Illegal constant + + + + CRITICAL + BUG + LINEAR + 1min + + + 34 + L0034: Non-constant initializer + + + + CRITICAL + BUG + LINEAR + 1min + + + 35 + L0035: Initializer has side-effects + + + + CRITICAL + BUG + LINEAR + 1min + + + 36 + L0036: Redefining the storage class of symbol 'Symbol' conflicts with Location + + + + CRITICAL + BUG + LINEAR + 1min + + + 37 + L0037: Value of enumerator 'Symbol' inconsistent (conflicts with Location) + + + + CRITICAL + BUG + LINEAR + 1min + + + 38 + L0038: Offset of symbol 'Symbol' inconsistent (Location) + + + + CRITICAL + BUG + LINEAR + 1min + + + 39 + L0039: Redefinition of symbol 'Symbol' conflicts with Location + + + + CRITICAL + BUG + LINEAR + 1min + + + 40 + L0040: Undeclared identifier 'Name' + + + + CRITICAL + BUG + LINEAR + 1min + + + 41 + L0041: Redefinition of symbol 'Symbol' + + + + CRITICAL + BUG + LINEAR + 1min + + + 42 + L0042: Expected a statement + + + + CRITICAL + BUG + LINEAR + 1min + + + 43 + L0043: Vacuous type for variable 'Symbol' + + + + CRITICAL + LINEAR + 1min + + + 44 + L0044: Need a switch + + + + CRITICAL + BUG + LINEAR + 1min + + + 45 + L0045: Bad use of register + + + + CRITICAL + LINEAR + 1min + + + 46 + L0046: Field type should be int + + + + CRITICAL + LINEAR + 1min + + + 47 + L0047: Bad type + + + + CRITICAL + BUG + LINEAR + 1min + + + 48 + L0048: Bad type + + ) operator requires a pointer operand.]]> + + CRITICAL + BUG + LINEAR + 1min + + + 49 + L0049: Expected a type + + + + CRITICAL + LINEAR + 1min + + + 50 + L0050: Attempted to take the address of a non-lvalue + + + + CRITICAL + BUG + LINEAR + 1min + + + 51 + L0051: Expected integral type + + + + CRITICAL + LINEAR + 1min + + + 52 + L0052: Expected an lvalue + + + + CRITICAL + BUG + LINEAR + 1min + + + 53 + L0053: Expected a scalar + + + + CRITICAL + LINEAR + 1min + + + 54 + L0054: Division by 0 + + + + cert + CRITICAL + BUG + LINEAR + 1min + + + 55 + L0055: Bad type + + + + CRITICAL + LINEAR + 1min + + + 56 + L0056: Bad type + + + + CRITICAL + BUG + LINEAR + 1min + + + 57 + L0057: Bad type + + + + CRITICAL + BUG + LINEAR + 1min + + + 58 + L0058: Bad type + + + + CRITICAL + LINEAR + 1min + + + 59 + L0059: Bad type + + + + CRITICAL + LINEAR + 1min + + + 60 + L0060: Bad type + + + + CRITICAL + LINEAR + 1min + + + 61 + L0061: Bad type + + + + CRITICAL + BUG + LINEAR + 1min + + + 62 + L0062: Incompatible types (TypeDiff) for operator ':' + + + + CRITICAL + BUG + LINEAR + 1min + + + 63 + L0063: Expected an lvalue + + + + CRITICAL + LINEAR + 1min + + + 64 + L0064: Type mismatch (Context) (TypeDiff) + + + + CRITICAL + BUG + LINEAR + 1min + + + 65 + L0065: Expected a member name + + ) operator a member name should appear.]]> + + CRITICAL + BUG + LINEAR + 1min + + + 66 + L0066: Bad type + + + + CRITICAL + BUG + LINEAR + 1min + + + 67 + L0067: Can't cast from Type to Type + + + + CRITICAL + BUG + LINEAR + 1min + + + 68 + L0068: Can't cast from Type to Type + + + + CRITICAL + LINEAR + 1min + + + 69 + L0069: Can't cast from Type to Type + + + + CRITICAL + BUG + LINEAR + 1min + + + 70 + L0070: Can't cast from Type to Type + + + + CRITICAL + BUG + LINEAR + 1min + + + 71 + L0071: Can't cast from Type to Type + + + + CRITICAL + LINEAR + 1min + + + 72 + L0072: Bad option 'String' + + + + CRITICAL + LINEAR + 1min + + + 73 + L0073: Bad left operand + + or a . operator. These operators expect an expression primary on their left. Please enclose any complex expression in this position within parentheses.]]> + + CRITICAL + LINEAR + 1min + + + 74 + L0074: Address of Register + + + + CRITICAL + BUG + LINEAR + 1min + + + 75 + L0075: Too late to change sizes (option 'String') + + + + CRITICAL + LINEAR + 1min + + + 76 + L0076: can't open file String + + + + CRITICAL + LINEAR + 1min + + + 77 + L0077: Address of bit-field cannot be taken + + + + CRITICAL + BUG + LINEAR + 1min + + + 78 + L0078: Symbol 'Symbol' typedef'ed at Location used in expression + + + + CRITICAL + BUG + LINEAR + 1min + + + 79 + L0079: Bad type for % operator + + + + CRITICAL + BUG + LINEAR + 1min + + + 80 + L0080: this use of ellipsis is not strictly ANSI + + + + CRITICAL + BUG + LINEAR + 1min + + + 81 + L0081: struct/union not permitted in equality comparison + + + + CRITICAL + LINEAR + 1min + + + 82 + L0082: return <exp>; illegal with void function + + + + CRITICAL + LINEAR + 1min + + + 83 + L0083: Incompatible pointer types with subtraction + + + + CRITICAL + BUG + LINEAR + 1min + + + 84 + L0084: sizeof object is zero or object is undefined + + + + CRITICAL + BUG + LINEAR + 1min + + + 85 + L0085: Array 'Symbol' has dimension 0 + + + + CRITICAL + BUG + LINEAR + 1min + + + 86 + L0086: Structure 'Symbol' has no data elements + + + + CRITICAL + LINEAR + 1min + + + 87 + L0087: Expression too complicated for #ifdef or #ifndef + + + + CRITICAL + LINEAR + 1min + + + 88 + L0088: Symbol 'Symbol' is an array of empty elements + + + + CRITICAL + LINEAR + 1min + + + 89 + L0089: Argument or option too long ('String') + + + + convention + CRITICAL + LINEAR + 1min + + + 90 + L0090: Option 'String' is only appropriate within a lint comment + + + + convention + CRITICAL + LINEAR + 1min + + + 91 + L0091: Line exceeds Integer characters (use +linebuf) + + + + convention + CRITICAL + LINEAR + 1min + + + 92 + L0092: Negative array dimension or bit field length (Integer) + + + + CRITICAL + BUG + LINEAR + 1min + + + 93 + L0093: New-line is not permitted within string arguments to macros + + + + CRITICAL + LINEAR + 1min + + + 94 + L0094: xml element termination name 'String' does not match start name 'String' + + + + CRITICAL + BUG + LINEAR + 1min + + + 95 + L0095: Expected a macro parameter but instead found 'Name' + + + + CRITICAL + BUG + LINEAR + 1min + + + 96 + L0096: Unmatched left brace for String on Location + + + + CRITICAL + BUG + LINEAR + 1min + + + 98 + L0098: Recovery Error (String) + + + + CRITICAL + BUG + LINEAR + 1min + + + 101 + L0101: Expected an identifier + + + + convention + CRITICAL + LINEAR + 1min + + + 102 + L0102: Illegal parameter specification + + + + CRITICAL + BUG + LINEAR + 1min + + + 103 + L0103: Unexpected declaration + + + + CRITICAL + BUG + LINEAR + 1min + + + 104 + L0104: Conflicting types + + + + CRITICAL + LINEAR + 1min + + + 105 + L0105: Conflicting modifiers + + + + CRITICAL + BUG + LINEAR + 1min + + + 106 + L0106: Illegal constant + + + + CRITICAL + LINEAR + 1min + + + 107 + L0107: Label 'Symbol' (Location) not defined + + + + brain-overload + misra + CRITICAL + LINEAR + 1min + + + 108 + L0108: Invalid context + + + + CRITICAL + BUG + LINEAR + 1min + + + 109 + L0109: The combination 'short long' is not standard, 'long' is assumed + + + + CRITICAL + LINEAR + 1min + + + 110 + L0110: Attempt to assign to void + + + + CRITICAL + BUG + LINEAR + 1min + + + 111 + L0111: Assignment to const object + + + + CRITICAL + BUG + LINEAR + 1min + + + 113 + L0113: Inconsistent enum declaration + + + + CRITICAL + BUG + LINEAR + 1min + + + 114 + L0114: Inconsistent structure declaration for tag 'Symbol' + + + + CRITICAL + BUG + LINEAR + 1min + + + 115 + L0115: Struct/union not defined + + a where p is a pointer to a struct that had not yet been defined in the current module.]]> + + CRITICAL + BUG + LINEAR + 1min + + + 116 + L0116: Inappropriate storage class + + + + CRITICAL + BUG + LINEAR + 1min + + + 117 + L0117: Inappropriate storage class + + + + CRITICAL + BUG + LINEAR + 1min + + + 118 + L0118: Too few arguments for prototype + + + + CRITICAL + BUG + LINEAR + 1min + + + 119 + L0119: Too many arguments for prototype + + + + CRITICAL + BUG + LINEAR + 1min + + + 120 + L0120: Initialization without braces of dataless type 'Symbol' + + + + CRITICAL + BUG + LINEAR + 1min + + + 121 + L0121: Attempting to initialize an object of undefined type 'Symbol' + + + + CRITICAL + BUG + LINEAR + 1min + + + 122 + L0122: Digit (Char) too large for radix + + + + CRITICAL + BUG + LINEAR + 1min + + + 123 + L0123: Macro 'Symbol' defined with arguments at Location this is just a warning + + + + CRITICAL + LINEAR + 1min + + + 124 + L0124: Pointer to void not allowed + + >= < <=).]]> + + CRITICAL + BUG + LINEAR + 1min + + + 125 + L0125: Too many storage class specifiers + + + + CRITICAL + BUG + LINEAR + 1min + + + 126 + L0126: Inconsistent structure definition 'Symbol' + + + + CRITICAL + BUG + LINEAR + 1min + + + 127 + L0127: L0110: Illegal constant + + + + CRITICAL + BUG + LINEAR + 1min + + + 128 + L0128: Pointer to function not allowed + + >= < <=).]]> + + CRITICAL + BUG + LINEAR + 1min + + + 129 + L0129: declaration expected, identifier 'Symbol' ignored + + + + CRITICAL + LINEAR + 1min + + + 130 + L0130: Expected integral type + + + + CRITICAL + LINEAR + 1min + + + 131 + L0131: syntax error in call of macro 'Symbol' at location Location + + + + CRITICAL + LINEAR + 1min + + + 132 + L0132: Expected function definition + + + + CRITICAL + LINEAR + 1min + + + 133 + L0133: Too many initializers for aggregate 'Symbol' + + + + CRITICAL + BUG + LINEAR + 1min + + + 134 + L0134: Missing initializer + + + + CRITICAL + BUG + LINEAR + 1min + + + 135 + L0135: comma assumed in initializer + + + + CRITICAL + BUG + LINEAR + 1min + + + 136 + L0136: Illegal macro name + + + + CRITICAL + BUG + LINEAR + 1min + + + 137 + L0137: constant 'Symbol' used twice within switch + + + + CRITICAL + BUG + LINEAR + 1min + + + 138 + L0138: Can't add parent 'Symbol' to strong type String; creates loop + + + + CRITICAL + LINEAR + 1min + + + 139 + L0139: Can't take sizeof function + + + + CRITICAL + BUG + LINEAR + 1min + + + 140 + L0140: Type appears after modifier + + + + convention + CRITICAL + LINEAR + 1min + + + 141 + L0141: The following option has too many elements: 'String' + + + + CRITICAL + LINEAR + 1min + + + 142 + L0142: case constant 'String' used previously in this switch + + A duplicate case constant was detected. For example, the following code will be diagnosed as a repetition of case constant '1'.

    +
    
    +           switch( n )
    +               {
    +               case 1:  m = 25;    break;
    +               case 2-1: m = 27;   break;
    +               }
    +
    +]]> +
    + CRITICAL + BUG + LINEAR + 1min +
    + + 143 + L0143: Erroneous option: String + + + + CRITICAL + LINEAR + 1min + + + 144 + L0144: Non-existent return value for symbol 'Symbol', compare with Location + + + + CRITICAL + BUG + LINEAR + 1min + + + 145 + L0145: Type expected before operator, void assumed + + + + CRITICAL + LINEAR + 1min + + + 146 + L0146: Assuming a binary constant + + + + CRITICAL + LINEAR + 1min + + + 147 + L0147: sizeof takes just one argument + + + + CRITICAL + BUG + LINEAR + 1min + + + 148 + L0148: member 'Symbol' previously declared at Location + + + + CRITICAL + BUG + LINEAR + 1min + + + 149 + L0149: C++ construct 'String' found in C code + + + + CRITICAL + BUG + LINEAR + 1min + + + 150 + L0150: Token 'String' unexpected String + + + + CRITICAL + LINEAR + 1min + + + 151 + L0151: Token 'Name' inconsistent with abstract type + + + + CRITICAL + LINEAR + 1min + + + 152 + L0152: Lob base file 'file name' missing + + + + CRITICAL + LINEAR + 1min + + + 153 + L0153: Could not create temporary file + + + + CRITICAL + LINEAR + 1min + + + 154 + L0154: Could not evaluate type 'String', int assumed + + + + CRITICAL + LINEAR + 1min + + + 155 + L0155: Ignoring { }'ed sequence within an expression, 0 assumed + + = 0 ? b : -b; } The last expression in the list is the result. To syntactically support the construct without running amuck we recognize the sequence and issue this message. If you want to use the facility just suppress the message.]]> + + CRITICAL + LINEAR + 1min + + + 156 + L0156: Braced initializer for scalar type 'Name' + + + + CRITICAL + BUG + LINEAR + 1min + + + 157 + L0157: No data may follow an incomplete array + + + + CRITICAL + BUG + LINEAR + 1min + + + 158 + L0158: Assignment to variable 'Symbol' (Location) increases capability + + + + CRITICAL + LINEAR + 1min + + + 159 + L0159: enum following a type is non-standard + + + + CRITICAL + LINEAR + 1min + + + 160 + L0160: The sequence '( {' is non standard and is taken to introduce a GNU statement expression + + 0) z = y; else z = - y; z; }) // Now n has the last value of z. The primary intention of this message is to alert the user to the non-standard nature of this construct. The typical response is to suppress the message and go on. But a few caveats are in order. + Programmers who intend to work only with C code with the GNU extensions may safely disable this diagnostic but C++ users should think twice. This is partly for the reasons given in GCC's documentation (see the section entitled "Statements and Declarations in Expressions") and partly because the meaning of '( {' will change in G++ when its maintainers implement Initializer Lists (a new core language feature that is expected to appear in the 2010 version of the ISO C++ Standard).]]> + + CRITICAL + LINEAR + 1min + + + 161 + L0161: Repeated use of parameter 'Symbol' in parameter list + + + + CRITICAL + BUG + LINEAR + 1min + + + 165 + L0165: An [unscoped] enumeration cannot be forward-declared (int is assumed) + + An [unscoped] enumeration cannot be forward-declared [without an enum-base] (int is assumed) -- This message is issued at the point of a forward-declaration of an enumeration like so:

    +
    
    +               enum E; // Error
    +
    +

    This is prohibited by ISO C and ISO C++98. In C++0x, we can modify this example to be well-formed by explicitly indicating the underlying integral type; example:

    +
    
    +               enum E : unsigned short; // Ok
    +
    +

    If you are not using C++0x and/or your compiler supports the construct you may simply suppress this message with a -e165.

    ]]> +
    + CRITICAL + LINEAR + 1min +
    + + 166 + L0166: Function defined within a function + + + + CRITICAL + BUG + LINEAR + 1min + + + 169 + L0169: mode(String) requests an (integral/floating point) type of size N, but no such type exists. + + (Please check -s options in the Lint configuration.) +This occurs for a use of the GCC attribute mode() as in:

    +
    
    +           __attribute__((mode(DF)));
    +
    +

    This is supposed to match a built-in scalar type whose size is the size indicated in the message. If this message is issued, it probably means that size options have not been set to match the compile configuration; see Section 5.3, Size and Alignment Options.

    +]]> +
    + CRITICAL + BUG + LINEAR + 1min +
    + + 170 + L0170: Explicit type-specifier required for symbol 'Symbol', int assumed + + A declaration did not have an explicit type as required by C99 or C++. int was assumed. This could easily happen if an intended comma was replaced by a semicolon. For example, if instead of typing:

    +
    
    +           double       radius,
    +                        diameter;
    +
    +

    the programmer had typed:

    +
    
    +           double       radius;
    +                        diameter;
    +
    ]]> +
    + convention + CRITICAL + LINEAR + 1min +
    + + 171 + L0171: Ellipsis requires at least one parameter-declaration + + + + CRITICAL + BUG + LINEAR + 1min + + + 200 + L0200: Internal Error, subcode=CODE_SMELLx + + + + tool-error + BLOCKER + + + 301 + L0301: Stack overflow + + + + tool-error + BLOCKER + + + 302 + L0302: Exceeded Available Memory + + + + tool-error + BLOCKER + + + 303 + L0303: String too long (try +macros) + + + + tool-error + BLOCKER + + + 304 + L0304: Corrupt object file, code Integer, symbol=String + + + + tool-error + BLOCKER + + + 305 + L0305: Unable to open module 'file name' + + + + tool-error + BLOCKER + + + 306 + L0306: Previously encountered module 'FileName' + + + + tool-error + BLOCKER + + + 307 + L0307: Can't open indirect file 'FileName' + + + + tool-error + BLOCKER + + + 308 + L0308: Can't write to standard out + + + + tool-error + BLOCKER + + + 309 + L0309: #error ... + + + + tool-error + BLOCKER + + + 310 + L0310: Declaration too long: 'String...' + + + + tool-error + BLOCKER + + + 312 + L0312: Lint (Precompiled Header/Object Module) has obsolete or foreign version id: Integer + + + + tool-error + BLOCKER + + + 313 + L0313: Too many files + + + + tool-error + BLOCKER + + + 314 + L0314: Previously used .lnt file: FileName + + + + tool-error + BLOCKER + + + 315 + L0315: Exceeded message limit (see -limit) + + + + tool-error + BLOCKER + + + 316 + L0316: Error while writing to file "file name" + + + + tool-error + BLOCKER + + + 317 + L0317:File encoding, String, not currently supported + + + + tool-error + BLOCKER + + + 318 + L0318: EOF for a module found within a macro argument list + + + + tool-error + BLOCKER + + + 321 + L0321: Declaration stack overflow + + + + tool-error + BLOCKER + + + 322 + L0322: Unable to open include file FileName + + + + tool-error + BLOCKER + + + 323 + L0323: Token String too long + + + + tool-error + BLOCKER + + + 324 + L0324: Too many symbols Integer + + + + tool-error + BLOCKER + + + 325 + L0325: Cannot re-open file 'file name' + + + + tool-error + BLOCKER + + + 326 + L0326: String 'String ...' too long, exceeds Integer characters + + + + tool-error + BLOCKER + + + 328 + L0328: Bypass header 'Name' follows a different header sequence than in module 'String' which includes File1 where the current module includes File2 + + + + tool-error + BLOCKER + + + 330 + L0330: Static assertion failure: 'String' + + + + tool-error + BLOCKER + + + 333 + L0333: Not allowed to open file 'String' + + + + tool-error + BLOCKER + + + 401 + L0401: symbol 'Symbol' not previously declared static at Location + + + + LINEAR + 1min + + + 402 + L0402: static function 'Symbol' (Location) not defined + + + + LINEAR + 1min + + + 403 + L0403: static symbol 'Symbol' has unusual type modifier + + + + LINEAR + 1min + + + 404 + L0404: struct not completed within file 'FileName' + + + + LINEAR + 1min + + + 405 + L0405: #if not closed off within file 'FileName' + + + + LINEAR + 1min + + + 406 + L0406: Comment not closed off within file 'FileName' + + + + LINEAR + 1min + + + 407 + L0407: Inconsistent use of tag 'Symbol' conflicts with Location + + + + LINEAR + 1min + + + 408 + L0408: Type mismatch with switch expression + + + + LINEAR + 1min + + + 409 + L0409: Expecting a pointer or array + + + + LINEAR + 1min + + + 410 + L0410: size_t not what was expected from fzl and/or fzu, using 'Type' + + + + LINEAR + 1min + + + 411 + L0411: ptrdiff_t not what was expected from fdl option, using 'Type' + + + + LINEAR + 1min + + + 412 + L0412: Ambiguous format specifier '%X' + + + + LINEAR + 1min + + + 413 + L0413: Likely use of null pointer 'Symbol' in [left/right] argument to operator 'String' Reference + + + + LINEAR + 1min + + + 414 + L0414: Possible division by 0 + + + + LINEAR + 1min + + + 415 + L0415: access of out-of-bounds pointer ('Integer' beyond end of data) by operator 'String' + + +An out-of-bounds pointer was accessed. String designates the operator. The parameter 'Integer' gives some idea how far out of bounds the pointer may be. It is measured in units given by the size of the pointed to object. The value is relative to the last item of good data and therefore should always be greater than zero. For example: + int a[10]; + a[10] = 0; +results in an overflow message containing the phrase '1 beyond end of data'. +

    References

    +

    ARR30-C. Do not form or use out-of-bounds pointers or array subscripts

    + + ]]> +
    + cert + security + BUG + LINEAR + 1min +
    + + 416 + L0416: creation of out-of-bounds pointer ('Integer' beyond end of data) by operator 'String' + + +An out-of-bounds pointer was created. See message 415 for a description of the parameters Integer and String. For example: + int a[10]; + ... + f( a + 11 ); +Here, an illicit pointer value is created and is flagged as such by PC-lint/FlexeLint. Note that the pointer a+10 is not considered by PC-lint/FlexeLint to be the creation of an out-of-bounds pointer. This is because ANSI C explicitly allows pointing just beyond an array. Access through a+10, however, as in *(a+10) or the more familiar a[10], would be considered erroneous but in that case message 415 would be issued. +

    References

    +

    ARR30-C. Do not form or use out-of-bounds pointers or array subscripts

    + + ]]> +
    + cert + security + BUG + LINEAR + 1min +
    + + 417 + L0417: integral constant 'String' has precision Number which is longer than long long int + + + + LINEAR + 1min + + + 418 + L0418: Passing null pointer to function 'Symbol', Context Reference + + +A NULL pointer is being passed to a function identified by Symbol. The argument in question is given by Context. The function is either a library function designed not to receive a NULL pointer or a user function dubbed so via the option -function. +

    References

    +

    EXP34-C. Do not dereference null pointers

    + + ]]> +
    + cert + BUG + LINEAR + 1min +
    + + 419 + L0419: Apparent data overrun for function 'Symbol', argument Integer exceeds argument Integer + + + + security + BUG + LINEAR + 1min + + + 420 + L0420: Apparent access beyond array for function 'Symbol', argument Integer exceeds Integer Reference + + +This message is issued for several library functions (such as fwrite, memcmp, etc.) wherein there is an apparent attempt to access more data than exist. For example, if the length of data specified in the fwrite call exceeds the size of the data specified. The function is specified by Symbol and the arguments are identified by argument number. +

    References

    +

    ARR38-C. Guarantee that library functions do not form invalid pointers

    + ]]> +
    + cert + security + BUG + LINEAR + 1min +
    + + 421 + L0421: Caution -- function 'Symbol' is considered dangerous + + +This message is issued (by default) for the built-in function gets. This function is considered dangerous because there is no mechanism to ensure that the buffer provided as first argument will not overflow. A well known computer virus (technically a worm) was created based on this defect. Through the -function option, the user may designate other functions as dangerous. +

    References

    +

    ARR38-C. Guarantee that library functions do not form invalid pointers

    + + ]]> +
    + cert + security + BUG + LINEAR + 1min +
    + + 422 + L0422: Passing to function 'Symbol' a negative value (Integer), Context Reference + + + + LINEAR + 1min + + + 423 + L0423: Creation of memory leak in assignment to variable 'Symbol' + + +An assignment was made to a pointer variable (designated by Symbol) which appeared to already be holding the address of an allocated object which had not been freed. The allocation of memory which is not freed is considered a memory leak. +

    References

    +

    MEM31-C. Free dynamically allocated memory when no longer needed

    + + ]]> +
    + cert + security + BUG + LINEAR + 1min +
    + + 424 + L0424: Inappropriate deallocation (Name1) for 'Name2' data. + + + + LINEAR + 1min + + + 425 + L0425: 'Message' in processing semantic 'String' at token 'String' + + + + LINEAR + 1min + + + 426 + L0426: Call to function 'Symbol' violates semantic 'String' + + 10 && 2n > 10 ) void f( int, int ); ... f( 2, 20 ); + results in the message: + Call to function 'f(int, int)' violates semantic '(1n>10)']]> + + LINEAR + 1min + + + 427 + L0427: // comment terminates in \ + + + + LINEAR + 1min + + + 428 + L0428: negative subscript (Integer) in operator 'String' + + + + LINEAR + 1min + + + 429 + L0429: Custodial pointer 'Symbol' (Location) has not been freed or returned + + A pointer of auto storage class was allocated storage which was neither freed nor returned to the caller. This represents a "memory leak". A pointer is considered custodial if it uniquely points to the storage area. It is not considered custodial if it has been copied. Thus:

    +
     
    +    int *p = new int[20]; // p is a custodial pointer 
    +    int *q = p; // p is no longer custodial 
    +    p = new int[20]; // p again becomes custodial 
    +    q = p + 0; // p remains custodial
    +
    +

    +Here p does not lose its custodial property by merely participating in an arithmetic operation. +A pointer can lose its custodial property by passing the pointer to a function. If the parameter of the function is typed pointer to const or if the function is a library function, that assumption is not made. For example

    +
     
    +  p = malloc(10); 
    +  strcpy (p, "hello");
    +
    +Then p still has custody of storage allocated. +

    It is possible to indicate via semantic options that a function will take custody of a pointer.

    +

    References

    +

    MEM31-C. Free dynamically allocated memory when no longer needed

    + ]]> +
    + cert + security +
    + + 430 + L0430: Character '@', taken to specify variable location, is not standard C/C++ + + + + LINEAR + 1min + + + 431 + L0431: Missing identifier for template parameter number Integer + + + + LINEAR + 1min + + + 432 + L0432: Suspicious argument to malloc + + The following pattern was detected:

    +
    
    +    malloc( strlen(e+1) )
    +
    +

    where e is some expression. This is suspicious because it closely resembles the commonly used pattern:

    +
    
    +    malloc( strlen(e)+1 )
    +
    +

    If you really intended to use the first pattern then an equivalent expression that will not raise this error is:

    +
    
    +    malloc( strlen(e)-1 )
    ]]> +
    + LINEAR + 1min +
    + + 433 + L0433: Allocated area not large enough for pointer + + An allocation was assigned to a pointer whose reach extends beyond the area that was allocated. This would usually happen only with library allocation routines such as malloc and calloc. +For example:

    +
    
    +    int *p = malloc(1);
    +
    +

    This message is also provided for user-declared allocation functions. For example, if a user's own allocation function is provided with the following semantic:

    +
    
    +    -sem(ouralloc,@P==malloc(1n))
    +
    +

    We would report the same message. Please note that it is necessary to designate that the returned area is freshly allocated (ala malloc). + This message is always given in conjunction with the more general Informational Message 826.

    +

    References

    +

    MEM35-C. Allocate sufficient memory for an object

    + + ]]> +
    + cert + security + BUG + LINEAR + 1min +
    + + 434 + L0434: White space ignored between back-slash and new-line + + + + LINEAR + 1min + + + 435 + L0435: integral constant 'String' has precision Integer, use +fll to enable long long" + + + + LINEAR + 1min + + + 436 + L0436: Apparent preprocessor directive in invocation of macro 'Symbol' + + This is issued in the context of an invocation of a function-like macro.

    +
    
    +    Example:
    +
    +           #define FOO(p) p
    +
    +           FOO(
    +                   #define X Y
    +              )
    +
    +

    According to the ISO Standards, this results in undefined behavior.

    + +

    By the rules of Standard C the preprocessing directive is + absorbed into the macro argument but then will not subsequently + get executed. For this reason some compilers treat the apparent + preprocessor directive as a directive. This is logical but not + portable. It is therefore best to avoid this construct.

    ]]> +
    + CRITICAL + LINEAR + 1min +
    + + 437 + L0437: Passing struct 'Symbol' to ellipsis + + + + LINEAR + 1min + + + 438 + L0438: Last value assigned to variable 'Symbol' not used + + 0 ) { int z; z = x + y; if( n > z ) { x = 3; return; } z = 12; } } Here we can report that x was assigned a value that had not been used by the time the return statement had been encountered. We also report that the most recently assigned value to z is unused at the point that z goes out of scope. See message 838 in Section 13.4 C Informational Messages and flags -fiw and -fiz in Sections 2.3.6 Initialization-is-considered-a-Write flag (-fiw) and 2.3.7 Initialization-by-Zero-is-considered-a-Write flag (-fiz) . + This message is suppressed if the variable's address is assigned to a pointer (or, equivalently, the variable is used to directly initialize a reference to non-const).]]> + + LINEAR + 1min + + + 440 + L0440: for clause irregularity: variable 'Symbol' tested in 2nd expression does not match 'Symbol' modified in 3rd + + + + LINEAR + 1min + + + 441 + L0441: for clause irregularity: loop variable 'Symbol' not found in 2nd for expression + + + + LINEAR + 1min + + + 442 + L0442: for clause irregularity: testing direction inconsistent with increment direction + + + + LINEAR + 1min + + + 443 + L0443: for clause irregularity: variable 'Symbol' initialized in 1st expression does not match 'Symbol' modified in 3rd + + + + LINEAR + 1min + + + 444 + L0444: for clause irregularity: pointer 'Symbol' incremented in 3rd expression is tested for NULL in 2nd expression + + + + LINEAR + 1min + + + 445 + L0445: reuse of for loop variable 'Symbol' at 'Location' could cause chaos + + + + LINEAR + 1min + + + 446 + L0446: side effect in initializer + + An initializer containing a side effect can be potentially troublesome. For example, given the code:

    +
    
    +           void f( int i )
    +               {
    +               int a[2] = {i++, i++};
    +               }
    +
    +

    The values of the array elements are unspecified because the order of evaluation is unspecified by the C standard.

    ]]> +
    + LINEAR + 1min +
    + + 447 + L0447: Extraneous whitespace ignored in include directive for file 'FileName'; opening file 'FileName' + + or closing ". Since filenames tend not to contain leading or trailing whitespace, Lint ignores the (apparently) extraneous characters and processes the directive as though the characters were never given. The use of a -efile option on either String for this message will cause Lint to process #include's with whitespace intact.]]> + + LINEAR + 1min + + + 448 + L0448: Likely access of pointer pointing Integer bytes past nul character by operator 'String' + + + + LINEAR + 1min + + + 449 + L0449: Pointer variable 'Symbol' previously deallocated + + + + LINEAR + 1min + + + 451 + L0451: Header file 'FileName' repeatedly included but does not have a standard include guard + + + + LINEAR + 1min + + + 452 + L0452: typedef Symbol 'Symbol' redeclared (TypeDiff) conflicts with Location", + + + + LINEAR + 1min + + + 453 + L0453: Function 'Symbol', previously designated pure, String 'Name' + + + + LINEAR + 1min + + + 454 + L0454: A thread mutex has been locked but not unlocked + + + + LINEAR + 1min + + + 455 + L0455: A thread mutex that had not been locked is being unlocked + + + + LINEAR + 1min + + + 456 + L0456: Two execution paths are being combined with different mutex lock states + + + + LINEAR + 1min + + + 457 + L0457: Function 'Symbol1' of thread 'Symbol2' has an unprotected write access to variable 'Symbol3' which is used by function 'Symbol4' of thread 'Symbol5' + + + + LINEAR + 1min + + + 458 + L0458: Function 'Symbol1' of thread 'Symbol2' has an unprotected read access to variable 'Symbol3' which is modified by function 'Symbol4' of thread 'Symbol5' + + + + LINEAR + 1min + + + 459 + L0459: Function 'Symbol' whose address was taken has an unprotected access to variable 'Symbol' + + + + LINEAR + 1min + + + 460 + L0460: Thread 'Symbol' has unprotected call to thread unsafe function 'Symbol' which is also called by thread 'Symbol' + + + + LINEAR + 1min + + + 461 + L0461: Thread 'Symbol' has unprotected call to function 'Symbol' of group 'Name' while thread 'Symbol' calls function 'Symbol' of the same group + + + + LINEAR + 1min + + + 462 + L0462: Thread 'Symbol' calling function 'Symbol' is inconsistent with the 'String' semantic + + + + LINEAR + 1min + + + 464 + L0464: Buffer argument will be copied into itself + + + + LINEAR + 1min + + + 483 + L0483: boolean value in switch expression + + + + LINEAR + 1min + + + 484 + L0484: Stringize operator followed by macro parameter followed by pasting operator + + + + LINEAR + 1min + + + 485 + L0485: Duplicate initialization of object element + + + + LINEAR + 1min + + + 486 + L0486: attempting to write to a file opened as read-only + + + + LINEAR + 1min + + + 488 + L0488: Symbol 'Symbol' has same implicit enumerator value 'String' as enumerator 'Symbol' + + Two enumerators have the same value and at least one received that value implicitly. For example:

    +
    
    +           enum colors { red, blue, green = 1 };
    +
    +

    will elicit this informational message while

    +
    
    +           enum colors { red, blue = 1, green = 1 };
    +
    +

    will not.

    ]]> +
    + LINEAR + 1min +
    + + 489 + L0489: attempting to modify the contents of a string literal + + + + CRITICAL + LINEAR + 1min + + + 491 + L0491: non-standard use of 'defined' preprocessor operator + + The ISO standards restrict the use of the defined preprocessor keyword to either

    +
    
    +           defined(identifier)
    +           defined identifier
    +
    +

    Additionally, the preprocessor operator may not result from the expansion of another macro. This diagnostic highlights departures from these requirements as non-portable code.

    + + ]]> +
    + LINEAR + 1min +
    + + 501 + L0501: Expected signed type + + + + LINEAR + 1min + + + 502 + L0502: Expected unsigned type + + + + LINEAR + 1min + + + 503 + L0503: Boolean argument to relational + + + + LINEAR + 1min + + + 504 + L0504: Unusual shift operation (String) + + + + LINEAR + 1min + + + 505 + L0505: Redundant left argument to comma + + + + LINEAR + 1min + + + 506 + L0506: Constant value Boolean + + + + LINEAR + 1min + + + 507 + L0507: Size incompatibility + + + + LINEAR + 1min + + + 508 + L0508: extern used with definition + + + + LINEAR + 1min + + + 509 + L0509: extern used with definition + + + + LINEAR + 1min + + + 510 + L0510: File extension 'String' reserved for future versions of this product + + + + LINEAR + 1min + + + 511 + L0511: Size incompatibility + + + + LINEAR + 1min + + + 512 + L0512: Symbol 'Symbol' previously used as static (Location) + + + + LINEAR + 1min + + + 514 + L0514: Unusual use of a Boolean + + + + LINEAR + 1min + + + 515 + L0515: Symbol 'Symbol' has arg. count conflict (Integer vs. Integer) with Location + + + + LINEAR + 1min + + + 516 + L0516: Symbol 'Symbol' has arg. type conflict (no. Integer -- TypeDiff) with Location + + + + LINEAR + 1min + + + 517 + L0517: defined not K&R + + + + LINEAR + 1min + + + 518 + L0518: Expected '(' + + + + LINEAR + 1min + + + 519 + L0519: Size incompatibility + + + + LINEAR + 1min + + + 520 + L0520: Highest operator or function lacks side-effects + + + + LINEAR + 1min + + + 521 + L0521: Highest operator or function lacks side-effects + + + + LINEAR + 1min + + + 522 + L0522: Highest operator or function lacks side-effects + + + + LINEAR + 1min + + + 524 + L0524: Loss of precision (Context) (Type to Type) + + + + LINEAR + 1min + + + 525 + L0525: Negative indentation from Location + + + + LINEAR + 1min + + + 526 + L0526: 'Symbol' (Location) not defined + + + + LINEAR + 1min + + + 527 + L0527: Unreachable code at token Symbol + + + + LINEAR + 1min + + + 528 + L0528: Symbol 'Symbol' (Location) not referenced + + + + LINEAR + 1min + + + 529 + L0529: Symbol 'Symbol' (Location) not subsequently referenced + + + + LINEAR + 1min + + + 530 + L0530: Symbol 'Symbol' (Location) not initialized + + + + LINEAR + 1min + + + 531 + L0531: Field size too large for 'Symbol' + + + + LINEAR + 1min + + + 532 + L0532: Return mode of function 'Symbol' inconsistent with Location + + + + LINEAR + 1min + + + 533 + L0533: function 'Symbol' should (not) return a value (see Location) + + + + LINEAR + 1min + + + 534 + L0534: Ignoring return value of function 'Symbol' (compare with Location) + + + + LINEAR + 1min + + + 537 + L0537: Repeated include file 'FileName' + + + + LINEAR + 1min + + + 538 + L0538: Excessive size + + + + LINEAR + 1min + + + 539 + L0539: Did not expect positive indentation from Location + + 0 ) x = 3; y = 4; + will result in this warning being issued for y = 4;. The Location cited will be that of the if clause.]]> + + LINEAR + 1min + + + 540 + L0540: Excessive size + + + + LINEAR + 1min + + + 541 + L0541: Excessive size + + + + LINEAR + 1min + + + 542 + L0542: Excessive size for bit field + + + + LINEAR + 1min + + + 544 + L0544: #endif or #else not followed by EOL + + + + LINEAR + 1min + + + 545 + L0545: Suspicious use of & + + +int a[10]; int (*p) [10]; + +Then a and &a, as pointers, both represent the same bit pattern, but whereas a is a pointer to int, &a is a pointer to array 10 of int. Of the two only &a may be assigned to p without complaint. If you are using the & operator in this way, we recommend that you disable this message. + + ]]> + + LINEAR + 1min + + + 546 + L0546: Suspicious use of & + + + + LINEAR + 1min + + + 547 + L0547: Redefinition of symbol 'Symbol' conflicts with Location + + + + LINEAR + 1min + + + 548 + L0548: else expected + + + + LINEAR + 1min + + + 549 + L0549: Suspicious cast + + + + LINEAR + 1min + + + 550 + L0550: Symbol 'Symbol' (Location) not accessed + + + + LINEAR + 1min + + + 551 + L0551: Symbol 'Symbol' (Location) not accessed + + + + LINEAR + 1min + + + 552 + L0552: Symbol 'Symbol' (Location) not accessed + + + + LINEAR + 1min + + + 553 + L0553: Undefined preprocessor variable 'Name', assumed 0 + + +The indicated variable had not previously been defined within a #define statement and yet it is being used in a preprocessor condition of the form #if or #elif. +Conventionally all variables in preprocessor expressions should be pre-defined. The value of the variable is assumed to be 0. +

    References

    +

    PRE31-C. Avoid side effects in arguments to unsafe macros

    + +]]> +
    + cert + LINEAR + 1min +
    + + 555 + L0555: #elif not K&R + + + + LINEAR + 1min + + + 556 + L0556: indented # + + + + LINEAR + 1min + + + 557 + L0557: unrecognized format + + + + LINEAR + 1min + + + 558 + L0558: Too few arguments for format (Integer missing) + + + + LINEAR + 1min + + + 559 + L0559: size of argument number Integer inconsistent with format + + +sprintf( buffer, "%f", 371 ) + +will show an error in argument number 3 because constant 371 is not floating point. + + ]]> + + LINEAR + 1min + + + 560 + L0560: argument no. Integer should be a pointer + + +scanf( "%f", 3.5 ) + +will generate the message that argument no. 2 should be a pointer. + + ]]> + + LINEAR + 1min + + + 561 + L0561: (arg. no. Integer) indirect object inconsistent with format + + +scanf( "%c", &n ) + +will elicit this message for argument number 2. + + ]]> + + LINEAR + 1min + + + 562 + L0562: Ellipsis (...) assumed + + + + LINEAR + 1min + + + 563 + L0563: Label 'Symbol' (Location) not referenced + + + + LINEAR + 1min + + + 564 + L0564: variable 'Symbol' depends on order of evaluation + + + + LINEAR + 1min + + + 565 + L0565: tag 'Symbol' not previously seen, assumed file-level scope + + + + LINEAR + 1min + + + 566 + L0566: Inconsistent or redundant format char 'Char' + + + + LINEAR + 1min + + + 567 + L0567: Expected a numeric field before char 'Char' + + + + LINEAR + 1min + + + 568 + L0568: nonnegative quantity is never less than zero. + + Comparisons of the form:

    +
    
    +    u >= 0 0 <= u
    +    u < 0 0 > u
    +
    +

    are suspicious if u is an unsigned quantity or a quantity judged to be never less then 0. See also message 775.

    ]]> +
    + LINEAR + 1min +
    + + 569 + L0569: Loss of information (Context) (Integer bits to Integer bits) + + + + LINEAR + 1min + + + 570 + L0570: Loss of sign (Context) (Type to Type) + + + + LINEAR + 1min + + + 571 + L0571: Suspicious Cast + + + + LINEAR + 1min + + + 572 + L0572: Excessive shift value (precision Integer shifted right by Integer) + + > 10 + will elicit this message if ch is typed char and where char is less than 10 bits wide (the usual case). To suppress the message you may cast the shifted quantity to a type whose length is at least the length of the shift value.]]> + + LINEAR + 1min + + + 573 + L0573: Signed-unsigned mix with divide + + one of the operands to / or % was signed and the other unsigned; moreover the signed quantity could be negative. For example:

    +
    
    +    u / n
    +
    +

    where u is unsigned and n is signed will elicit this message whereas:

    +
    
    +    u / 4
    +
    +

    will not, even though 4 is nominally an int. It is not a good idea to mix unsigned quantities with signed quantities in any case (a 737 will also be issued) but, with division, a negative value can create havoc. For example, the innocent looking:

    +
    
    +    n = n / u
    +
    +

    will, if n is -2 and u is 2, not assign -1 to n but will assign some very large value.

    +

    To resolve this problem, either cast the integer to unsigned if you know it can never be less than zero or cast the unsigned to an integer if you know it can never exceed the maximum integer.

    ]]> +
    + LINEAR + 1min +
    + + 574 + L0574: Signed-unsigned mix with relational + + The four relational operators are:

    +
    
    +> >= < <=
    +
    +

    One of the operands to a relational operator was signed and the other unsigned; also, the signed quantity could be negative. For example:

    +
    
    +    if( u > n ) ...
    +
    +

    where u is unsigned and n is signed will elicit this message whereas:

    +
    
    +    if( u > 12 ) ...
    +
    +

    will not (even though 12 is officially an int it is obvious that it is not negative). It is not a good idea to mix unsigned quantities with signed quantities in any case (a 737 will also be issued) but, with the four relationals, a negative value can produce obscure results. For example, if the conditional:

    +
    
    +    if( n < 0 ) ...
    +
    +

    is true then the similar appearing:

    +
    
    +    u = 0; if( n < u ) ...
    +
    +

    is false because the promotion to unsigned makes n very large.

    +

    To resolve this problem, either cast the integer to unsigned if you know it can never be less than zero or cast the unsigned to an int if you know it can never exceed the maximum int.

    ]]> +
    + LINEAR + 1min +
    + + 575 + L0575: enumeration constant exceeds range for integers + + + + LINEAR + 1min + + + 577 + L0577: Mixed memory model (option 'String') + + + + LINEAR + 1min + + + 578 + L0578: Declaration of symbol 'Symbol' hides symbol 'Symbol' (Location) + + + + LINEAR + 1min + + + 579 + L0579: parameter preceding ellipsis has invalid type + + + + LINEAR + 1min + + + 580 + L0580: Redeclaration of function 'Symbol' (hiding Location) causes loss of prototype + + + + LINEAR + 1min + + + 581 + L0581: Option 'String' is obsolete and should no longer be used + + + + LINEAR + 1min + + + 582 + L0582: esym (or emacro) name 'String' should not contain '(' + + + + LINEAR + 1min + + + 583 + L0583: Comparing type 'Type' with EOF + + + + LINEAR + 1min + + + 584 + L0584: Trigraph sequence (??Char) detected + + + + LINEAR + 1min + + + 585 + L0585: The sequence (??Char) is not a valid Trigraph sequence + + This warning is issued whenever a pair of '?' characters is seen within a string (or character) constant but that pair is not followed by a character which would make the triple a valid Trigraph sequence. Did the programmer intend this to be a Trigraph sequence and merely err? Even if no Trigraph were intended, it can easily be mistaken by the reader of the code to be a Trigraph. Moreover, what assurances do we have that in the future the invalid Trigraph might not become a valid Trigraph and change the meaning of the string? To protect yourself from such an event you may place a backslash between the '?' characters. Alternatively you may use concatenation of string constants.

    +

    For example:

    +
    
    +    pattern = "(???) ???-????"; // warning 585
    +    pattern = "(?\?\?) ?\?\?-?\?\?\?"; // no warning
    +    #define Q "?"
    +    pattern = "(" Q Q Q ") " Q Q Q "-" Q Q Q Q // no warning
    +
    ]]> +
    + LINEAR + 1min +
    + + 586 + L0586: String 'Name' is deprecated. String + + + + LINEAR + 1min + + + 587 + L0587: Predicate 'String' can be pre-determined and always evaluates to String + + + + LINEAR + 1min + + + 588 + L0588: Predicate 'String' will always evaluate to String unless an overflow occurs + + + + LINEAR + 1min + + + 589 + L0589: Predicate 'String' will always evaluate to String assuming standard division semantics + + + + LINEAR + 1min + + + 590 + L0590: Predicate 'String' will always evaluate to String assuming standard shift semantics + + > 5) >= 0 ) ... would always be regarded as true. This is because shifting a negative number to the right yields results that are implementation defined. + See also Message 587.]]> + + LINEAR + 1min + + + 591 + L0591: Variable 'Symbol' depends on the order of evaluation; it is used/modified through function 'Symbol' via calls: String" + + f() If the function g() is called and then n is added, you will obtain a different result than if n were first evaluated and then the call made. + The programmer should generally rewrite these expressions so that the compiler is constrained to use the intended order. For example if the programmer wanted to use the n prior to the call on g() it can alter h() to the following: int h() { int k = n; return k + g(); } This analysis requires two passes; the first pass builds the necessary call trees.]]> + + LINEAR + 1min + + + 592 + L0592: Non-literal format specifier used without arguments + + +A printf/scanf style function received a non-literal format specifier without trailing arguments. For example:

    +
    
    +  char msg[100]; 
    +    ... 
    +  printf( msg ); 
    +
    +

    This can easily be rewritten to the relatively safe:

    +
    
    +  char msg[100]; 
    +    ... 
    +  printf( "%s", msg ); 
    +
    +

    The danger lies in the fact that msg can contain hidden format codes. If msg is read from user input, then in the first example, a naive user could cause a glitch or a crash and a malicious user might exploit this to undermine system security. Since the unsafe form can easily be transformed into the safe form the latter should always be used. +

    + ]]> +
    + security + LINEAR + 1min +
    + + 593 + L0593: Custodial pointer 'Symbol' (Location) possibly not freed or returned + + +This is the 'possible' version of message 429. A pointer of auto storage class was allocated storage and not all paths leading to a return statement or to the end of the function contained either a free or a return of the pointer. Hence there is a potential memory leak. For example:

    +
    
    +  void f( int n ) 
    +    { 
    +    int *p = new int; 
    +    if( n ) delete p; 
    +    } // message 593 
    +
    +

    In this example an allocation is made and, if n is 0, no delete will have been made. +Please see message 429 for an explanation of "custodial" and ways of regulating when pointer variables retain custody of allocations. +

    + ]]> +
    + LINEAR + 1min +
    + + 598 + L0598: Excessive shift value (precision Integer shifted left by Integer) + + A quantity is being shifted to the left by a value greater than or equal to the precision of that quantity or by a negative value. For example,

    +
    
    +         i << 32
    +
    +

    will elicit this message if i is typed int and where int is 32 bits wide or less (the usual case). Such shift results in undefined behavior.

    +

    To suppress the message you may cast the shifted quantity to a type whose length is at least the length of the shift value.

    ]]> +
    + LINEAR + 1min +
    + + 601 + L0601: Expected a type for symbol Symbol, int assumed + + + + LINEAR + 1min + + + 602 + L0602: Comment within comment + + + + LINEAR + 1min + + + 603 + L0603: Symbol 'Symbol' (Location) not initialized + + + + LINEAR + 1min + + + 604 + L0604: Returning address of auto variable 'Symbol' + + + + LINEAR + 1min + + + 605 + L0605: Increase in pointer capability (Context) + + This warning is typically caused by assigning a (pointer to const) to an ordinary pointer. For example:

    +
    
    +    int *p;
    +    const int *q;
    +    p = q; /* 605 */
    +
    +

    The message will be inhibited if a cast is used as in:

    +
    
    +    p = (int *) q;
    +
    +

    An increase in capability is indicated because the const pointed to by q can now be modified through p. This message can be given for the volatile qualifier as well as the const qualifier and may be given for arbitrary pointer depths (pointers to pointers, pointers to arrays, etc.). +If the number of pointer levels exceeds one, things get murky in a hurry. For example:

    +
    
    +    const char ** ppc;
    +    char ** pp;
    +    pp = ppc; /* 605 - clearly not safe */
    +    ppc = pp; /* 605 - looks safe but it's not */
    +
    +

    It was not realized by the C community until very recently that assigning pp to ppc was dangerous. The problem is that after the above assignment, a pointer to a const char can be assigned indirectly through ppc and accessed through pp which can then modify the const char. +The message speaks of an "increase in capability" in assigning to ppc, which seems counter intuitive because the indirect pointer has less capability. However, assigning the pointer does not destroy the old one and the combination of the two pointers represents a net increase in capability. +The message may also be given for function pointer assignments when the prototype of one function contains a pointer of higher capability than a corresponding pointer in another prototype. There is a curious inversion here whereby a prototype of lower capability translates into a function of greater trust and hence greater capability (a Trojan Horse). For example, let

    +
    
    +    void warrior( char * );
    +
    +

    be a function that destroys its argument. Consider the function:

    +
    
    +    void Troy( void (*horse)(const char *) );
    +
    +

    Troy() will call horse() with an argument that it considers precious believing the horse() will do no harm. Before compilers knew better and believing that adding in a const to the destination never hurt anything, earlier compilers allowed the Greeks to pass warrior() to Troy and the rest, as they say, is history.

    ]]> +
    + LINEAR + 1min +
    + + 606 + L0606: Non-ANSI escape sequence: '\String' + + + + LINEAR + 1min + + + 607 + L0607: Parameter 'Symbol' of macro found within string + + + + LINEAR + 1min + + + 608 + L0608: Assigning to an array parameter + + + + LINEAR + 1min + + + 609 + L0609: Suspicious pointer conversion + + + + LINEAR + 1min + + + 610 + L0610: Suspicious pointer combination + + + + LINEAR + 1min + + + 611 + L0611: Suspicious cast + + + + LINEAR + 1min + + + 612 + L0612: Expected a declarator + + + + LINEAR + 1min + + + 613 + L0613: Possible use of null pointer 'Symbol' in [left/right] argument to operator 'String' Reference + + + + LINEAR + 1min + + + 614 + L0614: auto aggregate initializer not constant + + + + LINEAR + 1min + + + 615 + L0615: auto aggregate initializer has side effects + + + + LINEAR + 1min + + + 616 + L0616: control flows into case/default + + + + LINEAR + 1min + + + 617 + L0617: String is both a module and an include file + + + + LINEAR + 1min + + + 618 + L0618: Storage class specified after a type + + + + LINEAR + 1min + + + 619 + L0619: Loss of precision (Context) (Pointer to Pointer) + + + + LINEAR + 1min + + + 620 + L0620: Suspicious constant (L or one?) + + + + LINEAR + 1min + + + 621 + L0621: Identifier clash (Symbol 'Name' with Symbol 'Name' at String) + + + + LINEAR + 1min + + + 622 + L0622: Size of argument no. Integer inconsistent with format + + + + LINEAR + 1min + + + 623 + L0623: redefining the storage class of symbol 'Symbol' (TypeDiff) conflicts with Location + + + + LINEAR + 1min + + + 624 + L0624: typedef 'Symbol' redeclared (TypeDiff) (Location) + + + + LINEAR + 1min + + + 625 + L0625: auto symbol 'Symbol' has unusual type modifier + + + + LINEAR + 1min + + + 626 + L0626: argument no. Integer inconsistent with format + + + + LINEAR + 1min + + + 627 + L0627: (arg. no. Integer) indirect object inconsistent with format + + + + LINEAR + 1min + + + 628 + L0628: no argument information provided for function 'Symbol' (Location) + + + + LINEAR + 1min + + + 629 + L0629: static class for function 'Symbol' is non standard + + + + LINEAR + 1min + + + 630 + L0630: ambiguous reference to symbol 'Name' + + + + LINEAR + 1min + + + 631 + L0631: tag 'Symbol' defined differently at Location + + + + LINEAR + 1min + + + 632 + L0632: Assignment to strong type 'Name' in context: Context + + + + LINEAR + 1min + + + 633 + L0633: Assignment from a strong type 'Name' in context: Context + + + + LINEAR + 1min + + + 634 + L0634: Strong type mismatch (type 'Symbol') in equality or conditional + + + + LINEAR + 1min + + + 635 + L0635: resetting strong parent of type 'Symbol', old parent == type 'Symbol' + + + + LINEAR + 1min + + + 636 + L0636: ptr to strong type 'Name' versus another type + + + + LINEAR + 1min + + + 637 + L0637: Expected index type 'Symbol' for strong type 'Symbol' + + + + LINEAR + 1min + + + 638 + L0638: Strong type mismatch for type 'Name' in relational + + = <= > < ) violates a Strong type check as requested by a -strong(J... option. This message would have been suppressed using flags "Jr".]]> + + LINEAR + 1min + + + 639 + L0639: Strong type mismatch for type 'Name' in binary operation + + + + LINEAR + 1min + + + 640 + L0640: Expected strong type 'Name' in Boolean context + + + + LINEAR + 1min + + + 641 + L0641: Converting enum to int + + + + LINEAR + 1min + + + 642 + L0642: Format char 'Char' not supported by wsprintf + + + + LINEAR + 1min + + + 643 + L0643: Loss of precision in pointer cast + + + + LINEAR + 1min + + + 644 + L0644: Variable 'Symbol' (Location) may not have been initialized + + + + LINEAR + 1min + + + 645 + L0645: Symbol 'Symbol' (Location) may not have been initialized + + + + LINEAR + 1min + + + 646 + L0646: case/default within Kind loop; may have been misplaced + + + + LINEAR + 1min + + + 647 + L0647: Suspicious truncation + + This message is issued when it appears that there may have been an unintended loss of information during an operation involving int or unsigned int the result of which is later converted to long. It is issued only for systems in which int is smaller than long. For example:

    +
    +(long) (n << 8)
    +
    +might elicit this message if n is unsigned int, whereas +
    +(long) n << 8
    +
    +would not. In the first case, the shift is done at int precision and the high order 8 bits are lost even though there is a subsequent conversion to a type that might hold all the bits. In the second case, the shifted bits are retained. +

    The operations that are scrutinized and reported upon by this message are: shift left, multiplication, and bit-wise complementation. Addition and subtraction are covered by Informational message 776.</description></rule>

    +

    The conversion to long may be done explicitly with a cast as shown or implicitly via assignment, return, argument passing or initialization.

    +

    The message can be suppressed by casting. You may cast one of the operands so that the operation is done in full precision as is given by the second example above. Alternatively, if you decide there is really no problem here (for now or in the future), you may cast the result of the operation to some form of int. For example, you might write:

    +
    +(long) (unsigned) (n << 8)
    +
    +In this way PC-lint/FlexeLint will know you are aware of and approve of the truncation. + + ]]> +
    + LINEAR + 1min +
    + + 648 + L0648: Overflow in computing constant for operation: String + + + + LINEAR + 1min + + + 649 + L0649: Sign fill during constant shift + + + + LINEAR + 1min + + + 650 + L0650: Constant out of range for operator String + + > 4 == 16 ) ... + will receive this warning because the left-hand side is limited to 4 bits of precision.]]> + + LINEAR + 1min + + + 651 + L0651: Potentially confusing initializer + + + + LINEAR + 1min + + + 652 + L0652: #define of symbol 'Symbol' declared previously at Location + + + + LINEAR + 1min + + + 653 + L0653: Possible loss of fraction + + + + LINEAR + 1min + + + 654 + L0654: Option String obsolete; use -width(W,I) + + + + LINEAR + 1min + + + 655 + L0655: bit-wise operation uses (compatible) enum's + + + + LINEAR + 1min + + + 656 + L0656: Arithmetic operation uses (compatible) enum's + + + + LINEAR + 1min + + + 657 + L0657: Unusual (nonportable) anonymous struct or union + + + + LINEAR + 1min + + + 658 + L0658: Anonymous union assumed (use flag +fan) + + + + LINEAR + 1min + + + 659 + L0659: Nothing follows '}' on line within struct/union/enum declaration + + + + LINEAR + 1min + + + 660 + L0660: Option 'String' requests removing an extent that is not on the list + + + + LINEAR + 1min + + + 661 + L0661: possible access of out-of-bounds pointer ('Integer' beyond end of data) by operator 'String' + + +An out-of-bounds pointer may have been accessed. See message 415 for a description of the parameters Integer and String. For example:

    +
     
    +  int a[10]; 
    +  if( n <= 10 ) a[n] = 0;
    +
    +Here the programmer presumably should have written n<10. This message is similar to messages 415 and 796 but differs from them by the degree of probability. +

    References

    +

    ARR30-C. Do not form or use out-of-bounds pointers or array subscripts

    + + ]]> +
    + cert + security + BUG + LINEAR + 1min +
    + + 662 + L0662: possible creation of out-of-bounds pointer ('Integer' beyond end of data) by operator 'String' + + +An out-of-bounds pointer may have been created. See message 415 for a description of the parameters Integer and String. For example:

    +
    
    +  int a[10]; 
    +  if( n <= 20 ) f( a + n );
    +
    +Here, it appears as though an illicit pointer is being created, but PC-lint/FlexeLint cannot be certain. See also messages 416 and 797. +

    References

    +

    ARR30-C. Do not form or use out-of-bounds pointers or array subscripts

    + + ]]> +
    + cert + security + BUG + LINEAR + 1min +
    + + 663 + L0663: Suspicious array to pointer conversion + + a ... + Here, the programmer forgot to index the array but the error normally goes undetected because the array reference is automatically and implicitly converted to a pointer to the first element of the array. If you really mean to access the first element use y[0].a.]]> + + LINEAR + 1min + + + 664 + L0664: Left side of logical OR (||) or logical AND (&&) does not return + + 2 ) ... + Since the exit function does not return, control can never flow to the right hand operator.]]> + + LINEAR + 1min + + + 665 + L0665: Unparenthesized parameter Integer in macro 'Symbol' is passed an expression + + + + LINEAR + 1min + + + 666 + L0666: Expression with side effects passed to repeated parameter Integer of macro 'Symbol' + + + + LINEAR + 1min + + + 667 + L0667: Inconsistent use of qualifiers for symbol 'Symbol' (type 'Type' vs. 'Type') conflicts with Location + + + + LINEAR + 1min + + + 668 + L0668: Possibly passing a null pointer to function 'Symbol', Context Reference + + + + LINEAR + 1min + + + 669 + L0669: Possible data overrun for function 'Symbol', argument Integer exceeds argument Integer Reference + + +This message is for data transfer functions such as memcpy, strcpy, fgets, etc. when the size indicated by the first cited argument (or arguments) can possibly exceed the size of the buffer area cited by the second. The message may also be issued for user functions via the -function option. +

    References

    +

    ARR38-C. Guarantee that library functions do not form invalid pointers

    + + ]]> +
    + cert + security + BUG + LINEAR + 1min +
    + + 670 + L0670: Possible access beyond array for function 'Symbol', argument Integer exceeds Integer Reference + + +This message is issued for several library functions (such as fwrite, memcmp, etc) wherein there is a possible attempt to access more data than exist. For example, if the length of data specified in the fwrite call exceeds the size of the data specified. The function is specified by Symbol and the arguments are identified by argument number. +

    References

    +

    ARR38-C. Guarantee that library functions do not form invalid pointers

    + + ]]> +
    + cert + security + BUG + LINEAR + 1min +
    + + 671 + L0671: Possibly passing to function 'Symbol' a negative value (Integer), Context Reference + + + + LINEAR + 1min + + + 672 + L0672: Possible memory leak in assignment to pointer 'Symbol' + + +An assignment was made to a pointer variable (designated by Symbol) which may already be holding the address of an allocated object which had not been freed. The allocation of memory which is not freed is considered a 'memory leak'. The memory leak is considered 'possible' because only some lines of flow will result in a leak. +

    References

    +

    MEM31-C. Free dynamically allocated memory when no longer needed

    + + ]]> +
    + cert + security + BUG + LINEAR + 1min +
    + + 673 + L0673: Possibly inappropriate deallocation (Name1) for 'Name2' data. + + + + LINEAR + 1min + + + 674 + L0674: Returning address of auto through variable 'Symbol'. + + + + LINEAR + 1min + + + 675 + L0675: No prior semantics associated with 'Name' in option 'String' + + + + LINEAR + 1min + + + 676 + L0676: Possibly negative subscript (Integer) in operator 'String' + + + + LINEAR + 1min + + + 677 + L0677: sizeof used within preprocessor statement. + + + + LINEAR + 1min + + + 678 + L0678: Member 'Symbol' field length (Integer) too small for enum precision (Integer) + + + + LINEAR + 1min + + + 679 + L0679: Suspicious Truncation in arithmetic expression combining with pointer + + + + LINEAR + 1min + + + 680 + L0680: Suspicious Truncation in arithmetic expression converted to pointer + + + + LINEAR + 1min + + + 681 + L0681: Loop is not entered + + + + LINEAR + 1min + + + 682 + L0682: sizeof applied to a parameter 'Symbol' whose type is a sized array + + + + LINEAR + 1min + + + 683 + L0683: function 'Symbol' #define'd + + + + LINEAR + 1min + + + 684 + L0684: Passing address of auto variable 'Symbol' into caller space + + + + LINEAR + 1min + + + 685 + L0685: Relational operator 'String,' always evaluates to 'String' + + +if( (u & 0xFF) > 0xFF ) ... + +will also raise a 685 because the expression on the left hand side has an effective precision of 16 bits. + + ]]> + + LINEAR + 1min + + + 686 + L0686: Option 'String' is suspicious because of 'Name' + + An option is considered suspicious for one of a variety of reasons. The reason is designated by a reason code that is specified by Name. At this writing the following reasons for issuing this message exist:

    +
    • unbalanced quotes -- An option was seen with a quote character which was not balanced within that same option.
    • +
    • backtick preceding non-meta character is superfluous and has been dropped -- A backtick (`) was seen before a character other than a * or a ?. The use of a backtick in this fashion has no effect.
    • +
    • Upper case characters within extension 'String'; these will match lower case when +fff is on; try -fff -- A file extension involving capital letters was seen in a +cpp(), +lnt(), or +ext() option while the +fff flag was active. If, for example, you intend for .c to indicate a C module and .C to indicate a C++ module, turning off the fff flag will help avoid unnecessary complaints from Lint.
    • +
    • extraneous characters following String -- One or more characters were seen immediately following a character which is expected to signify the end of an option, such as a closing right parenthesis. While the extraneous characters are ignored, their presence may indicate a typographical error.
    • +
    • missing field-specifier in a non-empty format string [No data will be generated for this category.] -- A -program_info() option was expecting a field-specifier which was actually missing. As noted, no data for this particular category will be generated.
    • +
    • the likelihood of causing meaningless output -- An option,such as -elib(*), -wlib(0), or +fce was seen; this typically hides a problem in the Lint configuration. When using a new Lint configuration, it's common for a user to encounter Error messages from Lint about library header code. (This usually does not indicate a problem with library headers.) For example, a misconfiguration of Lint's preprocessor is by far the most common source of these errors. If you merely suppress basic Syntax Errors (like Error 10) and/or Fatal Errors (like Error 309), the underlying Lint configuration problem still exists; as a result, Lint will fail to parse your code correctly (because your code depends on the aforementioned library code). The output from Lint would then seem illogical and/or meaningless. Therefore, blanket suppression options like this are highly discouraged. Instead, other aspects of the Lint configuration should be modified to make Lint's behavior more similar to that of the compiler at (or, typically, before) the point of the Error.
    • +
    • a lack of an argument -- A -message() was found to not include text between the parentheses, rendering the option meaningless. Did the User possibly intend to include the text immediately after this option?
    • +
    ]]> +
    + LINEAR + 1min +
    + + 687 + L0687: Suspicious use of comma operator + + 0 ) n = 1, n = 2; Thus the comma could be mistaken for a semi-colon and hence be the source of subtle bugs. + If the statement is enclosed in curly braces or if the expression is enclosed in parentheses, the message is not issued.]]> + + LINEAR + 1min + + + 688 + L0688: Cast used within a preprocessor conditional statement + + + + LINEAR + 1min + + + 689 + L0689: Apparent end of comment ignored + + + + LINEAR + 1min + + + 690 + L0690: Possible access of pointer pointing Integer bytes past nul character by operator 'String' + + + + LINEAR + 1min + + + 691 + L0691: Suspicious use of backslash + + + + LINEAR + 1min + + + 692 + L0692: Decimal character 'Char' follows octal escape sequence 'String' + + + + LINEAR + 1min + + + 693 + L0693: Hexadecimal digit 'Char' immediately after 'String' is suspicious in string literal. + + + + LINEAR + 1min + + + 694 + L0694: The type of constant 'String' (precision Integer) is dialect dependent + + + + LINEAR + 1min + + + 695 + L0695: Inline function 'Symbol' defined without a storage-class specifier ('static' recommended) + + + + LINEAR + 1min + + + 696 + L0696: Variable 'Symbol' has value 'String' that is out of range for operator 'String' + + + + LINEAR + 1min + + + 697 + L0697: Quasi-boolean values should be equality-compared only with 0 + + + + LINEAR + 1min + + + 698 + L0698: Casual use of realloc can create a memory leak + + + + LINEAR + 1min + + + 701 + L0701: Shift left of signed quantity (int) + + + + MINOR + LINEAR + 1min + + + 702 + L0702: Shift right of signed quantity (int) + + + + MINOR + LINEAR + 1min + + + 703 + L0703: Shift left of signed quantity (long) + + + + MINOR + LINEAR + 1min + + + 704 + L0704: Shift right of signed quantity (long) + + + + MINOR + LINEAR + 1min + + + 705 + L0705: Argument no. Integer nominally inconsistent with format + + + + MINOR + LINEAR + 1min + + + 706 + L0706: (arg. no. Integer) indirect object inconsistent with format + + + + MINOR + LINEAR + 1min + + + 707 + L0707: Mixing narrow and wide string literals in concatenation. + + + + MINOR + LINEAR + 1min + + + 708 + L0708: union initialization + + + + MINOR + LINEAR + 1min + + + 712 + L0712: Loss of precision (Context) (Type to Type) + + +An assignment (or implied assignment, see Context) is being made between two integral quantities in which the first Type is larger than the second Type. A cast will suppress this message. +

    References

    +

    INT31-C. Ensure that integer conversions do not result in lost or misinterpreted data

    + + ]]> +
    + cert + MINOR + LINEAR + 1min +
    + + 713 + L0713: Loss of precision (Context) (Type to Type) + + + + MINOR + LINEAR + 1min + + + 714 + L0714: Symbol 'Symbol' (Location) not referenced + + + + MINOR + LINEAR + 1min + + + 715 + L0715: Symbol 'Symbol' (Location) not referenced + + + + MINOR + LINEAR + 1min + + + 716 + L0716: while(1) ... + + + + MINOR + LINEAR + 1min + + + 717 + L0717: do ... while(0) + + 0) f(3); else f(2); + Thus, if you are doing this deliberately use -e717]]> + + MINOR + LINEAR + 1min + + + 718 + L0718: Symbol 'Symbol' undeclared, assumed to return int + + + + MINOR + LINEAR + 1min + + + 719 + L0719: Too many arguments for format (Integer too many) + + + + MINOR + LINEAR + 1min + + + 720 + L0720: Boolean test of assignment + + + + MINOR + LINEAR + 1min + + + 721 + L0721: Suspicious use of ; + + + + MINOR + LINEAR + 1min + + + 722 + L0722: Suspicious use of ; + + + + MINOR + LINEAR + 1min + + + 723 + L0723: Suspicious use of = + + + + MINOR + LINEAR + 1min + + + 725 + L0725: Expected positive indentation from Location + + + + MINOR + LINEAR + 1min + + + 726 + L0726: Extraneous comma ignored + + + + MINOR + LINEAR + 1min + + + 727 + L0727: Symbol 'Symbol' (Location) not explicitly initialized + + + + MINOR + LINEAR + 1min + + + 728 + L0728: Symbol 'Symbol' (Location) not explicitly initialized + + + + MINOR + LINEAR + 1min + + + 729 + L0729: Symbol 'Symbol' (Location) not explicitly initialized + + + + MINOR + LINEAR + 1min + + + 730 + L0730: Boolean argument to function + + + + MINOR + LINEAR + 1min + + + 731 + L0731: Boolean argument to equal/not equal + + b) == (c > d) ) ... + tests to see if the inequalities are of the same value. This could be an error as it is an unusual use of a Boolean (see Warnings 503 and 514) but it may also be deliberate since this is the only way to efficiently achieve equivalence or exclusive or. Because of this possible use, the construct is given a relatively mild 'informational' classification. If the Boolean argument is cast to some type, this message is not given.]]> + + MINOR + LINEAR + 1min + + + 732 + L0732: Loss of sign (Context) (Type to Type) + + +An assignment (or implied assignment, see Context) is made from a signed quantity to an unsigned quantity. Also, it could not be determined that the signed quantity had no sign. For example: + u = n; /* Info 732 */ + u = 4; /* OK */ +where u is unsigned and n is not, warrants a message only for the first assignment, even though the constant 4 is nominally a signed int. +Make sure that this is not an error (that the assigned value is never negative) and then use a cast (to unsigned) to remove the message. +

    References

    +

    INT31-C. Ensure that integer conversions do not result in lost or misinterpreted data

    + + ]]> +
    + cert + MINOR + LINEAR + 1min +
    + + 733 + L0733: Assigning address of auto variable 'Symbol' to outer scope symbol 'Symbol' + + + + MINOR + LINEAR + 1min + + + 734 + L0734: Loss of precision (Context) (Integer bits to Integer bits) + + +An assignment is being made into an object smaller than an int. The information being assigned is derived from another object or combination of objects in such a way that information could potentially be lost. The number of bits given does not count the sign bit. For example if ch is a char and n is an int then: + ch = n; +will trigger this message whereas: + ch = n & 1; +will not. To suppress the message a cast can be made as in: + ch = (char) n; +You may receive notices involving multiplication and shift operators with subinteger variables. For example: + ch = ch << 2 + ch = ch * ch +where, for example, ch is an unsigned char. These can be suppressed by using the flag +fpm (precision of an operator is bound by the maximum of its operands). +

    References

    +

    INT31-C. Ensure that integer conversions do not result in lost or misinterpreted data

    + + ]]> +
    + cert + MINOR + LINEAR + 1min +
    + + 735 + L0735: Loss of precision (Context) (Integer bits to Integer bits) + + + + MINOR + LINEAR + 1min + + + 736 + L0736: Loss of precision (Context) (Integer bits to Integer bits) + + + + MINOR + LINEAR + 1min + + + 737 + L0737: Loss of sign in promotion from Type to Type + + + + MINOR + LINEAR + 1min + + + 738 + L0738: Symbol 'Symbol' (Location) not explicitly initialized + + + + MINOR + LINEAR + 1min + + + 739 + L0739: Trigraph Sequence 'String' in literal (Quiet Change) + + + + MINOR + LINEAR + 1min + + + 740 + L0740: Unusual pointer cast (incompatible indirect types) + + + + MINOR + LINEAR + 1min + + + 741 + L0741: Unusual pointer cast (function qualification) + + + + MINOR + LINEAR + 1min + + + 742 + L0742: Multiple character constant + + + + MINOR + LINEAR + 1min + + + 743 + L0743: Negative character constant + + + + MINOR + LINEAR + 1min + + + 744 + L0744: switch statement has no default + + + + MINOR + LINEAR + 1min + + + 745 + L0745: function 'Name' has no explicit type or class, int assumed + + + + MINOR + LINEAR + 1min + + + 746 + L0746: call to function 'Name' not made in the presence of a prototype + + + + MINOR + LINEAR + 1min + + + 747 + L0747: Significant prototype coercion (Context) Type to Type + + + + MINOR + LINEAR + 1min + + + 748 + L0748: Symbol 'Symbol' (Location) is a register variable used with setjmp + + + + MINOR + LINEAR + 1min + + + 749 + L0749: local enumeration constant 'Symbol' (Location) not referenced + + + + MINOR + LINEAR + 1min + + + 750 + L0750: local macro 'Symbol' (Location) not referenced + + + + MINOR + LINEAR + 1min + + + 751 + L0751: local typedef 'Symbol' (Location) not referenced + + + + MINOR + LINEAR + 1min + + + 752 + L0752: local declarator 'Symbol' (Location) not referenced + + + + MINOR + LINEAR + 1min + + + 753 + L0753: local struct, union or enum tag 'Symbol' (Location) not referenced + + + + MINOR + LINEAR + 1min + + + 754 + L0754: local structure member 'Symbol' (Location) not referenced + + + + MINOR + LINEAR + 1min + + + 755 + L0755: global macro 'Symbol' (Location) not referenced + + + + MINOR + LINEAR + 1min + + + 756 + L0756: global typedef 'Symbol' (Location) not referenced + + + + MINOR + LINEAR + 1min + + + 757 + L0757: global declarator 'Symbol' (Location) not referenced + + + + MINOR + LINEAR + 1min + + + 758 + L0758: global struct, union or enum tag 'Symbol' (Location) not referenced + + + + MINOR + LINEAR + 1min + + + 759 + L0759: header declaration for symbol 'Symbol' (Location) could be moved from header to module + + + + MINOR + LINEAR + 1min + + + 760 + L0760: Redundant macro 'Symbol' defined identically at Location + + + + MINOR + LINEAR + 1min + + + 761 + L0761: Redundant typedef 'Symbol' previously declared at Location + + + + MINOR + LINEAR + 1min + + + 762 + L0762: Redundantly declared symbol 'Symbol' previously declared at Location + + + + MINOR + LINEAR + 1min + + + 763 + L0763: Redundant declaration for symbol 'Symbol' previously declared at Location + + + + MINOR + LINEAR + 1min + + + 764 + L0764: switch statement does not have a case + + + + MINOR + LINEAR + 1min + + + 765 + L0765: external 'Symbol' (Location) could be made static + + + + MINOR + LINEAR + 1min + + + 766 + L0766: Header file FileName not used in module String + + + + MINOR + LINEAR + 1min + + + 767 + L0767: macro 'Symbol' was defined differently in another module (Location) + + + + MINOR + LINEAR + 1min + + + 768 + L0768: vglobal struct member 'Symbol' (Location) not referenced + + + + MINOR + LINEAR + 1min + + + 769 + L0769: global enumeration constant 'Symbol' (Location) not referenced + + + + MINOR + LINEAR + 1min + + + 770 + L0770: tag 'Symbol' defined identically at Location + + + + MINOR + LINEAR + 1min + + + 771 + L0771: Symbol 'Symbol' (Location) conceivably not initialized + + + + MINOR + LINEAR + 1min + + + 772 + L0772: Symbol 'Symbol' (Location) conceivably not initialized + + + + MINOR + LINEAR + 1min + + + 773 + L0773: Expression-like macro 'Symbol' not parenthesized + + + + MINOR + LINEAR + 1min + + + 774 + L0774: Boolean within 'String' always evaluates to [True/False] + + + + MINOR + LINEAR + 1min + + + 775 + L0775: non-negative quantity cannot be less than zero + + + + MINOR + LINEAR + 1min + + + 776 + L0776: Possible truncation of addition + + + + MINOR + LINEAR + 1min + + + 777 + L0777: Testing float's for equality + + + + MINOR + LINEAR + 1min + + + 778 + L0778: Constant expression evaluates to 0 in operation: String + + + + MINOR + LINEAR + 1min + + + 779 + L0779: String constant in comparison operator: Operator + + + + MINOR + LINEAR + 1min + + + 780 + L0780: Vacuous array element + + + + MINOR + LINEAR + 1min + + + 782 + L0782: Line exceeds Integer characters + + + + MINOR + LINEAR + 1min + + + 783 + L0783: Line does not end with new-line + + + + MINOR + LINEAR + 1min + + + 784 + L0784: Nul character truncated from string + + + + MINOR + LINEAR + 1min + + + 785 + L0785: Too few initializers for aggregate 'Symbol' + + + + MINOR + LINEAR + 1min + + + 786 + L0786: String concatenation within initializer + + + + MINOR + LINEAR + 1min + + + 787 + L0787: enum constant 'Symbol' not used within switch + + + + MINOR + LINEAR + 1min + + + 788 + L0788: enum constant 'Symbol' not used within defaulted switch + + + + MINOR + LINEAR + 1min + + + 789 + L0789: Assigning address of auto variable 'Symbol' to static + + + + MINOR + LINEAR + 1min + + + 790 + L0790: Suspicious truncation, integral to float. + + + + MINOR + LINEAR + 1min + + + 791 + L0791: unusual option sequence + + + + MINOR + LINEAR + 1min + + + 792 + L0792: void cast of void expression + + + + MINOR + LINEAR + 1min + + + 793 + L0793: ANSI limit of String 'String' 'Name' exceeded -- processing is unaffected + + + + MINOR + LINEAR + 1min + + + 794 + L0794: Conceivable use of null pointer 'Symbol' in [left/right] argument to operator 'String' Reference + + + + MINOR + LINEAR + 1min + + + 795 + L0795: Conceivable division by 0 + + + + MINOR + LINEAR + 1min + + + 796 + L0796: Conceivable access of out-of-bounds pointer ('Integer' beyond end of data) by operator 'String' + + +An out-of-bounds pointer may conceivably have been accessed. See message 415 for a description of the parameters Integer and String. For example:

    +
    
    +  int a[10]; 
    +  int j = 100; 
    +  for( i = 0; i < n; i++ ) 
    +    j = n; 
    +  a[j] = 0;
    +
    +Here, the access to a[j] is flagged because it is conceivable that the for loop is not executed leaving the unacceptable index of 100 in variable j. This message is similar to messages 415 and 661 but differing from them by the degree of probability. +

    References

    +

    ARR30-C. Do not form or use out-of-bounds pointers or array subscripts

    + + ]]> +
    + cert + security + MINOR + BUG + LINEAR + 1min +
    + + 797 + L0797: Conceivable creation of out-of-bounds pointer ('Integer' beyond end of data) by operator 'String' + + +An out-of-bounds pointer is potentially being created. See message 415 for a description of the parameters Integer and String. See message 796 for an example of how a probability can be considered 'conceivable'. +

    References

    +

    ARR30-C. Do not form or use out-of-bounds pointers or array subscripts

    + + ]]> +
    + cert + security + MINOR + BUG + LINEAR + 1min +
    + + 798 + L0798: Redundant character 'Char' + + + + MINOR + LINEAR + 1min + + + 799 + L0799: numerical constant 'Integer' larger than unsigned long + + + + MINOR + LINEAR + 1min + + + 801 + L0801: Use of goto is deprecated + + + + brain-overload + misra + MINOR + LINEAR + 1min + + + 802 + L0802: Conceivably passing a null pointer to function 'Symbol', Context Reference + + + + MINOR + LINEAR + 1min + + + 803 + L0803: Conceivable data overrun for function 'Symbol', argument Integer exceeds argument Integer Reference + + +This message is for data transfer functions such as memcpy, strcpy, fgets, etc. when the size indicated by the first cited argument (or arguments) can conceivably exceed the size of the buffer area cited by the second. The message may also be issued for user functions via the -function option. +

    References

    +

    ARR30-C. Do not form or use out-of-bounds pointers or array subscripts

    +

    ARR38-C. Guarantee that library functions do not form invalid pointers

    + + ]]> +
    + cert + security + MINOR + BUG + LINEAR + 1min +
    + + 804 + L0804: Conceivable access beyond array for function 'Symbol', argument Integer exceeds Integer Reference + + +This message is issued for several library functions (such as fwrite, memcmp, etc) wherein there is conceivably an attempt to access more data than exist. For example, if the length of data specified in the fwrite call can exceed the size of the data specified. The function is specified by Symbol and the arguments are identified by argument number. +

    References

    +

    ARR30-C. Do not form or use out-of-bounds pointers or array subscripts

    +

    ARR38-C. Guarantee that library functions do not form invalid pointers

    + + ]]> +
    + cert + security + MINOR + BUG + LINEAR + 1min +
    + + 805 + L0805: Expected L"..." to initialize wide char string + + + + MINOR + LINEAR + 1min + + + 806 + L0806: Small bit field is signed rather than unsigned + + 0 ) /* should succeed but actually fails */ ...]]> + + MINOR + LINEAR + 1min + + + 807 + L0807: Conceivably passing to function 'Symbol' a negative value (Integer), Context Reference + + + + MINOR + LINEAR + 1min + + + 808 + L0808: No explicit type given symbol 'Sybmol', assumed int + + + + MINOR + LINEAR + 1min + + + 809 + L0809: Possible return of address of auto through variable 'Symbol' + + + + MINOR + LINEAR + 1min + + + 810 + L0810: Arithmetic modification of custodial pointer 'Symbol' + + + + MINOR + LINEAR + 1min + + + 811 + L0811: Possible deallocation of pointer alias + + + + MINOR + LINEAR + 1min + + + 812 + L0812: static variable 'Symbol' has size 'Integer' + + + + MINOR + LINEAR + 1min + + + 813 + L0813: auto variable 'Symbol' in function 'Symbol' has size 'Integer' + + + + MINOR + LINEAR + 1min + + + 814 + L0814: useless declaration + + + + MINOR + LINEAR + 1min + + + 815 + L0815: Arithmetic modification of unsaved pointer + + + + MINOR + LINEAR + 1min + + + 816 + L0816: Non-ANSI format specification + + + + MINOR + LINEAR + 1min + + + 817 + L0817: Conceivably negative subscript (Integer) in operator 'String' + + + + MINOR + LINEAR + 1min + + + 818 + L0818: Pointer parameter 'Symbol' (Location) could be declared ptr to const + + + + MINOR + LINEAR + 1min + + + 820 + L0820: Boolean test of a parenthesized assignment + + + + MINOR + LINEAR + 1min + + + 821 + L0821: Right hand side of assignment not parenthesized + + + + MINOR + LINEAR + 1min + + + 825 + L0825: control flows into case/default without -fallthrough comment + + + + MINOR + LINEAR + 1min + + + 826 + L0826: Suspicious pointer-to-pointer conversion (area too small) + + + + MINOR + LINEAR + 1min + + + 827 + L0827: Loop not reachable + + + + MINOR + LINEAR + 1min + + + 828 + L0828: Semantics of function 'Name' copied to function 'Name' + + + + MINOR + LINEAR + 1min + + + 829 + L0829: A +headerwarn option was previously issued for header 'Symbol + + + + MINOR + LINEAR + 1min + + + 830 + L0830: Location cited in prior message + + + + MINOR + LINEAR + 1min + + + 831 + L0831: Reference cited in prior message + + + + MINOR + LINEAR + 1min + + + 832 + L0832: Parameter 'Symbol' not explicitly declared, int assumed + + + + MINOR + LINEAR + 1min + + + 833 + L0833: Symbol 'Symbol' is typed differently (String) in another module, Location, + + + + MINOR + LINEAR + 1min + + + 834 + L0834: Operator 'Name' followed by operator 'Name' is confusing. Use parentheses. + + + + MINOR + LINEAR + 1min + + + 835 + L0835: A zero has been given as [left/right] argument to operator 'Name' + + > and the unary operators - and +. + An enumeration constant whose value is 0 is permitted with operators: + - >> << Otherwise a message is issued. For example: enum color { red, blue = red+100, /* ok */ green= red*0x10 /* 835 */ }; The assignment operators that have an arithmetic or bitwise component, such as |=, are also examined. The message given is equivalent to that given with the same operator without the assignment component.]]> + + MINOR + LINEAR + 1min + + + 836 + L0836: Conceivable access of pointer pointing Integer bytes past nul character by operator 'String' + + + + MINOR + LINEAR + 1min + + + 838 + L0838: Previously assigned value to variable 'Symbol' has not been used + + 0 ) y = 2; y = 4; // Info 838 ... Here we can report that the assignment of 4 to y obliterates previously assigned values that were not used. We, of course, cannot report anything unusual about the assignment of 2. This will assign over a prior value of 1 that so far had not been used but the existence of an alternative path means that the value of 1 can still be employed later in the code and is accepted for the time being as reasonable. It is only the final assignment that raises alarm bells. See also Warning 438 in Section 13.3.]]> + + MINOR + LINEAR + 1min + + + 839 + L0839: Storage class of symbol 'Symbol' assumed static (Location) + + + + MINOR + LINEAR + 1min + + + 840 + L0840: Use of nul character in a string literal + + + + MINOR + LINEAR + 1min + + + 843 + L0843: Variable 'Symbol' (Location) could be declared as const + + + + MINOR + LINEAR + 1min + + + 844 + L0844: Pointer variable 'Symbol' (Location) could be declared as pointing to const + + + + MINOR + LINEAR + 1min + + + 845 + L0845: The [left/right] argument to operator 'Name' is certain to be 0 + + > && The reason that the left hand side of operator + (and friends) is not examined for zero is that zero is the identity operation for those operators and hence is often used as an initializing value. For example: sum = 0; for( ... ) sum = sum + what_ever; // OK, no message The message is not issued for arithmetic constant zeros. Info 835 in Section 13.4 is issued in that instance. + The message is also suspended when the expression has side-effects. For example: i = 0; buf[i++] = 'A'; We don't consider it reasonable to force the programmer to write: buf[0] = 'A'; i = 1;]]> + + MINOR + LINEAR + 1min + + + 846 + L0846: Signedness of bit-field is implementation defined + + + + MINOR + LINEAR + 1min + + + 847 + L0847: Thread 'Symbol' has unprotected call to thread unsafe function 'Symbol' + + + + MINOR + LINEAR + 1min + + + 848 + L0848: Worst case function for stack usage: String + + + + MINOR + LINEAR + 1min + + + 849 + L0849: Symbol 'Symbol' has same enumerator value 'String' as enumerator 'Symbol' + + + + MINOR + LINEAR + 1min + + + 850 + L0850: for loop index variable 'Symbol' whose type category is 'String' modified in body of the for loop that began at 'String' + + + + MINOR + LINEAR + 1min + + + 864 + L0864: Expression involving variable 'Symbol' possibly depends on order of evaluation + + + + MINOR + LINEAR + 1min + + + 866 + L0866: Unusual use of 'String' in argument to sizeof + + +memcpy( p, &b1, sizeof(&b1) ); // 866; intended to take sizeof(b1) +size_t s3 = sizeof(A[0]); // OK, get the size of an element. size_t s4 = sizeof(A[2]); // 866; Not incorrect, but ... // unusual in a sizeof(). + + + ]]> + + MINOR + LINEAR + 1min + + + 867 + L0867: Unrecognized pragma 'Name' will be ignored + + + + MINOR + LINEAR + 1min + + + 900 + L0900: Successful completion, 'Integer' messages produced + + + + INFO + LINEAR + 1min + + + 904 + L0904: Return statement before end of function 'Symbol' + + + + INFO + LINEAR + 1min + + + 905 + L0905: Non-literal format specifier used (with arguments) + + + + INFO + LINEAR + 1min + + + 909 + L0909: Implicit conversion from Type to bool + + + + INFO + LINEAR + 1min + + + 910 + L0910: Implicit conversion (Context) from 0 to pointer + + + + INFO + LINEAR + 1min + + + 911 + L0911: Implicit expression promotion from Type to Type + + + + INFO + LINEAR + 1min + + + 912 + L0912: Implicit binary conversion from Type to Type + + + + INFO + LINEAR + 1min + + + 913 + L0913: Implicit adjustment of expected argument type from Type to Type + + + + INFO + LINEAR + 1min + + + 914 + L0914: Implicit adjustment of function return value from Type to Type + + + + INFO + LINEAR + 1min + + + 915 + L0915: Implicit conversion (Context) Type to Type + + + + INFO + LINEAR + 1min + + + 916 + L0916: Implicit pointer assignment conversion (Context) + + + + INFO + LINEAR + 1min + + + 917 + L0917: Prototype coercion (Context) Type to Type + + + + INFO + LINEAR + 1min + + + 918 + L0918: Prototype coercion (Context) of pointers + + + + INFO + LINEAR + 1min + + + 919 + L0919: Implicit conversion (Context) Type to Type + + + + INFO + LINEAR + 1min + + + 920 + L0920: Cast from Type to void + + + + INFO + LINEAR + 1min + + + 921 + L0921: Cast from Type to Type + + + + INFO + LINEAR + 1min + + + 922 + L0922: Cast from Type to Type + + + + INFO + LINEAR + 1min + + + 923 + L0923: Cast from Type to Type + + + + INFO + LINEAR + 1min + + + 924 + L0924: Cast from Type to Type + + + + INFO + LINEAR + 1min + + + 925 + L0925: Cast from pointer to pointer + + + + INFO + LINEAR + 1min + + + 926 + L0926: Cast from pointer to pointer + + + + INFO + LINEAR + 1min + + + 927 + L0927: Cast from pointer to pointer + + + + INFO + LINEAR + 1min + + + 928 + L0928: Cast from pointer to pointer + + + + INFO + LINEAR + 1min + + + 929 + L0929: Cast from pointer to pointer + + + + INFO + LINEAR + 1min + + + 930 + L0930: Cast from Type to Type + + + + INFO + LINEAR + 1min + + + 931 + L0931: Both sides have side effects + + + + INFO + LINEAR + 1min + + + 932 + L0932: Passing near pointer to library function '(Symbol)' (Context) + + + + INFO + LINEAR + 1min + + + 933 + L0933: Passing near pointer to far function (Context) + + + + INFO + LINEAR + 1min + + + 934 + L0934: Taking address of near auto variable 'Symbol' (Context) + + + + INFO + LINEAR + 1min + + + 935 + L0935: int within struct + + + + INFO + LINEAR + 1min + + + 936 + L0936: old-style function definition for function 'Symbol' + + + + INFO + LINEAR + 1min + + + 937 + L0937: old-style function declaration for function 'Symbol' + + + + INFO + LINEAR + 1min + + + 938 + L0938: parameter 'Symbol' not explicitly declared + + + + INFO + LINEAR + 1min + + + 939 + L0939: return type defaults to int for function 'Symbol' + + + + INFO + LINEAR + 1min + + + 940 + L0940: omitted braces within an initializer + + +int a[2][2] = { 1, 2, 3, 4 }; + +This is legal C but may violate local programming standards. The worst violations are covered by Warning 651. + + ]]> + + INFO + LINEAR + 1min + + + 941 + L0941: Result 0 due to operand(s) equaling 0 in operation 'String' + + + + INFO + LINEAR + 1min + + + 942 + L0942: Possibly truncated addition promoted to float + + + + INFO + LINEAR + 1min + + + 943 + L0943: Too few initializers for aggregate 'Symbol' + + + + INFO + LINEAR + 1min + + + 944 + L0944: [left/right/] argument for operator 'String' always evaluates to [True/False] + + + + INFO + LINEAR + 1min + + + 945 + L0945: Undefined struct used with extern + + + + INFO + LINEAR + 1min + + + 946 + L0946: Relational or subtract operator applied to pointers + + + + INFO + LINEAR + 1min + + + 947 + L0947: Subtract operator applied to pointers + + + + INFO + LINEAR + 1min + + + 948 + L0948: Operator 'String' always evaluates to [True/False] + + + + INFO + LINEAR + 1min + + + 950 + L0950: Non-ANSI reserved word or construct: 'Symbol' + + + + INFO + LINEAR + 1min + + + 951 + L0951: Pointer to incomplete type 'Symbol' employed in operation + + + + INFO + LINEAR + 1min + + + 952 + L0952: Parameter 'Symbol' (Location) could be declared const + + +int f( char *p, int n ) { return *p = n; } + +can be redeclared as: +
    +int f( char * const p, const int n ) { return *p = n; }
    +
    +There are few advantages to declaring an unchanging parameter a const. It signals to the person reading the code that a parameter is unchanging, but, in the estimate of most, reduces legibility. For this reason the message has been given an Elective Note status. +However, there is a style of programming that encourages declaring parameters const. For the above example, this style would declare f as +
    +int f( char * p, int n);
    +
    +and would use the const qualifier only in the definition. Note that the two forms are compatible according to the standard. The declaration is considered the interface specification where the const's do not matter. The const's do matter in the definition of the function which is considered the implementation. Message 952 could be used to support this style. +Marking a parameter as const does not affect the type of argument that can be passed to the parameter. In particular, it does not mean that only const arguments may be passed. This is in contrast to declaring a parameter as pointer to const or reference to const. For these situations, Informational messages are issued (818 and 1764 respectively) and these do affect the kinds of arguments that may be passed. See also messages 953 and 954. + + ]]> +
    + INFO + LINEAR + 1min +
    + + 953 + L0953: Variable 'Symbol' (Location) could be declared as const + + + + INFO + LINEAR + 1min + + + 954 + L0954: Pointer variable 'Symbol' (Location) could be declared as pointing to a const + + + + INFO + LINEAR + 1min + + + 955 + L0955: Parameter name missing from prototype for function 'Symbol' + + + + INFO + LINEAR + 1min + + + 956 + L0956: Non const, non volatile static or external variable 'Symbol' + + + + INFO + LINEAR + 1min + + + 957 + L0957: Function 'Symbol' defined without a prototype in scope + + + + INFO + LINEAR + 1min + + + 958 + L0958: Padding of Integer byte(s) is required to align member on Integer byte boundary + + + + INFO + LINEAR + 1min + + + 959 + L0959: Nominal struct size (Integer bytes) is not an even multiple of the maximum member alignment (Integer bytes) + + + + INFO + LINEAR + 1min + + + 960 + L0960: Violates MISRA Year Required Rule Name, String + + MISRA is the "Guidelines for the use of the C Language in Vehicle Based Software". [10] The first version of the MISRA Standard was released in 1998 and the second in 2004. Lint references the rules from each version of the Standard using integers for 1998 and in decimal form for 2004, as per the Standard numbering style.

    +

    The list of required checks made for both MISRA 1998 and 2004 are:

    +
    
    +       (Rule 16/12.12) Bit representation of a floating point type used.
    +       (Rule 19/7.1) Octal constant used.
    +       (Rule 22/8.7) Could define variable at block scope.
    +       (Rule 27/8.8) Object/function previously declared.
    +       (Rule 32/9.3) Should initialize either all enum members or only the first.
    +       (Rule 33/12.4) Side effects on right hand side of logical operator.
    +       (Rule 34/12.5) Non-primary expression used with logical operator.
    +       (Rule 36/12.6) Boolean expression required for operator.
    +       (Rule 40/12.3) 'sizeof' used on expressions with side effect
    +       (Rule 42/12.10) Comma operator used outside of 'for' expression.
    +       (Rule 47/12.1) Dependence placed on C operator precedence.
    +       (Rule 54/14.3) Null statement not in line by itself.
    +       (Rule 57/14.5) continue statement should not be used.
    +       (Rules 59/14.8 & 14.9) Left brace expected for if, else, for, do, and while.
    +       (Rule 60/14.10) No 'else' at end of 'if ... else if' chain.
    +       (Rule 63/15.4) Boolean value in switch expression.
    +       (Rule 65/13.4) Floating point variable used as loop counter.
    +       (Rule 68/8.6) Function not declared at file scope.
    +       (Rule 69/16.1) Function has variable number of arguments.
    +       (Rule 73/16.3) Either all parameters or no parameters should have identifiers.
    +       (Rule 74/16.4) Parameter list differs from prior declaration for function.
    +       (Rule 87/19.1) Declaration before #include.
    +       (Rule 88/19.2) Header file name with non-standard character.
    +       (Rule 91/19.5) '#define/#undef' used within a block.
    +       (Rule 92/19.6) Use of '#undef' prohibited.
    +       (Rule 98/19.12) Multiple use of '#' and/or '##' operators in macro definition.
    +       (Rule 100/19.14) Non-standard use of 'defined' preprocessor operator.
    +       (Rule 115/20.2) Re-use of C90 identifier/identifier pattern.
    +
    +       Required checks made exclusively for MISRA 1998 are:
    +
    +       (Rule 8) Multibyte characters and wide string literals prohibited.
    +       (Rule 42) Comma operator used outside of 'for' expression.
    +       (Rule 54) Null statement not in line by itself.
    +       (Rule 58) break used outside of a switch.
    +       (Rule 73) Either all parameters or no parameters should have identifiers.
    +       (Rule 87) Declaration before #include.
    +       (Rule 88) Header file name contains non-standard character.
    +       (Rule 110) Bitfields inside union.
    +
    +       Required checks made exclusively for MISRA 2004 are:
    +
    +       (Rule 4.1) Prohibited escape sequence used.
    +       (Rule 6.1) Disallowed use of non-character value.
    +       (Rule 6.2) Disallowed use of non-numeric value.
    +       (Rule 8.5) No definitions of objects or function in header files.
    +       (Rules 10.1 & 10.2) Prohibited implicit conversion.
    +       (Rules 10.3 & 10.4) Prohibited cast of complex expressions.
    +       (Rule 10.5) Recasting required for operators '~' and '<<'.
    +       (Rule 10.6) Unsigned integer literals require a 'U' suffix.
    +       (Rule 11.5) Attempt to cast away const/volatile from a pointer or reference.
    +
    +       (Rule 12.7) Bitwise operator applied to signed underlying type.
    +       (Rule 12.9) Prohibited operator applied to unsigned underlying type.
    +       (Rule 12.10) Comma operator used.
    +       (Rule 12.13) Increment or decrement combined with another operator.
    +       (Rule 14.3) Null statement not in line by itself.
    +       (Rule 14.6) More than one 'break' terminates loop.
    +       (Rule 14.8) Left brace expected.
    +       (Rule 16.3) All parameters shall have identifiers.
    +       (Rule 16.9) Function identifier used without '&' or parenthesized parameter list.
    +       (Rule 17.4) Pointer arithmetic other than array indexing used.
    +
    +
    +       (Rule 18.4) Unions shall not be used.
    +       (Rule 19.13) '#/##' operator used in macro.
    +
    + +

    MISRA 1998 checking is achieved using the -misra(1) option. For +MISRA 2004 checks, use -misra(2)

    + +

    You may disable individual rules to your taste by using the Rule number in an esym option.

    For example:

    +
    
    +    -esym( 960, 75, 8? )
    +
    +

    will suppress MISRA rules 75 and any of the those between 80 and 89 inclusive that are issued as the result of a 960. See [10] for information on the MISRA guidelines.

    +]]> +
    + INFO + LINEAR + 1min +
    + + 961 + L0961: Violates MISRA Year Advisory Rule Name, String" + + This message is issued for some violations of the MISRA advisory guidelines. Certain rules were advisories in the 1998 Standard and became required for the 2004 Standard and vice versa. Therefore, you might see some rules repeated here already listed above for message 960.

    +

    The list of advisory checks made for both MISRA 1998 and 2004 are: + (Rule 47/12.1) Dependence placed on C's operator precedence (Rule 87/19.1) Only preprocessor statements and comments before '#include'. (Rule 93/19.7) Use of function-like macros is discouraged. (Rule 102/17.5) More than two pointer indirection levels used. + Advisory checks made exclusively for MISRA 1998 are: + (Rule 18) Constant requires numerical suffix (Rule 28) 'register' class discouraged (Rule 40) 'sizeof' used on expressions with side effect (Rule 44) Redundant explicit casting (Rule 55) Non-case label (Rule 60) No 'else' at end of 'if ... else if' chain. (Rule 63) Boolean value in switch expression (Rule 92) Use of '#undef' is discouraged + Advisory checks made exclusively for MISRA 2004 are: + (Rule 19.2) Header file name contains non-standard character. (Rule 19.13) No use of '#' or '##'. + Messages can be suppressed based on rule number. See also Message 960.

    ]]> +
    + INFO + LINEAR + 1min +
    + + 962 + L0962: Macro 'Symbol' defined identically at another location (Location) + + + + INFO + LINEAR + 1min + + + 963 + L0963: Qualifier const or volatile follows/precedes a type; use -fqb/+fqb to reverse the test + + + + INFO + LINEAR + 1min + + + 964 + L0964: Header file FileName not directly used in module String + + + + INFO + LINEAR + 1min + + + 966 + L0966: Indirectly included header file 'FileName' not used by module 'String' + + + + INFO + LINEAR + 1min + + + 967 + L0967: Header file 'FileName' does not have a standard include guard + + + + INFO + LINEAR + 1min + + + 970 + L0970: Use of modifier or type 'Name' outside of a typedef + + + + INFO + LINEAR + 1min + + + 971 + L0971: Use of 'char' without 'signed' or 'unsigned' + + + + INFO + LINEAR + 1min + + + 973 + L0973: Unary operator in macro 'Symbol' not parenthesized + + + + INFO + LINEAR + 1min + + + 974 + L0974: Worst case function for stack usage: String + + + + INFO + LINEAR + 1min + + + 975 + L0975: Unrecognized pragma 'Name' will be ignored + + + + INFO + LINEAR + 1min + + + 1001 + L1001: Scope 'Name' must be a struct or class name + + + + CRITICAL + LINEAR + 1min + + + 1002 + L1002: 'this' must be used in class member function + + + + CRITICAL + LINEAR + 1min + + + 1003 + L1003: 'this' may not be used in a static member function + + + + CRITICAL + LINEAR + 1min + + + 1004 + L1004: Expected a pointer to member after .* or ->* + + * operators require pointer to members on the right hand side. [11, ?5.5]]]> + + CRITICAL + LINEAR + 1min + + + 1005 + L1005: Destructor declaration requires class + + + + CRITICAL + LINEAR + 1min + + + 1006 + L1006: Language feature 'String' not supported + + + + CRITICAL + LINEAR + 1min + + + 1007 + L1007: Pure specifier for function 'Symbol' requires a virtual function + + + + CRITICAL + LINEAR + 1min + + + 1008 + L1008: Expected '0' to follow '=', text ignored + + + + CRITICAL + LINEAR + 1min + + + 1009 + L1009: operator String not redefinable + + The three operators:

    +
    
    +        .*   ?   .
    +
    +

    are not redefinable and may not be overloaded [11, 13.4].

    ]]> +
    + CRITICAL + LINEAR + 1min +
    + + 1010 + L1010: Expected a type or an operator + + + + CRITICAL + LINEAR + 1min + + + 1011 + L1011: Conversion Type Name too long + + + + CRITICAL + LINEAR + 1min + + + 1012 + L1012: Type not needed before 'operator type' + + + + CRITICAL + LINEAR + 1min + + + 1013 + L1013: Symbol 'Name' not a member of class 'Name' + + ' operator is not a member of the class (struct or union) expressed or implied by the left hand operand. [11, ?3.2]]]> + + CRITICAL + LINEAR + 1min + + + 1014 + L1014: Explicit storage class not needed for member function 'Symbol' + + + + CRITICAL + LINEAR + 1min + + + 1015 + L1015: Symbol 'Name' not found in class + + + + CRITICAL + LINEAR + 1min + + + 1016 + L1016: Symbol 'Symbol' is supposed to denote a class + + + + CRITICAL + LINEAR + 1min + + + 1017 + L1017: conflicting access-specifier 'String' + + + + CRITICAL + LINEAR + 1min + + + 1018 + L1018: Expected a type after 'new' + + + + CRITICAL + LINEAR + 1min + + + 1019 + L1019: Could not find match for function 'Symbol(String)' + + + + CRITICAL + LINEAR + 1min + + + 1020 + L1020: template specialization for 'Symbol' declared without a 'template<>' prefix + + A class template specialization is generally preceded by a 'template<>' clause as in:

    +
    
    +               template< class T > class A { };       // a template
    +               template<> class A<int> { };           // a specialization
    +
    +

    If the 'template<>' is omitted, you will get this message but it will still be interpreted as a specialization. Before the standardization of template syntax was completed, a template specialization did not require this clause and its absence is still permitted by some compilers. +

    ]]> +
    + CRITICAL + LINEAR + 1min +
    + + 1021 + L1021: No viable 'String' function defined for type 'Type' used as range expression + + + + CRITICAL + LINEAR + 1min + + + 1022 + L1022: Function: 'String' must be a class member + + There are four operators which may not be defined except as class members. These are:

    +
    
    +               =  ()  []  ->
    +
    +

    The parameter String indicates which it is. [11, #3.4.3 and #3.4.6] +

    ]]> +
    + CRITICAL + LINEAR + 1min +
    + + 1023 + L1023: Call String(String) is ambiguous; candidates: String + + + + CRITICAL + LINEAR + 1min + + + 1024 + L1024: No function has same argument count as 'Name' + + + + CRITICAL + LINEAR + 1min + + + 1025 + L1025: No function matches invocation 'Name' on arg no. Integer + + + + CRITICAL + LINEAR + 1min + + + 1026 + L1026: Undominated function 'String' does not dominate 'String' on call to 'String' + + + + CRITICAL + LINEAR + 1min + + + 1027 + L1027: Non-consecutive default arguments in function 'String', assumed 0 + + Default arguments need to be consecutive. For example

    +
    
    +             void f(int i=0, int j, int k=0);
    +
    +

    is illegal. [11, #2.6] +

    ]]> +
    + CRITICAL + LINEAR + 1min +
    + + 1028 + L1028: Last argument not default in first instance of function 'String', assumed 0 + + + + CRITICAL + LINEAR + 1min + + + 1029 + L1029: Default argument repeated in function 'String' + + + + CRITICAL + LINEAR + 1min + + + 1030 + L1030: Not all arguments after arg no. Integer are default in function 'String' + + + + CRITICAL + LINEAR + 1min + + + 1031 + L1031: Local variable 'Symbol' used in default argument expression + + + + CRITICAL + LINEAR + 1min + + + 1032 + L1032: Member 'String' cannot be called without object + + + + CRITICAL + LINEAR + 1min + + + 1033 + L1033: Static member functions cannot be virtual + + + + CRITICAL + LINEAR + 1min + + + 1034 + L1034: Static member 'Symbol' is global and cannot be redefined + + + + CRITICAL + LINEAR + 1min + + + 1035 + L1035: Non-static member 'Symbol' cannot initialize a default argument + + + + CRITICAL + LINEAR + 1min + + + 1036 + L1036: ambiguous reference to constructor; candidates: 'String' + + + + CRITICAL + LINEAR + 1min + + + 1037 + L1037: ambiguous reference to conversion function; candidates: 'String' + + + + CRITICAL + LINEAR + 1min + + + 1038 + L1038: type 'Name' not found, nested type 'Name::String' assumed + + + + CRITICAL + LINEAR + 1min + + + 1039 + L1039: Symbol 'Symbol' is not a member of class 'String' + + + + CRITICAL + LINEAR + 1min + + + 1040 + L1040: Symbol 'Symbol' is not a legal declaration within class 'String' + + + + CRITICAL + LINEAR + 1min + + + 1041 + L1041: Can't declare 'String', assumed 'operator String' + + + + CRITICAL + LINEAR + 1min + + + 1042 + L1042: At least one class-like operand is required with Name + + + + CRITICAL + LINEAR + 1min + + + 1043 + L1043: Attempting to 'delete' a non-pointer + + + + CRITICAL + LINEAR + 1min + + + 1046 + L1046: member 'Symbol', referenced in a static function, requires an object + + + + CRITICAL + LINEAR + 1min + + + 1047 + L1047: a template declaration must be made at file scope + + + + CRITICAL + LINEAR + 1min + + + 1048 + L1048: expected a constant expression + + + + CRITICAL + LINEAR + 1min + + + 1049 + L1049: Too many template arguments + + + + CRITICAL + LINEAR + 1min + + + 1050 + L1050: expected a template argument list '<...>' for template 'Symbol' + + + + CRITICAL + LINEAR + 1min + + + 1051 + L1051: Symbol 'Name' is both a function and a variable + + + + CRITICAL + LINEAR + 1min + + + 1052 + L1052: a type was expected, 'class' assumed + + + + CRITICAL + LINEAR + 1min + + + 1053 + L1053: 'String' cannot be distinguished from 'String' + + + + CRITICAL + LINEAR + 1min + + + 1054 + L1054: template variable declaration expects a type, int assumed + + + + CRITICAL + LINEAR + 1min + + + 1055 + L1055: Symbol 'Symbol' undeclared, assumed to return int + + + + CRITICAL + LINEAR + 1min + + + 1056 + L1056: assignment from void * is not allowed in C++ + + + + CRITICAL + LINEAR + 1min + + + 1057 + L1057: member 'Symbol' cannot be used without an object + + + + CRITICAL + LINEAR + 1min + + + 1058 + L1058: Initializing a non-const reference 'Symbol' with a non-lvalue + + + + CRITICAL + LINEAR + 1min + + + 1059 + L1059: Can't convert from 'Type' to 'Type' + + + + CRITICAL + LINEAR + 1min + + + 1060 + L1060: String member 'Symbol' is not accessible to non-member non-friend functions + + + + CRITICAL + LINEAR + 1min + + + 1061 + L1061: String member 'Symbol' is not accessible through non-public inheritance + + + + CRITICAL + LINEAR + 1min + + + 1062 + L1062: template must be either a class or a function + + the parser expects to find either the token class or a function declaration or definition. [10, ?14.5]]]> + + CRITICAL + LINEAR + 1min + + + 1063 + L1063: Argument to copy constructor for class 'Symbol' should be a reference + + A constructor for a class closely resembles a copy constructor. A copy constructor for class X is typically declared as:

    +
    
    +             X( const X &)
    +
    +

    If you leave off the '&' then a copy constructor would be needed just to copy the argument into the copy constructor. This is a runaway recursion. [11,#2.1] +

    ]]> +
    + CRITICAL + LINEAR + 1min +
    + + 1064 + L1064: Template parameter list for template 'Symbol' inconsistent with Location + + + + CRITICAL + LINEAR + 1min + + + 1065 + L1065: Symbol 'Symbol' not declared as "C" conflicts with Location + + + + CRITICAL + LINEAR + 1min + + + 1066 + L1066: Symbol 'Symbol' declared as "C" conflicts with Location + + + + CRITICAL + LINEAR + 1min + + + 1067 + L1067: invalid prototype for function 'Symbol' + + + + CRITICAL + LINEAR + 1min + + + 1068 + L1068: Symbol 'Symbol' can not be overloaded + + + + CRITICAL + LINEAR + 1min + + + 1069 + L1069: Symbol 'Name' is not a base class of class 'Name' + + + + CRITICAL + LINEAR + 1min + + + 1070 + L1070: No scope in which to find symbol 'Name' + + + + CRITICAL + LINEAR + 1min + + + 1071 + L1071: Constructors and destructors can not have return type + + + + CRITICAL + LINEAR + 1min + + + 1072 + L1072: Reference variable 'Symbol' must be initialized + + + + CRITICAL + LINEAR + 1min + + + 1073 + L1073: Insufficient number of template parameters for 'Symbol'; 'String' assumed + + + + CRITICAL + LINEAR + 1min + + + 1074 + L1074: Expected a namespace identifier + + In a declaration of the form:

    +
    
    +             namespace name = scoped-identifier
    +
    +

    the scoped-identifier must identify a namespace. +

    ]]> +
    + CRITICAL + LINEAR + 1min +
    + + 1075 + L1075: Ambiguous reference to symbol 'Symbol' and symbol 'Symbol' + + + + CRITICAL + LINEAR + 1min + + + 1076 + L1076: Anonymous union assumed to be 'static' + + + + CRITICAL + LINEAR + 1min + + + 1077 + L1077: Could not evaluate default template parameter 'String' + + The evaluation of template parameters is deferred until needed. Thus:

    +
    
    +             template< class T = abc > class A { /* ... */ };
    +
    +

    will be greeted with an Error 1077 only if an instantiation of A<> requires evaluation of the default argument and if that evaluation cannot be made. In that event int is assumed for type parameters and 0 is assumed for object parameters. +

    ]]> +
    + CRITICAL + LINEAR + 1min +
    + + 1078 + L1078: class 'Symbol' should not have itself as a base class + + The following situation will trigger this message.

    +
    
    +             class A : public A { };
    +
    +

    You can't define A in terms of itself as there is no escape from the recursive plummet. +

    ]]> +
    + CRITICAL + LINEAR + 1min +
    + + 1079 + L1079: Could not find '>' or ',' to terminate template parameter at Location + + The default value for a template parameter appears to be malformed. For example, suppose the user mistakenly substituted a ']' for a '>' producing the following:

    +
    
    +             template <class T = A< int ] >
    +                 class X
    +                     {
    +                     };
    +
    +

    This will cause PC-lint/FlexeLint to process to the end of the file looking (in vain) for the terminating pointy bracket. Not finding it will cause this message to be printed. Fortunately, the message will bear the Location of the malformed template. +

    ]]> +
    + CRITICAL + LINEAR + 1min +
    + + 1080 + L1080: Definition for class 'Name' is not in scope + + This message would be issued whenever a class definition were required and it were not available. For example:

    +
    
    +             class X;        // declare class X
    +             X *p;           // OK, no definition required
    +             X a;            // Error 1080
    +
    ]]> +
    + CRITICAL + LINEAR + 1min +
    + + 1081 + L1081: Object parameter does not contain the address of a variable + + A template argument that is passed to a pointer parameter is supposed to identify a symbol. The expression passed does not do so. For example

    +
    
    +               template< int *P > class A { ... };
    +               int a[10];
    +               A< a+2 > x;     // a+2 does not represent a symbol
    +
    ]]> +
    + CRITICAL + LINEAR + 1min +
    + + 1082 + L1082: Object parameter for a reference type should be an external symbol + + A template argument that is passed to a reference parameter is supposed to identify an external symbol. The expression passed does not do so. For example

    +
    
    +               template< int &I > class A { ... };
    +               int a[10];
    +               A< a[2] > x;     // a[2] does not represent a symbol
    +
    +

    See also message 1081. +

    ]]> +
    + CRITICAL + LINEAR + 1min +
    + + 1083 + L1083: Ambiguous conversion between 2nd and 3rd operands of conditional operator + + + + CRITICAL + LINEAR + 1min + + + 1084 + L1084: Ambiguous use of template-id for instantiation of 'Type' + + When the language calls for a class template to be instantiated and the primary template is "overloaded" via one or more partial specializations, there is an attempt to see if the template arguments match any of those partial specializations.

    +

    (Note, explicit specializations would have been considered before determining that the class definition needs to be generated by way of instantiation.) If multiple partial specializations match then:

    +
    • If one of the matching partial specializations is more specialized than all others then it is used for the instantiation.
    • +
    • Otherwise, the program is ill-formed, so Lint issues message 1084.
    +

    In the message, the matching partial specializations are provided as the list of candidates. Example:

    +
    
    +               template<class T1, class T2, int I> class A {};             //#1
    +               template<class T1, class T2, int I> class A<T1*, T2, I> {}; //#2
    +               template<class T1, class T2, int I> class A<T1, T2*, I> {}; //#3
    +               A<int*, int*, 2> a; // ambiguous: matches #2 and #3
    +                                   // (and neither template is more specialized than the other)
    +
    ]]> +
    + CRITICAL + LINEAR + 1min +
    + + 1085 + L1085: Invalid definition of 'String' + + An attempt was made to define a member of a template before the template was defined. Example:

    +
    
    +               template<class T, class U> struct A
    +                       {
    +                       void
    +                       };
    +               template<class U, class T> void A<T,U>::f(){} // Error 1085
    +
    +

    In this case, the template argument list is out of order; T and U have been interchanged. +

    ]]> +
    + CRITICAL + LINEAR + 1min +
    + + 1086 + L1086: Compound literals may only be used in C99 programs + + + + CRITICAL + LINEAR + 1min + + + 1087 + L1087: Previous declaration of 'Name' (Location) is incompatible with 'Name' (Location) which was introduced by the current using-declaration + + A using declaration such as:

    +
    
    +             using NS::name;
    +
    +

    seems to be in error. It introduces a name that clashes with the name introduced earlier by another using-declaration. E.g.:

    + +
    
    +               namespace N { int i;}
    +               namespace Q { void i();}
    +               using N::i;
    +               using Q::i; // Error 1087 issued here.
    +
    ]]> +
    + CRITICAL + LINEAR + 1min +
    + + 1088 + L1088: A using-declaration must name a qualified-id + + This error is issued when a using-declaration references a name without the :: scope resolution operator; e.g.:

    +
    
    +               class A { protected: int n; };
    +               class B : public A {
    +               public:
    +                   using n; // Error 1088: should be 'using A::n;'
    +               };
    +
    +

    See Section <ref,14. Added Bibliography,14.>, [34], 7.3.3 namespace.udecl. +

    ]]> +
    + CRITICAL + LINEAR + 1min +
    + + 1089 + L1089: A using-declaration must not name a namespace + + This error is issued when the rightmost part of the qualified-id in a using-declaration is the name of a namespace. E.g.:

    +
    
    +               namespace N { namespace Q{ void g(); } }
    +               void f() {
    +                   using ::N::Q; // Error 1089
    +                   Q::g();
    +               }
    +
    +

    Instead, use a namespace-alias-definition:

    +
    
    +               namespace N { namespace Q{ void g(); } }
    +               void f() {
    +                   namespace Q = ::N::Q; // OK
    +                   Q::g(); // OK, calls ::N::Q::g().
    +               }
    +
    +

    See Section <ref,14. Added Bibliography,14.>, [35], Issue 460. +

    ]]> +
    + CRITICAL + LINEAR + 1min +
    + + 1090 + L1090: A using-declaration must not name a template-id + + This error is issued when the rightmost part of the qualified-id in a using-declaration is a template-id. E.g.:

    +
    
    +               template<class T> class A {
    +               protected:
    +                   template<class U> class B{};
    +               };
    +
    +               struct D : public A<int> {
    +               public:
    +                   using A<int>::B<char*>; // Error 1090
    +                   };
    +
    +               D::B<char*> bc;
    +
    +

    Instead, refer to the template name without template arguments:

    +
    
    +               template<class T> class A {
    +               protected:
    +                   template<class U> class B{};
    +               };
    +
    +               struct D : public A<int> {
    +               public:
    +                   using A<int>::B; // OK
    +                   };
    +
    +               D::B<char*> bc; // OK
    +
    +

    See Section <ref,14. Added Bibliography,14.>, [34], 7.3.3 namespace.udecl. +

    ]]> +
    + CRITICAL + LINEAR + 1min +
    + + 1091 + L1091: 'Name' is not a base class of 'Name' + + This error is issued when the nested-name-specifier of the qualified-id in a using-declaration does not name a base class of the class containing the using-declaration; e.g.:

    +
    
    +               struct N {
    +                   void f();
    +               }
    +
    +               class A { protected: void f(); };
    +               class B : A {
    +               public:
    +                   using N::f; // Error 1091
    +               };
    +
    +

    See Section <ref,14. Added Bibliography,14.>, [35], Issue 400. +

    ]]> +
    + CRITICAL + LINEAR + 1min +
    + + 1092 + L1092: A using-declaration that names a class member must be a member-declaration + + This error is issued when the nested-name-specifier of the qualified-id in a using-declaration names a class but the using-declaration does not appear where class members are declared. E.g.:

    +
    
    +               struct A { void f(); };
    +
    +               struct B : A{
    +                   void g() {
    +                       using A::f; // Error 1092
    +                   }
    +               };
    +
    +

    See Section <ref,14. Added Bibliography,14.>, [34], 7.3.3 namespace.udecl. +

    ]]> +
    + CRITICAL + LINEAR + 1min +
    + + 1093 + L1093: A pure specifier was given for function 'Symbol' which was not declared virtual + + + + CRITICAL + LINEAR + 1min + + + 1094 + L1094: Could not find ')' or ',' to terminate default function argument at Location + + + + CRITICAL + LINEAR + 1min + + + 1095 + L1095: Effective type 'Type' of non-type template parameter #Integer (corresponding to argument expression 'String') depends on an unspecialized parameter of this partial specialization + + The ISO C++ Standard says that "the type of a template parameter corresponding to a specialized non-type argument shall not be dependent on a parameter of the specialization." See Section <ref,14. Added Bibliography,14.>, [34], 14.5.4 temp.class.spec. Example:

    +
    
    +           // primary template:
    +           template<class T, T N, class U> struct B;
    +
    +           // PS #1:
    +           template<class U> struct B<int,257,U>; // Ok
    +
    +           // PS #2:
    +           template<class U> struct B<bool,257,U>; // Ok, same as:
    +           template<class U> struct B<bool,true,U>; // Ok (redeclaration of #2)
    +
    +           // PS #3:
    +           template<class U> struct B<T,257,U>; // Error 1095 here
    +
    +

    In PS #3, the value 257 is the 'specialized non-type argument' and its corresponding parameter is 'N' whose type is T which was not made concrete. But in PS #1 and PS #2, T was given the concrete types 'int' and 'bool', respectively. +

    ]]> +
    + CRITICAL + LINEAR + 1min +
    + + 1096 + L1096: A target ctor must be the only mem-initializer in the mem-initializer-list of a delegating ctor + + C++0x requires that if a constructor delegates to another constructor, then the mem-initializer (the region between the colon and the function body) must contain only one item, and that item must be a call to another constructor (which is called the "target constructor"). Example:

    +
    
    +           struct A
    +               {
    +               int n;
    +               A(int);
    +               A( const A& p) : A(p.n) {} // Ok
    +               A() :
    +                   n(42),  A(32)  // Error 1096
    +                   {}
    +               };
    +
    ]]> +
    + CRITICAL + LINEAR + 1min +
    + + 1097 + L1097: Delegating ctor delegates directly to itself, causing infinite recursion + + Example:

    +
    
    +           struct A
    +               {
    +               int n;
    +               A(int x) : A(x){} // Error 1097
    +               };
    +
    ]]> +
    + CRITICAL + LINEAR + 1min +
    + + 1098 + L1098: Function template specialization 'Symbol' does not match any function template + + This message is issued for a declaration where the user apparently intended to name a specialization of a function template (e.g., in an explicit specialization, an explicit instantiation or a friend declaration of specialization), but no previously-declared function template is matched. Example:

    +
    
    +               template<class T> void f( const T& ); // #1
    +
    +               struct A{};
    +               template<> void f( const A& ); // Ok
    +               // (A is the deduced argument to T.)
    +
    +               struct B{};
    +               template<> void f( const B ); // Error 1097.
    +               // (A template argument cannot be deduced for T.)
    +
    ]]> +
    + CRITICAL + LINEAR + 1min +
    + + 1099 + L1099: Ambiguous function template specialization 'Symbol' + + This message is issued for a declaration where the user apparently intended to name a specialization of a function template (e.g., in an explicit specialization, an explicit instantiation or a friend declaration of specialization), but the specialization matches multiple function templates, and none of the matched templates is more specialized than all of the other matching templates. The candidates (i.e., the matching templates) are provided in the message. Example:

    +
    
    +               template<class T> struct A {};
    +
    +               template<class T, class U> void f( T*, U    ); // #1
    +               template<class T, class U> void f( T,  A<U> ); // #2
    +
    +               struct B{};
    +               template<> void f( B, A<B> ); // Ok
    +               // #1 does not match but #2 does.
    +
    +               template<> void f( char*, A<int> ); // Error 1099
    +               // Both #1 and #2 match and neither is more specialized than the
    +               // other.
    +
    +

    This situation can be avoided in at least a couple of ways. One way is to explicitly specify one or more template arguments. Example:

    +
    
    +               // continuing from above...
    +               template<> void f<char*>( char*, A<int> ); // Ok
    +               // #1 does not match but #2 does.
    +
    +

    Another way is to use SFINAE tactics in the declaration of one or more function templates, e.g. with boost::enable_if

    ]]> +
    + CRITICAL + LINEAR + 1min +
    + + 1100 + L1100: Declaration of 'Symbol' does not declare an explicit specialization, explicit instantiation or friend + + In a declaration that explicitly specifies template arguments with angle brackets immediately after the name of a function template, the declaration must declare either an explicit specialization, explicit instantiation or friend. (Note, an explicit specialization always begins with 'template<>' and an explicit instantiation always begins with 'template'---without angle brackets after the keyword 'template'.)

    +
    
    +               template<class T> struct A {};
    +
    +               template<class T> inline void f( A<T> ); // #1
    +               void f( A<int> ); // #2 // Ok, declares an ordinary function
    +
    +               void f<char>( A<char> ); // Error 1100
    +
    ]]> +
    + CRITICAL + LINEAR + 1min +
    + + 1101 + L1101: Type of variable 'Symbol' cannot be deduced from its initializer + + Example:

    +
    
    +               int f(void);
    +               int f(char*);
    +               auto n = f; // Error
    +
    +

    In terms of deduction, this is equivalent to:

    +
    
    +               int f(void);
    +               int f(char*);
    +               template<class T> void g( const T& );
    +               void h( void )
    +                   {
    +                   g( f ); // Error
    +                   }
    +
    +

    Here, 'f' refers to multiple overloaded functions, so it is an ambiguous reference and T cannot be deduced. (Code like this could still be well-formed however, e.g. if g is overloaded with a non-template function whose parameter type is 'ptr-to-function returning int taking (char*)'.) +

    ]]> +
    + CRITICAL + LINEAR + 1min +
    + + 1102 + L1102: auto type deduced inconsistently: 'Type' for 'Symbol' but 'Type' for 'Symbol' + + When multiple variables are defined in the same declaration, and when that declaration uses the keyword auto as the type-specifier (a feature of C++0x), the type for which auto is a placeholder must be the same for each variable. Example:

    +
    
    +               float g(void);
    +               char* s();
    +               auto a = 42; // Ok, auto is 'int'
    +               auto b = g(); // Ok, auto is 'float'
    +               auto c = 'q',
    +                    *d = s(); // Ok, auto is 'char' (for both c and d)
    +               auto x = 42, y = g(); // Error 1102 here
    +
    ]]> +
    + CRITICAL +
    + + 1103 + L1103: Type 'Type' is not allowed as an enum-base + + When an enumeration type is declared with an explicit underlying type, that type must be integral. Example:

    +
    
    +               enum A : bool; // ok
    +               enum B : short; // ok
    +               enum C : unsigned long long; // ok
    +               enum D : float; // Error 1103
    +
    ]]> +
    + CRITICAL +
    + + 1104 + L1104: A reference to enumeration 'Symbol' should not use 'String' + + Although an enumeration may be declared or defined using a scope indicator or an underlying type indicator, these should not be applied when simply referencing the enumeration. E.g.

    +
    
    +               enum class A { red, green };
    +               enum class A x;         // Error: don't need 'class'
    +               enum A : unsigned { red, green };
    +               enum A : unsigned y;    // Error: don't need ': unsigned'
    +
    ]]> +
    + CRITICAL +
    + + 1105 + L1105: Use of ref qualification of 'Symbol' inconsistent with overloaded function 'Symbol' (Location)" + + If an explicit ref qualifier ('&' or '&&') of a nonstatic member function is employed, an explicit ref qualifier needs to be used with every member of the overload set. Thus:

    +
    
    +               class A
    +                   {
    +                   void f(int) &;  // ok (so far)
    +                   void f(int);    // 1105
    +                   void f(double); // 1105
    +                   void g(int);    // ok (fresh function)
    +                   void g(double); // still ok
    +                   };
    +
    ]]> +
    + CRITICAL +
    + + 1106 + L1106: Initializing value 'String' of enumerator 'Name' cannot be represented by the enumeration's underlying type 'Type' + + An enumerator is being initialized with a value that is inappropriate to the declared type of the initializer. Example:

    +
    
    +               enum E : unsigned char { e = 256 };
    +
    +

    The value 256 cannot be represented by an unsigned char. +

    ]]> +
    + CRITICAL +
    + + 1107 + L1107: Mixing two different kinds of string literals + + Two string literals are being concatenated which have different types. Examples:

    +
    
    +               char *s = u"abc" U"def";
    +               char *q = L"ghi" u"jkl";
    +
    +

    This message is issued for mixing strings of char16_t, char32_t, and/or wchar_t (as shown). Literal string concatenation of any of these with an ordinary character literal is permitted and will receive Informational 707. +

    ]]> +
    + CRITICAL + LINEAR + 1min +
    + + 1108 + L1108: Use of deleted function 'Symbol' defined at 'Location' + + +This message is issued when a deleted function is used. Example:

    +
    
    +               void f( int ) = delete;
    +               void f( double );
    +               void g( double d, int n ) {
    +                   f( d ); // Ok
    +                   f( n ); // Error
    +               }
    +
    ]]> +
    + CRITICAL + LINEAR + 1min +
    + + 1110 + L1110: Cycle detected: explicit application of 'Name'::operator-> causes infinite implicit applications of the same operator + + When an overloaded operator-> is used as in

    +
    
    +               a->b
    +
    +

    it is effectively expanded to:

    +
    
    +               a.operator->()->b
    +
    +

    And this expansion repeats until an operator-> is found that does not yield a class type. But in the process of evaluating this expansion, it might be found that one of the operators returns a class type for which an overloaded operator-> was already expanded; in that case, Error 1110 is triggered. Example:

    +
    
    +               struct B;
    +               struct A { struct B& operator->(); };
    +               struct B { struct A& operator->(); };
    +               int  f( A & p ) { p->g(); } // Error
    +
    ]]> +
    + CRITICAL + LINEAR + 1min +
    + + 1111 + L1111: ISO C++ requires an explicit specialization/instantiation to appear at namespace scope + + This message is issued at the beginning of each explicit specialization/instantiation that does not appear at namespace scope. Example:

    +
    
    +               struct A {
    +                   template <typename U> struct B {};
    +
    +                   // template <>  // Would be ill-formed by ISO C++.
    +                   //     struct B<int> {};
    +               };
    +               template<> struct A::B<int> {}; // Ok.
    +
    +

    There is an additional limitation with member class templates of class templates. As with members of a non-template class, one cannot write a specialization at class scope. Example:

    +
    
    +               template<typename T> struct G {
    +                   template <typename U> struct H {};
    +                   // template <>  // Would be ill-formed by ISO C++.
    +                   //     struct H<int> {};
    +               };
    +
    +

    But the language specification does not even allow this to be expressed in a namespace-scope definition; there is no way to write an explicit specialization that is a member of a class template. Example:

    +
    
    +               template<typename T> struct J {
    +                   template <typename U> struct K {};
    +               };
    +               // template<typename T>
    +               //     template <>  // Would be ill-formed by ISO C++;
    +               //         struct J<T>::K<int> {};
    +
    +

    This is because the rules for explicit specializations say that 'template<>' is not allowed to appear after a non-empty template-parameter-list within the same declaration. However, one may write an explicit specialization that is a member of an implicitly-instantiated specialization of a class template. Example:

    +
    
    +               template<typename T> struct L {
    +                   template <typename U> struct M {};
    +               };
    +               template <> template <> struct L<char>::M<int> {}; // Ok
    +
    +

    Here, the body of the class L<char> is automatically generated by implicit instantiation (otherwise the reference to 'L<char>::M' would be ill-formed), while the body of L<char>:M<int> is provided in the explicit specialization. + +In March of 2009, the ISO C++ committee reviewed a report submitted against this example:

    +
    
    +              struct A {
    +                 template<class T> struct B;
    +                 template <class T> struct B<T*> { }; // well-formed
    +                 template <> struct B<int*> { }; // ill-formed
    +               };
    +
    +

    While it might seem odd that one is able to write the partial specialization but not the full specialization, the committee (which at the time was in a "feature-freeze" mode and trying to finalize a draft for the next International Standard) decided that this capability would need to be regarded as an "extension", meaning that it could be considered as a new feature in a future standard but not as a bug-fix for C++0x. + +Note that the Microsoft compiler implements this extension. For that reason, the Lint option

    +
    
    +               -elib(1111)
    +
    +

    appears in recent versions of our configuration files for Microsoft compilers

    ]]> +
    + CRITICAL + LINEAR + 1min +
    + + 1112 + L1112: In a declaration, the form 'auto D(parms)->type' is the only valid way to use a trailing-return-type + + In a declaration, the form 'auto D(parms)->type' (where D is either a name or a parenthesized region) is the only valid way to use a trailing-return-type -- For example, if you want to declare that f returns a pointer-to-int, you must write:

    +
    
    +               auto f() -> int *;
    +
    +         ... and not:
    +
    +               auto *f() -> int;
    +
    +

    This also applies to a type-id (e.g., in a cast to a pointer-to-function, or as an argument to a template type-parameter)

    ]]> +
    + CRITICAL + LINEAR + 1min +
    + + 1113 + L1113: In this use of 'Template', type substitution failed for 'Type' + + Type is the type of Template; it is used at the cited location with concrete arguments, but substitution failed.

    +

    Example:

    +
    
    +           template<class T> using X = typename T::type;
    +           typedef X<int> XI; // error 1113
    +
    +]]> +
    + CRITICAL + LINEAR + 1min +
    + + 1116 + L1116: Virtual function 'Symbol' overrides function marked with final + + + + CRITICAL + LINEAR + 1min + + + 1117 + L1117: Non-virtual function 'Symbol' marked with 'String' + + + + CRITICAL + LINEAR + 1min + + + 1118 + L1118: Virtual function 'Symbol' already marked with 'String' + + + + CRITICAL + LINEAR + 1min + + + 1119 + L1119: Virtual function 'Symbol' marked with override does not override + + + + CRITICAL + LINEAR + 1min + + + 1120 + L1120: Incomplete type 'Type' is not a valid range expression + + + + CRITICAL + LINEAR + 1min + + + 1121 + L1121: No viable 'String' function defined for type 'Type' used as range expressionn + + + + CRITICAL + LINEAR + 1min + + + 1122 + L1122: Range expression of type 'Type' has 'String' member but no 'String' member + + + + CRITICAL + LINEAR + 1min + + + 1123 + L1123: Attempt to derive from class 'Symbol' marked as 'final' at Location + + + + CRITICAL + LINEAR + 1min + + + 1124 + L1124: Digit separator not allowed: 'String' + + + + CRITICAL + LINEAR + 1min + + + 1125 + L1125: A type cannot be defined in a friend declaration + + Example:

    +
    
    +           class A {
    +             friend struct B;    // ok
    +             friend struct C {}; // error
    +           };
    +
    ]]> +
    + CRITICAL + LINEAR + 1min +
    + + 1126 + L1126: In std::underlying_type<T>, T must be an enumeration type; but here, T is 'Type'. + + + + CRITICAL + LINEAR + 1min + + + 1127 + L1127: catch handler after catch(...) + + + + CRITICAL + LINEAR + 1min + + + 1258 + L1258: Internal Error; contact Gimpel Software + + + + BLOCKER + LINEAR + 1min + + + 1268 + L1268: Internal Error; contact Gimpel Software + + + + BLOCKER + LINEAR + 1min + + + 1270 + L1270: Internal Error; contact Gimpel Software + + + + BLOCKER + LINEAR + 1min + + + 1401 + L1401: member 'Symbol' (Location) not initialized by constructor + + + + LINEAR + 1min + + + 1402 + L1402: member 'Symbol' (Location) not initialized + + + + LINEAR + 1min + + + 1403 + L1403: member 'Symbol' (Location) not initialized + + + + LINEAR + 1min + + + 1404 + L1404: deleting an object of type 'Symbol' before type is defined + + The following situation was detected:

    +
    
    +            class X;   ...   X *p;  ...  delete p;
    +
    +

    That is, a placeholder declaration for a class is given and an object of that type is deleted before any definition is seen. This may or may not be followed by the actual class definition:

    +
    
    +            class X { ... };
    +
    +

    A delete before the class is defined is dangerous because, among other things, any operator delete that may be defined within the class could be ignored. +

    ]]> +
    + LINEAR + 1min +
    + + 1405 + L1405: Header typeinfo must be included before typeid is used + + + + LINEAR + 1min + + + 1411 + L1411: Member with different signature hides virtual member 'Symbol' (Location) + + + + LINEAR + 1min + + + 1412 + L1412: Reference member 'Symbol' is not initialized + + + + LINEAR + 1min + + + 1413 + L1413: function 'Symbol' is returning a temporary via a reference + + + + LINEAR + 1min + + + 1414 + L1414: Assigning address of auto variable 'Symbol' to member of this + + The address of an auto variable was taken and assigned to a this member in a member function. For example:

    +
    
    +               struct A
    +                   {
    +                   char *x;
    +                   void f()
    +                       {
    +                       char y[10];
    +                       x = y;          // warning 1414
    +                       }
    +                   };
    +
    +

    Here the address of y is being passed to member x but this is dangerous (if not ridiculous) since when the function returns, the storage allocated for y is deallocated and the pointer could very easily harm something. +

    ]]> +
    + LINEAR + 1min +
    + + 1415 + L1415: Pointer to non-POD class 'Name' passed to function 'Symbol' (Context) + + + + LINEAR + 1min + + + 1416 + L1416: An uninitialized reference 'Symbol' is being used to initialize reference 'Symbol' + + This message is usually issued when a reference to a member of a class is used to initialize a reference to another member of the same class before the first member was initialized. For example:

    +
    
    +               class C
    +                   {
    +                   int &n, &m;
    +                   C( int &k ) : n(m), m(k) { /* ... */ }
    +                   };
    +
    +

    Here m is initialized properly to be identical to k. However, the initialization of n, taking place, as it does, before m is so initialized, is erroneous. It is undefined what location n will reference. +

    ]]> +
    + LINEAR + 1min +
    + + 1417 + L1417: reference member 'Symbol' not initialized by constructor initializer list + + This message is issued when a reference data member of a class does not appear in a mem-initializer. For example, the following code will result in a Warning 1417 for symbol m since a mem-initializer is the only way that m can be reference initialized.

    +
    
    +               class C
    +                   {
    +                   int &n, &m;
    +                   C( int &k ) : n(k) { /* ... */ }
    +                   };
    +
    ]]> +
    + LINEAR + 1min +
    + + 1419 + L1419: Destructors should never throw + + + + LINEAR + 1min + + + 1501 + L1501: data member 'Symbol' has zero size + + + + LINEAR + 1min + + + 1502 + L1502: defined object 'Symbol' has no nonstatic data members + + + + LINEAR + 1min + + + 1503 + L1503: a tagged union is not anonymous + + + + LINEAR + 1min + + + 1504 + L1504: useless struct declaration + + + + LINEAR + 1min + + + 1505 + L1505: no access specifier provided, 'String' assumed + + A base class specifier provides no access specifier (public, private or protected). An explicit access specifier is always recommended since the default behavior is often not what is expected. For example:

    +
    
    +            class A : B { int a; };
    +
    +

    would make B a private base class by default.

    +
    
    +            class A : private B { int a; };
    +
    +

    is preferred if that's what you want. [11,#1.1] +

    ]]> +
    + LINEAR + 1min +
    + + 1506 + L1506: Call to virtual function 'Symbol' within a constructor or destructor + + + + LINEAR + 1min + + + 1507 + L1507: attempting to 'delete' an array + + + + LINEAR + 1min + + + 1509 + L1509: base class destructor for class 'Name' is not virtual + + + + LINEAR + 1min + + + 1510 + L1510: base class 'Name' has no destructor + + + + LINEAR + 1min + + + 1511 + L1511: Member hides non-virtual member 'Symbol' (Location) + + + + LINEAR + 1min + + + 1512 + L1512: destructor for base class 'Symbol' (Location) is not virtual + + + + LINEAR + 1min + + + 1513 + L1513: storage class ignored + + + + LINEAR + 1min + + + 1514 + L1514: Creating temporary to copy 'Type' to 'Type' (context: Context) + + + + LINEAR + 1min + + + 1515 + L1515: Default constructor not available for member 'Symbol' + + + + LINEAR + 1min + + + 1516 + L1516: Data member hides inherited member 'Symbol' (Location) + + + + LINEAR + 1min + + + 1520 + L1520: Multiple assignment operators for class 'Symbol' + + More than one assignment operator has been declared for a given class. For example, for class X there may have been declared:

    +
    
    +             void operator=(X);
    +             void operator=(X) const;
    +
    +

    Which is to be used for assignment? +

    ]]> +
    + LINEAR + 1min +
    + + 1521 + L1521: Multiple copy constructors for class 'Symbol' + + + + LINEAR + 1min + + + 1522 + L1522: Symbol 'Symbol' is an array of empty objects + + + + LINEAR + 1min + + + 1524 + L1524: new in constructor for class 'Name' which has no explicit destructor + + + + LINEAR + 1min + + + 1526 + L1526: Member function 'Symbol' (Location) not defined + + + + LINEAR + 1min + + + 1527 + L1527: static member 'Symbol' (Location) not defined + + + + LINEAR + 1min + + + 1528 + L1528: call to String does not match function template String + + + + LINEAR + 1min + + + 1529 + L1529: Symbol 'Symbol' not first checking for assignment to this + + The assignment operator does not appear to be checking for assignment of the value of a variable to itself (assignment to this). Specifically PC-lint/FlexeLint is looking for one of:

    +
    
    +                 if( &arg == this )
    +                 if( &arg != this )
    +                 if( this == &arg )
    +                 if( this != &arg )
    +
    +

    as the first statement of the function. + +It is important to check for a self assignment so as to know whether the old value should be subject to a delete operation. This is often overlooked by a class designer since it is counter-intuitive to assign to oneself. But through the magic of aliasing (pointers, references, function arguments) it is possible for an unsuspecting programmer to stumble into a disguised self-assignment [12, Item 17]. + +If you are currently using the following test

    +
    
    +                 if( arg == *this)
    +
    +

    we recommend you replace this with the more efficient:

    +
    
    +                 if( &arg == this || arg == *this)
    +
    ]]> +
    + LINEAR + 1min +
    + + 1531 + L1531: Symbol 'Symbol' (Location) should have compared argument against sizeof(class) + + + + LINEAR + 1min + + + 1532 + L1532: Symbol 'Symbol' not checking argument for NULL + + + + LINEAR + 1min + + + 1533 + L1533: Repeated friend declaration for symbol 'Symbol' + + + + LINEAR + 1min + + + 1534 + L1534: static variable 'Symbol' found within inline function in header + + + + LINEAR + 1min + + + 1535 + L1535: Exposing low access data through member 'Symbol' + + + + LINEAR + 1min + + + 1536 + L1536: Exposing low access member 'Symbol' + + A member function is returning the non-const address of a member either directly or via a reference. Moreover, the member's access (such as private or protected) is lower than the access of the function returning the address. For example:

    +
    
    +                 class X
    +                     {
    +                   private:
    +                     int a;
    +                   public:
    +                     int *f() { return &a; }
    +                     };
    +
    +

    This looks like a breach of the access system [12, Item 30]. You may lower the access rights of the function, raise the accessibility of the member or make the return value a const pointer or reference. In the above example you could change the function to: +

    +
    
    +                 const int *f() { return &a; }
    +
    ]]> +
    + LINEAR + 1min +
    + + 1537 + L1537: const function returns pointer data member 'Symbol' + + A const function is behaving suspiciously. It is returning a pointer data member (or equivalently a pointer to data that is pointed to by a data member). For example,

    +
    
    +                 class X
    +                     {
    +                     int *p;
    +                     int *f() const { return p; }
    +                     };
    +
    +

    Since f is supposedly const and since p is presumptively pointing to data that is logically part of class X we certainly have the potential for a security breach. Either return a pointer to const or remove the const modifier to the function. [12, Item 29]. + +Note, if a const function returns the address of a data member then a 605 (capability increase) is issued. +

    References

    +

    OOP55-CPP. Do not use pointer-to-member operators to access nonexistent members

    + + ]]> +
    + cert + security + LINEAR + 1min +
    + + 1538 + L1538: base class 'Name' absent from initializer list for copy constructor + + The indicated base class did not appear in the initializer list for a copy constructor. Was this an oversight? If the initializer list does not contain an initializer for a base class, the default constructor is used for the base class. This is not normally appropriate for a copy constructor. The following is more typical:

    +
    
    +                 class B { ... };
    +                 class D : public B
    +                     {
    +                     D( const D &arg ) : B( arg ) { ... }
    +                     ...
    +                     };
    +
    ]]> +
    + LINEAR + 1min +
    + + 1539 + L1539: member 'Symbol' (Location) not assigned by assignment operator + + + + LINEAR + 1min + + + 1540 + L1540: pointer member 'Symbol' (Location) neither freed nor zeroed by destructor + + + + LINEAR + 1min + + + 1541 + L1541: member 'Symbol' (Location) possibly not initialized by constructor + + + + LINEAR + 1min + + + 1542 + L1542: member 'Symbol' (Location) possibly not initialized + + + + LINEAR + 1min + + + 1543 + L1543: member 'Symbol' (Location) possibly not initialized + + + + LINEAR + 1min + + + 1544 + L1544: value of variable 'Symbol' (Location) indeterminate (order of initialization) + + A variable (identified by Symbol) was used in the run-time initialization of a static variable. However this variable itself was initialized at run-time. Since the order of initialization cannot be predicted this is the source of possible error. + +Whereas addresses are completely known at initialization time values may not be. Whether the value or merely the address of a variable is used in the initialization of a second variable is not an easy thing to determine when an argument is passed by reference or via pointer. For example,

    +
    
    +             class X
    +                 {
    +                 X( const X & );
    +                 };
    +
    +             extern X x1;
    +             X x2 = x1;
    +             X x1 = x2;
    +
    +

    It is theoretically possible, but unlikely, that the constructor X() is interested only in the address of its argument and not its current value. If so, it only means you will be getting a spurious report which you can suppress based on variable name. However, if the const is missing when passing a reference parameter (or a pointer parameter) then we cannot easily assume that values are being used. In this case no report will be issued. The moral is that if you want to get the checking implied by this message you should make your constructor reference arguments const. +

    ]]> +
    +
    + + 1545 + L1545: value of variable 'Symbol' used previously to initialize variable 'Symbol' (Location) + + + + LINEAR + 1min + + + 1546 + L1546: direct throw of exception 'Name' within destructor 'Symbol' + + + + LINEAR + 1min + + + 1547 + L1547: Assignment of array to pointer to base class (Context) + + An assignment from an array of a derived class to a pointer to a base class was detected. For example:

    +
    
    +                 class B { };
    +                 class D : public B {};
    +                 D a[10];
    +                 B *p = a;      // Warning 1547
    +                 B *q = &a[0];  // OK
    +
    +

    In this example p is being assigned the address of the first element of an array. This is fraught with danger since access to any element other than the zeroeth must be considered an error (we presume that B and D actually have or have the potential to have different sizes). [23, Item 3]. + +We do not warn about the assignment to q because it appears that the programmer realizes the situation and wishes to confine q to the base object of the zeroeth element of a only. As a further precaution against inappropriate array access, out of bounds warnings are issued for subsequent references to p[1] and q[1]. +

    ]]> +
    + LINEAR + 1min +
    + + 1548 + L1548: Exception specification for 'Symbol' conflicts with Location + + + + LINEAR + 1min + + + 1549 + L1549: Exception thrown for function 'Symbol' not declared to throw + + + + LINEAR + 1min + + + 1550 + L1550: exception 'Name' thrown by function 'Symbol' is not on throw-list of function 'Symbol' + + + + LINEAR + 1min + + + 1551 + L1551: function may throw exception 'Name' in destructor 'Symbol' + + + + LINEAR + 1min + + + 1552 + L1552: Converting pointer to array-of-derived to pointer to base + + This warning is similar to Warning 1547 and is sometimes given in conjunction with it. It uses value tracking to determine that an array (that could be dynamically allocated) is being assigned to a base class pointer. + +For example,

    +
    
    +                 Derived *d = new Derived[10];
    +                 Base *b;
    +                 b = d;      // Warning 1552
    +                 b = &d[0];  // OK
    +
    +

    [23, Item 3] Also, see the article by Mark Nelson (Bug++ of the Month, Windows developer's Journal, May 1997, pp. 43-44). +

    ]]> +
    + LINEAR + 1min +
    + + 1553 + L1553: struct 'Symbol' declared as extern "C" contains C++ substructure 'Symbol' (Location) + + + + LINEAR + 1min + + + 1554 + L1554: Direct pointer copy of member 'Symbol' within copy constructor: 'Symbol' + + In a copy constructor a pointer was merely copied rather than recreated with new storage. This can create a situation where two objects have the same data and this, in turn, causes problems when these objects are deleted or modified. For example, the following class will draw this warning:

    +
    
    +             class X
    +                 {
    +                 char *p;
    +                 X( const X & x )
    +                     { p = x.p; }
    +                 ...
    +                 };
    +
    +

    Here, member p is expected to be recreated using new or some variant. +

    ]]> +
    + LINEAR + 1min +
    + + 1555 + L1555: Direct pointer copy of member 'Symbol' within copy assignment operator: 'Symbol' + + In a copy assignment operator a pointer was merely copied rather than recreated with new storage. This can create a situation where two objects have the same data and this, in turn, causes problems when these objects are deleted or modified. For example, the following class will draw this warning:

    +
    
    +             class X
    +                 {
    +                 char *p;
    +                 X& operator=( const X & x )
    +                     { p = x.p; }
    +                 ...
    +                 };
    +
    +

    Here, member p is expected to be recreated using new or some variant. +

    ]]> +
    + LINEAR + 1min +
    + + 1556 + L1556: 'new Type(integer)' is suspicious + + A new expression had the form new T(Integer) where type T has no constructor. For example:

    +
    
    +             new int(10)
    +
    +

    will draw this warning. The expression allocates an area of storage large enough to hold one integer. It then initializes that integer to the value 10. Could this have been a botched attempt to allocate an array of 10 integers? Even if it was a deliberate attempt to allocate and initialize a single integer, a casual inspection of the code could easily lead a reader astray. + +The warning is only given when the type T has no constructor. If T has a constructor then either a syntactic error will result because no constructor matches the argument or a match will be found. In the latter case no warning will or should be issued. +

    ]]> +
    + LINEAR + 1min +
    + + 1557 + L1557: const member 'Symbol' is not initialized + + + + LINEAR + 1min + + + 1558 + L1558: virtual coupled with inline is an unusual combination + + The function declared both 'virtual' and 'inline' has been detected. An example of such a situation is as follows:

    +
    
    +               class C
    +                   {
    +                   virtual inline void f();   // Warning 1558
    +                   };
    +
    +

    Virtual functions by their nature require an address and so inlining such a function seems contradictory. We recommend that the 'inline' function specifier be removed. +

    ]]> +
    + LINEAR + 1min +
    + + 1559 + L1559: Uncaught exception 'Name' may be thrown in destructor 'Symbol' + + + + LINEAR + 1min + + + 1560 + L1560: Uncaught exception 'Name' not on throw-list of function 'Symbol' + + + + LINEAR + 1min + + + 1561 + L1561: Reference initialization causes loss of const/volatile integrity (Context) + + A reference initialization is resulting in a capability gain that can cause a loss of const or volatile integrity. + +Typically the message is given on initializing a non-const reference with a const. For example:

    +
    
    +           void f( int &x );
    +           const int n = 0;
    +           ...
    +           f(n);
    +
    +

    Here, function f() could assign a value to its argument and thereby modify n which is declared to be const. + +The message can also be issued when a pointer is initialized. Consider the following example.

    +
    
    +           void h( const int *&q );
    +           int *p;
    +           ...
    +           h(p);
    +
    +

    It might seem that passing a regular (i.e., non-const) pointer to a const int * could cause no harm. That would be correct if it were not for the reference. If function h() were to assign a pointer to const to its parameter q then upon return from the call, p could be used to modify const data. + +There are many subtle cases that can boggle the mind. See the commentary to Message 605. +

    ]]> +
    + LINEAR + 1min +
    + + 1562 + L1562: Exception specification for 'Symbol' is not a subset of 'Symbol' (Location) + + The first symbol is that of an overriding virtual function for the second symbol. The exception specification for the first was found not to be a subset of the second. For example, it may be reasonable to have:

    +
    
    +               struct B   { virtual void f() throw(B); };
    +               struct D:B { virtual void f() throw(D); };
    +
    +

    Here, although the exception specification is not identical, the exception D is considered a subset of the base class B. + +It would not be reasonable for D::f() to throw an exception outside the range of those thrown by B::f() because in general the compiler will only see calls to B::f() and it should be possible for the compiler to deduce what exceptions could be thrown by examining the static call +

    ]]> +
    + LINEAR + 1min +
    + + 1563 + L1563: Suspicious third argument to ?: operator + + The third argument to ?: contained an unparenthesized assignment operator such as

    +
    
    +               p ? a : b = 1
    +
    +

    If this is what was intended you should parenthesize the third argument as in:

    +
    
    +               p ? a : (b = 1)
    +
    +

    Not only is the original form difficult to read but C, as opposed to C++, would parse this as:

    +
    
    +               (p ? a : b) = 1
    +
    ]]> +
    + LINEAR + 1min +
    + + 1564 + L1564: Assigning a non-zero-one constant to a bool + + The following looks suspicious.

    +
    
    +               bool a = 34;
    +
    +

    Although there is an implicit conversion from integral to bool and assigning an integer varaible to a bool to obtain its Boolean meaning is legitimate, assigning an integer such as this looks suspicious. As the message suggests, the warning is not given if the value assigned is either 0 or 1. An Elective Note would be raised in that instance. +

    ]]> +
    + LINEAR + 1min +
    + + 1565 + L1565: member 'Symbol' (Location) not assigned by initializer function + + + + LINEAR + 1min + + + 1566 + L1566: member 'Symbol' (Location) might have been initialized by a separate function but no '-sem(Name,initializer)' was seen + + A class data member (whose name and location are indicated in the message) was not directly initialized by a constructor. It may have been initialized by a separately called member function. If this is the case you may follow the advice given in the message and use a semantic option to inform PC-lint/FlexeLint that the separately called function is in fact an 'initializer'. For example:

    +
    
    +               class A {
    +                       int a;
    +                   public:
    +                       void f();
    +                       A() { f(); }
    +                       };
    +
    +

    Here f() is presumably serving as an initializer for the constructor A::A(). To inform PC-lint/FlexeLint of this situation, use the option:

    +
    
    +               -sem( A::f, initializer )
    +
    +

    This will suppress Warning 1566 for any constructor of class A that calls A::f. +

    ]]> +
    + LINEAR + 1min +
    + + 1567 + L1567: Initialization of variable 'Symbol' (Location) is indeterminate as it uses variable 'Symbol' through calls: 'String' + + A variable was dynamically initialized using an expression that contained a call to a function and that function referenced a variable that was also dynamically initialized and was in some other module. For example:

    +
    
    +               a.cpp:                  b.cpp:
    +
    +               int g(void);            int f(void);
    +               int y = g();            int x = f();
    +               int f() { return y; }
    +
    +

    The initialization of both x and y are dynamic. Although the order of dynamic initialization within a module is pre-ordained the order in which modules are initialized is not. Therefore it is perfectly possible for b.cpp to be initialized before a.cpp. Thus when the call is made upon function f() to initialize x, variable y may not yet have been initialized. +

    ]]> +
    + LINEAR + 1min +
    + + 1568 + L1568: Variable 'Symbol' (Location) accesses variable 'Symbol' before the latter is initialized through calls: 'String' + + A variable was dynamically initialized using an expression that contained a call to a function and that function referenced a variable that was also dynamically initialized but later in the module. For example:

    +
    
    +               int g(void);
    +               int f(void);
    +               int x = f();
    +               int y = g();
    +               int f() { return y; }
    +
    +

    The initialization of both x and y are dynamic. The order of dynamic initialization within a module is in the order in which the initialization is specified. Thus when the call is made upon function f() to initialize x, variable y will not yet have been initialized. +

    ]]> +
    + LINEAR + 1min +
    + + 1569 + L1569: Initializing a member reference with a temporary. + + A member reference was initialized with a temporary. For example:

    +
    
    +           struct A { int &n;  A() : n(3) {} };
    +
    +

    The constructor A() contains an initializer list within which it initializes n. But n will be bound to a temporary created by the compiler to hold the value 3. The lifetime of this temporary is limited; it "persists until the constructor exits" [10 section class.temporary] +

    ]]> +
    + LINEAR + 1min +
    + + 1570 + L1570: Initializing a reference class member with an auto variable 'Symbol' + + In a constructor initializer, a reference class member is being initialized to bind to an auto variable. Consider:

    +
    
    +           class X { int &n; X(int k) :n(k) {} };
    +
    +

    In this example member n is being bound to variable k which, although a parameter, is nonetheless placed into auto storage. But the lifetime of k is only the duration of the call to the constructor, whereas the lifetime of n is the lifetime of the class object constructed. +

    ]]> +
    + LINEAR + 1min +
    + + 1571 + L1571: Returning an auto variable 'Symbol' via a reference type + + + + LINEAR + 1min + + + 1572 + L1572: Initializing a static reference variable with an auto variable 'Symbol' + + A static variable has a lifetime that will exceed that of the auto variable that it has been bound to. Consider

    +
    
    +           void f( int n ) { static int& r = n; ... }
    +
    +

    The reference r will be permanently bound to an auto variable n. The lifetime of n will not extend beyond the life of the function. On the second and subsequent calls to function f the static variable r will be bound to a non-existent entity. +

    ]]> +
    + LINEAR + 1min +
    + + 1573 + L1573: Generic function template 'Symbol' declared in namespace associated with type 'Symbol' (Location) + + When a class (or union or enum) is declared within a namespace that namespace is said to be associated with the type. A Generic function template is any that has as parameters only intrinsic types or plain template arguments possibly adorned with reference or const or volatile qualification. Consider

    +
    
    +           namespace X
    +               {
    +               template< class T >
    +                   void f( int, const T& );    // Generic
    +               class A{};                      // Warning 1573
    +               }
    +
    +

    A call to function f that contained an argument of type X::A would, by ADL (Argument Dependent Lookup), need to also consider function X::f even though this function was not in the scope of the call. In the past this has led to strange an unexpected results. + +Some designers adopt the strategy of embedding the class within a sub namespace and employing a using-declaration to make it available to users of the original namespace. For example:

    +
    
    +           namespace X
    +               {
    +               template< class T >
    +                   void f( int, const T& );    // Generic
    +               namespace X1
    +                   {
    +                   class A{};                  // No Warning
    +                   }
    +               using X1::A;
    +               }
    +
    +

    Now an argument of type X::A will not automatically trigger a consideration of X::f. +

    ]]> +
    + LINEAR + 1min +
    + + 1574 + L1574: Returning the address of an auto variable indirectly through reference variable 'Symbol' + + Within a function whose return type is reference to some type, a return statement is returning a reference which has been initialized (possibly indirectly) with an auto variable. For example:

    +
    
    +               int &f( int k )
    +                   {
    +                   int &r = k;
    +                   return r;
    +                   }
    +
    ]]> +
    + LINEAR + 1min +
    + + 1576 + L1576: Explicit specialization does not occur in the same file as corresponding function template 'Symbol' (Location) + + + + LINEAR + 1min + + + 1577 + L1577: Partial or explicit specialization does not occur in the same file as primary template 'Symbol' (Location) + + + + LINEAR + 1min + + + 1578 + L1578: Pointer member 'Symbol' (Location) neither freed nor zeroed by cleanup function + + + + LINEAR + 1min + + + 1579 + L1579: Pointer member 'Symbol' (Location) might have been freed by a separate function but no '-sem(Name,cleanup)' was seen + + A class data member (whose name and location are indicated in the message) was not directly freed by the class destructor. There was a chance that it was cleared by a separately called member function. If this is the case you may follow the advice given in the message and use a semantic option to inform PC-lint/FlexeLint that the separately called function is in fact a 'cleanup' function. For example:

    +
    
    +               class A {
    +                       int *p;
    +                   public:
    +                       void release_ptrs();
    +                       ~A() { release_ptrs(); }
    +                       };
    +
    +

    Here release_ptrs() is presumably serving as a cleanup function for the destructor ~A::A(). To inform PC-lint/FlexeLint of this situation, use the option:

    +
    
    +               -sem( A::release_ptrs, cleanup )
    +
    +

    A separate message (Warning 1578) will be issued if the cleanup function fails to clear all pointers. See also Warning 1566. +

    ]]> +
    + LINEAR + 1min +
    + + 1701 + L1701: redundant access-specifier 'String' + + + + MINOR + LINEAR + 1min + + + 1702 + L1702: operator 'Name' is both an ordinary function 'String' and a member function 'String' + + ', etc.) are usually defined external to a class definition so that they can support non-objects on the left hand side. [11, ?13.4.2]]]> + + MINOR + LINEAR + 1min + + + 1703 + L1703: Function 'String' arbitrarily selected. Refer to Error 'Integer' + + + + MINOR + LINEAR + 1min + + + 1704 + L1704: Constructor 'Symbol' has private access specification + + + + MINOR + LINEAR + 1min + + + 1705 + L1705: static class members may be accessed by the scoping operator + + + + MINOR + LINEAR + 1min + + + 1706 + L1706: Declaration with scope operator is unusual within a class + + +class X { int X::n; ... + +will elicit this message. If the (redundant) class specification (X::) were replaced by some different class specification and the declaration was not friend an error (1040) would be issued. [11, ?9.2] + + ]]> + + MINOR + LINEAR + 1min + + + 1707 + L1707: static assumed for String + + + + MINOR + LINEAR + 1min + + + 1708 + L1708: typedef 'Symbol' not declared as "C" conflicts with Location + + + + MINOR + LINEAR + 1min + + + 1709 + L1709: typedef 'Symbol' declared as "C" conflicts with Location + + + + MINOR + LINEAR + 1min + + + 1710 + L1710: An implicit 'typename' was assumed + + class A { T::N x; // Info 1710 }; Many compilers will accept this construct since the only interpretation consistent with valid syntax is that T::N represents a type. (But if the 'x' weren't there it would be taken as an access declaration and more frequently would be a non-type).]]> + + MINOR + LINEAR + 1min + + + 1711 + L1711: class 'Symbol' (Location) has a virtual function but is not inherited + + + + MINOR + LINEAR + 1min + + + 1712 + L1712: default constructor not defined for class 'Name' + + + + MINOR + LINEAR + 1min + + + 1713 + L1713: Parentheses have inconsistent interpretation + + + + MINOR + LINEAR + 1min + + + 1714 + L1714: Member function 'Symbol' (Location) not referenced + + + + MINOR + LINEAR + 1min + + + 1715 + L1715: static member 'Symbol' (Location) not referenced + + + + MINOR + LINEAR + 1min + + + 1716 + L1716: Virtual member function 'Symbol' (Location) not referenced + + + + MINOR + LINEAR + 1min + + + 1717 + L1717: empty prototype for function declaration, assumed '(void)' + + + + MINOR + LINEAR + 1min + + + 1718 + L1718: expression within brackets ignored + + + + MINOR + LINEAR + 1min + + + 1719 + L1719: assignment operator for class 'Symbol' has non-reference parameter + + +X& operator =(const X &) + +If the argument is not a reference then your program is subject to implicit function calls and less efficient operation. [11, ?13.4.3] + + ]]> + + MINOR + LINEAR + 1min + + + 1720 + L1720: assignment operator for class 'Symbol' has non-const parameter + + +X& operator =(const X &) + +If the argument is not const then your program will not be diagnosed as completely as it might otherwise be. [11, ?13.4.3] + + ]]> + + MINOR + LINEAR + 1min + + + 1721 + L1721: operator =() for class 'Symbol' is not assignment operator + + +X& operator =(const X &) + +A member function whose name is operator =, but which doesn't have that form, is not an assignment operator. This could be a source of subtle confusion for a program reader. If this is not an error you may selectively suppress this message for the given class. [11, ?13.4.3] + + ]]> + + MINOR + LINEAR + 1min + + + 1722 + L1722: assignment operator for class 'Symbol' does not return a reference to class + + +X& operator =(const X &) + +The reason for returning a reference to class is to support multiple assignment as in: +
    +a = b = c
    +
    +[11, ?13.4.3] + + ]]> +
    + MINOR + LINEAR + 1min +
    + + 1723 + L1723: Template 'Symbol' arbitrarily selected. Refer to Error 'Integer' + + This is a supplemental message to the Error that immediately preceded, which was about a failure to select a single best partial specialization for an instantiation. Its purpose is to show some of the context of subsequent processing (which is now in a state of recovery).

    +

    Example:

    +
    
    +           template<class T, class U> struct A;
    +           template<class T, class U> struct A<T*, U> {  };
    +           template<class T, class U> struct A<T, U*> {  };
    +           A<int*, char*>  x; // Error 1084 followed by Info 1723
    +
    +]]> +
    + MINOR + LINEAR + 1min +
    + + 1724 + L1724: Argument to copy constructor for class 'Symbol' should be a const reference + + +X( const X & ); + +If you leave off the 'const' then some diagnostics will not be possible. [19] + + ]]> + + MINOR + LINEAR + 1min + + + 1725 + L1725: class member 'Symbol' is a reference + + + + MINOR + LINEAR + 1min + + + 1726 + L1726: taking address of overloaded function name 'Symbol' + + + + MINOR + LINEAR + 1min + + + 1727 + L1727: inline 'Symbol' not previously defined inline at (Location) + + + + MINOR + LINEAR + 1min + + + 1728 + L1728: Symbol 'Symbol' was previously defined inline at (Location) + + + + MINOR + LINEAR + 1min + + + 1729 + L1729: Initializer inversion detected for member 'Symbol' + + + + MINOR + LINEAR + 1min + + + 1730 + L1730: class/struct inconsistency for symbol 'Symbol' (conflicts with Location) + + + + MINOR + LINEAR + 1min + + + 1732 + L1732: new in constructor for class 'Name' which has no assignment operator + + + + MINOR + LINEAR + 1min + + + 1733 + L1733: new in constructor for class 'Name' which has no copy constructor + + + + MINOR + LINEAR + 1min + + + 1734 + L1734: Had difficulty compiling template function: 'Symbol' + + + + MINOR + LINEAR + 1min + + + 1735 + L1735: Virtual function 'Symbol' has default parameter + + + + MINOR + LINEAR + 1min + + + 1736 + L1736: Redundant access specifier (String) + + + + MINOR + LINEAR + 1min + + + 1737 + L1737: Symbol 'Symbol' hides global operator new + + + + MINOR + LINEAR + 1min + + + 1738 + L1738: non-copy constructor 'Symbol' used to initialize copy constructor + + + + MINOR + LINEAR + 1min + + + 1739 + L1739: Binary operator 'Symbol' should be non-member function + + + + MINOR + LINEAR + 1min + + + 1740 + L1740: pointer member 'Symbol' (Location) not directly freed or zeroed by destructor + + + + MINOR + LINEAR + 1min + + + 1741 + L1741: member 'Symbol' (Location) conceivably not initialized by constructor + + + + MINOR + LINEAR + 1min + + + 1742 + L1742: member 'Symbol' (Location) conceivably not initialized + + + + MINOR + LINEAR + 1min + + + 1743 + L1743: member 'Symbol' (Location) conceivably not initialized + + + + MINOR + LINEAR + 1min + + + 1744 + L1744: member 'Symbol' (Location) possibly not initialized by private constructor + + + + MINOR + LINEAR + 1min + + + 1745 + L1745: member 'Symbol' (Location) not assigned by private assignment operator + + + + MINOR + LINEAR + 1min + + + 1746 + L1746: parameter 'Symbol' of function 'Symbol' could be made const reference + + + + MINOR + LINEAR + 1min + + + 1747 + L1747: binary operator 'Symbol' returning a reference + + + + MINOR + LINEAR + 1min + + + 1748 + L1748: non-virtual base class 'Name' included twice in class 'Name' + + + + MINOR + LINEAR + 1min + + + 1749 + L1749: base class 'Symbol' of class 'Symbol' need not be virtual + + + + MINOR + LINEAR + 1min + + + 1750 + L1750: local template 'Symbol' (Location) not referenced + + + + MINOR + LINEAR + 1min + + + 1751 + L1751: unnamed namespace in header + + + + MINOR + LINEAR + 1min + + + 1752 + L1752: catch parameter Integer is not a reference + + + + MINOR + LINEAR + 1min + + + 1753 + L1753: Overloading special operator 'Symbol' + + + + MINOR + LINEAR + 1min + + + 1754 + L1754: Expected symbol 'Symbol' to be declared for class 'Symbol' + + + + MINOR + LINEAR + 1min + + + 1755 + L1755: global template 'Symbol' (Location) not referenced + + + + MINOR + LINEAR + 1min + + + 1757 + L1757: Discarded instance of post decrement/increment + + + + MINOR + LINEAR + 1min + + + 1758 + L1758: Prefix increment/decrement operator 'Symbol' returns a non-reference + + + + MINOR + LINEAR + 1min + + + 1759 + L1759: Postfix increment/decrement operator 'Symbol' returns a reference. + + + + MINOR + LINEAR + 1min + + + 1760 + L1760: Redundant template 'Symbol' defined identically at Location + + + + MINOR + LINEAR + 1min + + + 1761 + L1761: Declaration of function 'Symbol' hides overloaded function 'Symbol' (Location) + + + + MINOR + LINEAR + 1min + + + 1762 + L1762: Member function 'Symbol' could be made const + + + + MINOR + LINEAR + 1min + + + 1763 + L1763: Member function 'Symbol' marked as const indirectly modifies class + + + + MINOR + LINEAR + 1min + + + 1764 + L1764: Reference parameter 'Symbol' (Location) could be declared const reference + + +int f( int & k ) { return k; } + +can be redeclared as: +
    +int f( const int & k ) { return k; }
    +
    +Declaring a parameter a reference to const offers advantages that a mere reference does not. In particular, you can pass constants, temporaries and const types into such a parameter where otherwise you may not. In addition it can offer better documentation. +Other situations in which a const can be added to a declaration are covered in messages 818, 952, 953 and 954. + + ]]> +
    + MINOR + LINEAR + 1min +
    + + 1768 + L1768: Virtual function 'Symbol' has an access (String) different from the access (String) in the base class (String) + + + + MINOR + LINEAR + 1min + + + 1769 + L1769: Member or base class 'Symbol' has no constructor + + + + MINOR + LINEAR + 1min + + + 1770 + L1770: function 'Symbol' defined without function 'String' + + + + MINOR + LINEAR + 1min + + + 1771 + L1771: function 'Symbol' replaces global function + + + + MINOR + LINEAR + 1min + + + 1772 + L1772: Assignment operator 'Symbol' is not returning *this + + + + MINOR + LINEAR + 1min + + + 1773 + L1773: Attempt to cast away const (or volatile) + + + + MINOR + LINEAR + 1min + + + 1774 + L1774: Could use dynamic_cast to downcast ptr to polymorphic type 'Symbol' + + + + MINOR + LINEAR + 1min + + + 1775 + L1775: catch block does not catch any declared exception + + + + MINOR + LINEAR + 1min + + + 1776 + L1776: Converting string literals to Type is not const safe (Context) + + +char *p = "string"; + +will trigger this message. This pointer could then be used to modify the string literal and that could produce some very strange behavior. +Such an assignment is legal but "deprecated" by the C++ Standard. The reason for not ruling it illegal is that numerous existing functions have their arguments typed as char * and this would break working code. +Note that this message is only given for string literals. If an expression is typed as pointer to const char in some way other than via string literal, then an assignment of that pointer to a non-const pointer will receive a more severe warning. + + ]]> + + MINOR + LINEAR + 1min + + + 1777 + L1777: Template recursion limit (Integer) reached, use -tr_limit(n) + + + + MINOR + LINEAR + 1min + + + 1778 + L1778: Assignment of string literal to variable 'Symbol' (Location) is not const safe + + + + MINOR + LINEAR + 1min + + + 1780 + L1780: Returning address of reference parameter 'Symbol' + + + + MINOR + LINEAR + 1min + + + 1781 + L1781: Passing address of reference parameter 'Symbol' into caller address space + + + + MINOR + LINEAR + 1min + + + 1782 + L1782: Assigning address of reference parameter 'Symbol' to a static variable + + + + MINOR + LINEAR + 1min + + + 1784 + L1784: Symbol 'Symbol' previously declared as "C", compare with Location + + + + MINOR + LINEAR + 1min + + + 1785 + L1785: Implicit conversion from Boolean (Context) (Type to Type) + + + + MINOR + LINEAR + 1min + + + 1786 + L1786: Implicit conversion to Boolean (Context) (Type to Type) + + + + MINOR + LINEAR + 1min + + + 1787 + L1787: Access declarations are deprecated in favor of using declarations + + + + MINOR + LINEAR + 1min + + + 1788 + L1788: Variable 'Symbol' (Location) (type 'Name') is referenced only by its constructor or destructor + + + + MINOR + LINEAR + 1min + + + 1789 + L1789: Template constructor 'Symbol' cannot be a copy constructor + + + + MINOR + LINEAR + 1min + + + 1790 + L1790: Base class 'Symbol' has no non-destructor virtual functions + + + + MINOR + LINEAR + 1min + + + 1791 + L1791: No token on this line follows the 'return' keyword + + + + MINOR + LINEAR + 1min + + + 1792 + L1792: Assignment operator for class 'Symbol' does not return a const reference to class + + + + MINOR + LINEAR + 1min + + + 1793 + L1793: While calling 'Symbol': Initializing the implict object parameter 'Type' (a non-const reference) with a non-lvalue + + + + MINOR + LINEAR + 1min + + + 1794 + L1794: Using-declaration introduces 'Name' (Location), which has the same parameter list as 'Name' (Location), which was also introduced here by previous using-declaration 'Name' (Location) + + + + MINOR + LINEAR + 1min + + + 1795 + L1795: Defined template 'Symbol' was not instantiated. + + + + MINOR + LINEAR + 1min + + + 1796 + L1796: Explicit specialization of overloaded function template 'Symbol' + + + + MINOR + LINEAR + 1min + + + 1901 + L1901: Creating a temporary of type 'Symbol' + + + + INFO + LINEAR + 1min + + + 1902 + L1902: useless ';' follows '}' in function definition + + + + INFO + LINEAR + 1min + + + 1904 + L1904: Old-style C comment + + + + INFO + LINEAR + 1min + + + 1905 + L1905: implicit default constructor generated for class 'Name' + + + + INFO + LINEAR + 1min + + + 1907 + L1907: implicit destructor generated for class 'Name' + + + + INFO + LINEAR + 1min + + + 1908 + L1908: 'virtual' assumed for destructor'~Name()' (inherited from base class 'Name() + + + + INFO + LINEAR + 1min + + + 1909 + L1909: 'virtual' assumed, see: function 'Symbol' (Location) + + + + INFO + LINEAR + 1min + + + 1911 + L1911: Implicit call of constructor 'Symbol' (see text) + + + + INFO + LINEAR + 1min + + + 1912 + L1912: Implicit call of conversion function from class 'Name' to type 'Type' + + + + INFO + LINEAR + 1min + + + 1914 + L1914: Default constructor 'Symbol' (Location) not referenced + + + + INFO + LINEAR + 1min + + + 1915 + L1915: Overriding virtual function 'Symbol' is not marked with override + + + + INFO + LINEAR + 1min + + + 1916 + L1916: Ellipsis encountered + + + + INFO + LINEAR + 1min + + + 1917 + L1917: Empty prototype for String, assumed '(void)' + + +int f(); // Info 1717 int f() { return 1; } // Elective Note 1917 + +The reason for this is that the declaration form has a different meaning in C and C++. In C it is an incomplete declaration saying nothing about arguments. In C++ the declaration says there are no arguments. The definition, however, means the same in both languages. See also message 1918. [11, ?8.2.5] + + ]]> + + INFO + LINEAR + 1min + + + 1918 + L1918: empty prototype for member declaration, assumed (void) + + + + INFO + LINEAR + 1min + + + 1919 + L1919: Multiple assignment operators for class 'Symbol' + + + + INFO + LINEAR + 1min + + + 1920 + L1920: Casting to a reference + + + + INFO + LINEAR + 1min + + + 1921 + L1921: Symbol 'Symbol' not checking argument against sizeof(class) + + +This note is given for either operator new or operator delete when defined as member functions. As member functions they are called when new (or delete) is applied to a class type or any derived class type. The difficulty is with the derived class type. Any specialized allocator is likely to be useless for a derived class type and hence experts suggest that a test be made of the size_t argument against sizeof(class). Specifically PC-lint/FlexeLint is looking for one of:

    +
    +    if( arg == sizeof(class) ) 
    +    if( arg != sizeof(class) ) 
    +    if( sizeof(class) == arg ) 
    +    if( sizeof(class) != arg )
    +
    +or the equivalent. If any such function is found that is a member of a class that is the base of a derivation, then in addition to Note 1921, we issue Warning 1531. (see Steve Simpson, "More on Memory Management", Dr. Dobb's Journal, August 1994, p. 10). +

    References

    +

    MEM00-CPP. Overloaded new operators should check that their size argument matches the size of their class

    + + ]]> +
    + cert + INFO + LINEAR + 1min +
    + + 1922 + L1922: Symbol 'Symbol' not checking argument for NULL + + +This message is given for a function operator delete which is not checking its parameter for being the NULL pointer. We would normally expect to see some such check as:

    +
    +    if( arg ) 
    +    if( arg == 0 ) 
    +    if( arg != NULL )
    +
    +etc. Classes which have destructors will normally filter out passing the NULL pointer into the operator delete so that this message is only in the Elective Note category. If there is no destructor you obtain a warning. See Warning 1532. + ]]> +
    + INFO + LINEAR + 1min +
    + + 1923 + L1923: macro 'Symbol' could become const variable + + + + INFO + LINEAR + 1min + + + 1924 + L1924: C-style cast + + + + INFO + LINEAR + 1min + + + 1925 + L1925: Symbol 'Symbol' is a public data member + + + + INFO + LINEAR + 1min + + + 1926 + L1926: Symbol 'Symbol's default constructor implicitly called + + + + INFO + LINEAR + 1min + + + 1927 + L1927: Symbol 'Symbol' did not appear in the constructor initializer list + + + + INFO + LINEAR + 1min + + + 1928 + L1928: Symbol 'Name' did not appear in the constructor initializer list + + + + INFO + LINEAR + 1min + + + 1929 + L1929: function 'Symbol' returning a reference + + + + INFO + LINEAR + 1min + + + 1930 + L1930: Conversion operator 'Symbol' found + + + + INFO + LINEAR + 1min + + + 1931 + L1931: Constructor 'Symbol' can be used for implicit conversions + + + + INFO + LINEAR + 1min + + + 1932 + L1932: Base class 'Symbol' is not abstract. + + + + INFO + LINEAR + 1min + + + 1933 + L1933: Call to unqualified virtual function 'Symbol' from non-static member function + + +void X::g() { f(); // Note 1933 X::f(); // ok -- non virtual call. } + +Even if total abstinence is unwarranted, turning on message 1933 occasionally can be helpful in detecting situations when constructors or destructors call virtual functions. + + ]]> + + INFO + LINEAR + 1min + + + 1934 + L1934: Shift operator 'Symbol' should be non-member function + + + + INFO + LINEAR + 1min + + + 1935 + L1935: Dynamic initialization for class object 'Symbol1' (references 'Symbol2') + + + X x: + +This will elicit Elective Note 1935 that x is being initialized dynamically by a call to X::X(). Now, if this constructor were to be accessing information that depended on the order of evaluation (such as accessing the value of x itself) the result would be undefined. We have no evidence of this at this point. and for this reason the message is in the Elective Note category. However, programmers with a suspected order-of-initialization problem will probably want to turn this on. See also 1936, 1937, 1544 and 1545. + + ]]> + + INFO + LINEAR + 1min + + + 1936 + L1936: Dynamic initialization for scalar 'Symbol1' (references 'Symbol2') + + + + INFO + LINEAR + 1min + + + 1937 + L1937: Static variable 'Symbol' has a destructor. + + + + INFO + LINEAR + 1min + + + 1938 + L1938: constructor 'Symbol' accesses global data. + + + + INFO + LINEAR + 1min + + + 1939 + L1939: Down cast detected + + + + INFO + LINEAR + 1min + + + 1940 + L1940: Address of reference parameter 'Symbol' transferred outside of function + + + + INFO + LINEAR + 1min + + + 1941 + L1941: Assignment operator for class 'Symbol' does not return a const reference to class + + + + INFO + LINEAR + 1min + + + 1942 + L1942: Unqualified name 'Symbol' subject to misinterpretation owing to dependent base class + + + + INFO + LINEAR + 1min + + + 1960 + L1960: Violates MISRA C++ Required Rule Name, String + + In addition to a C coding standard, MISRA has also compiled a C++ one. We suggest use of the options file au-misra-cpp.lnt to activate these and other MISRA C++ messages.

    +

    The list of checks made are as follows:

    +
    
    +       (Rule 0-1-8)  Void return type for function without external side-effects.
    +       (Rule 2-13-2) Octal constant or escape sequence used.
    +       (Rule 2-13-4) Lower case literal suffix.
    +       (Rule 3-1-1)  Object/function definitions in headers.
    +       (Rule 3-1-2)  Function not declared at file scope.
    +       (Rule 3-2-3)  Object/function previously declared in location.
    +       (Rule 3-9-3)  Bit representation of a floating point type used.
    +       (Rule 4-5-1)  Boolean expression used with non-permitted operator.
    +       (Rule 4-5-3)  Plain char used with prohibited operator.
    +       (Rule 5-0-3)  Implicit conversion of cvalue.
    +       (Rule 5-0-4)  Implicit conversion changes signedness.
    +       (Rule 5-0-5)  Implicit conversion between integer and floating point types.
    +       (Rule 5-0-6)  Implicit conversion to smaller type.
    +       (Rule 5-0-7)  Cast of cvalue between integer and floating point types.
    +       (Rule 5-0-8)  Cast of cvalue to larger type.
    +       (Rule 5-0-9)  Cast of cvalue changes signedness.
    +       (Rule 5-0-10) Recasting required for operators '~' and '<<'.
    +       (Rule 5-0-11) Disallowed use of non-character value.
    +       (Rule 5-0-12  Disallowed use of non-numeric value.
    +       (Rule 5-0-15) Pointer arithmetic other than array indexing used.
    +       (rule 5-0-19) More than two pointer indirection levels used.
    +       (Rule 5-0-21) Bitwise operator applied to signed underlying type.
    +       (Rule 5-2-1)  Non-postfix expression used with logical operator.
    +       (Rule 5-2-5)  Attempt to cast away const/volatile from a pointer or reference.
    +       (Rule 5-2-12) Array-pointer decay when passing the array to a function.
    +       (Rule 5-3-1)  Boolean expresion required for operator.
    +       (Rule 5-3-2)  Prohibited operator applied to unsigned underlying type: .
    +       (Rule 5-3-3)  Overloading unary &.
    +       (Rule 5-3-4)  'sizeof' used on expressions with side effect.
    +       (Rule 5-14-1) Side effects on right hand side of logical operator.
    +       (Rule 5-18-1) Comma operator used.
    +       (Rule 6-2-3)  Null statement not in line by itself.
    +       (Rules 6-3-1 and 6-4-1) Left brace expected for if, else, for, do, switch and while.
    +       (Rule 6-4-2)  No 'else' at end of 'if ... else if' chain.
    +       (Rule 6-4-7)  Boolean value in switch expression.
    +       (Rule 6-6-2)  Gotos jumping to an earlier point in the code.
    +       (Rule 6-6-3)  continue statement should not be used.
    +       (Rule 6-6-4)  More than one 'break' terminates loop.
    +       (Rule 7-3-1)  Global declarations other than main(), namespace declarations, extern "C" declarations and arithmetic typedefs.
    +       (Rule 7-3-2)  Using the identifier main for functions other than the global one.
    +       (Rule 7-3-3)  Unnamed namespaces in headers.
    +       (Rule 7-3-4)  No using-directives allowed.
    +       (Rule 7-3-6)  using-directives or using declarations (except class and/or block scope using declarations) in header files.
    +       (Rule 8-0-1)  Multiple declarators in a declaration.
    +       (Rule 8-4-1)  Function has variable number of arguments.
    +       (Rule 8-4-2)  Function parameter list differs
    +       (Rule 8-4-4)  Function identifier used without '&' or parenthisized parameter list.
    +       (Rule 8-5-3)  Should initialize either all enum members or only the first.
    +       (Rule 9-5-1)  Unions shall not be used.
    +       (Rule 11-0-1) Non-private data member within a no-POD structure.
    +       (Rule 12-8-2) Public copy constructor in abstract class.
    +       (Rule 14-8-1) Explicit specialization of overloaded function templates.
    +       (Rule 15-1-2) Explicit throw of the Null macro.
    +       (Rule 15-1-3) Empty throw outside of a catch block.
    +       (Rule 15-3-7) Catch handler after catch(...) in a try-catch sequence.
    +       (Rule 16-0-1) Only preprocessor statements and comments before '#include'.
    +       (Rule 16-0-2) '#define/#undef' used within a block.
    +       (Rule 16-0-3) Use of '#undef' is discouraged.
    +       (Rule 16-0-4) Use of function-like macros is discouraged.
    +       (Rule 16-1-1) Non-standard use of 'defined' preprocessor operator.
    +       (Rule 16-2-4) Header file name with non-standard character: .
    +       (Rule 16-3-1) Multiple use of '#' and/or '##' operators in macro definition.
    +       (Rule 17-0-2) Re-use of reserved identifier
    +
    +

    You may disable individual rules to your taste by using the Rule number in an esym option; see Message 960.

    + ]]> +
    + INFO + LINEAR + 1min +
    + + 1961 + L1961: virtual member function 'Symbol' could be made const + + + + INFO + LINEAR + 1min + + + 1962 + L1962: Non-const member function 'Symbol' contains a deep modification. + + + + INFO + LINEAR + 1min + + + 1963 + L1963: Violates MISRA C++ Advisory Rule Name, String + + This message is issued for some violations of the MISRA C++ advisory guidelines. We suggest use of the options file au-misra-cpp.lnt to activate these and other MISRA C++ messages.

    +

    The list of checks made are as follows:

    +
    
    +       (Rule 2-5-1)  Possible digraph used.
    +       (Rule 5-0-2)  Dependence placed on C's operator precedence.
    +       (Rule 5-2-10) Increment or decrement combined with another operator.
    +       (Rule 14-8-2) Mixing template and non-template functions in a viable sets.
    +       (Rule 15-0-2) Throwing a pointer expression.
    +       (Rule 16-2-5) Header file name with non-standard character.
    +       (Rule 16-3-2) No use of '#' or '##'.
    +
    +]]> +
    + INFO + LINEAR + 1min +
    + + 9001 + L9001: Octal constant used + + + + INFO + LINEAR + 1min + + + 9003 + L9003: could define variable 'Symbol' at block scope + + + + INFO + LINEAR + 1min + + + 9004 + L9004: object/function 'Symbol' previously declared + + + + INFO + LINEAR + 1min + + + 9005 + L9005: attempt to cast away const/volatile from a pointer or reference + + + + INFO + LINEAR + 1min + + + 9006 + L9006: 'sizeof' used on expression with side effect + + + + INFO + LINEAR + 1min + + + 9007 + L9007: side effects on right hand of logical operator, 'String' + + + + INFO + LINEAR + 1min + + + 9008 + L9008: comma operator used + + + + INFO + LINEAR + 1min + + + 9009 + L9009: floating point variable used as loop counter + + + + INFO + LINEAR + 1min + + + 9011 + L9011: more than one 'break' terminates loop + + + + INFO + LINEAR + 1min + + + 9012 + L9012: sub-statement should be a compound statement + + + + INFO + LINEAR + 1min + + + 9013 + L9013: no 'else' at end of 'if ... else if' chain + + + + INFO + LINEAR + 1min + + + 9014 + L9014: default missing from switch statement + + + + INFO + LINEAR + 1min + + + 9015 + L9015: macro argument is used both with and without '#/##' and is subject to further replacement + + + + INFO + LINEAR + 1min + + + 9016 + L9016: pointer arithmetic other than array indexing used + + + + INFO + LINEAR + 1min + + + 9017 + L9017: pointer arithmetic by increment or decrement used + + + + INFO + LINEAR + 1min + + + 9018 + L9018: declaration of union type or object of union type, 'Type' + + + + INFO + LINEAR + 1min + + + 9019 + L9019: declaration of 'String' before #include + + + + INFO + LINEAR + 1min + + + 9020 + L9020: header file name with non-standard character 'String' + + + + INFO + LINEAR + 1min + + + 9021 + L9021: use of '#undef' is discouraged: 'String' + + + + INFO + LINEAR + 1min + + + 9022 + L9022: unparenthesized macro parameter in definition of macro 'String' + + + + INFO + LINEAR + 1min + + + 9023 + L9023: Multiple use of '#/##' operators in definition of macro 'String' + + + + INFO + LINEAR + 1min + + + 9024 + L9024: '#/##' operator used in macro 'String' + + + + INFO + LINEAR + 1min + + + 9025 + L9025: More than two pointer indirection levels used for type 'Type' + + + + INFO + LINEAR + 1min + + + 9026 + L9026: Function-like macro, 'String', defined + + + + INFO + LINEAR + 1min + + + 9027 + L9027: Unpermitted operand to operator 'String' + + + + INFO + LINEAR + 1min + + + 9028 + L9028: Unpermitted arithmetic involving an essentially character type + + + + misra + INFO + LINEAR + 1min + + + 9029 + L9029: Mismatched essential type categories for binary operator + + + + misra + INFO + LINEAR + 1min + + + 9030 + L9030: Impermissible cast + + + + misra + INFO + LINEAR + 1min + + + 9031 + L9031: Composite expression assigned to a wider essential type + + + + misra + INFO + LINEAR + 1min + + + 9032 + L9032: Composite expression with smaller essential type than other operand + + + + misra + INFO + LINEAR + 1min + + + 9033 + L9033: Impermissible cast of composite expression + + + + misra + INFO + LINEAR + 1min + + + 9034 + L9034: Expression assigned to a narrower or different essential type + + + + misra + INFO + LINEAR + 1min + + + 9035 + L9035: Variable length array declared + + + + INFO + LINEAR + 1min + + + 9036 + L9036: Conditional expression should have essentially Boolean type + + + + misra + INFO + LINEAR + 1min + + + 9037 + L9037: Conditional of #if does not evaluate to 0 or 1 + + + + INFO + LINEAR + 1min + + + 9038 + L9038: Flexible array member declared + + + + INFO + LINEAR + 1min + + + 9039 + L9039: Prohibited escape sequence usage + + + + INFO + LINEAR + 1min + + + 9041 + L9041: goto 'Symbol' appears in block 'String' which is not nested in block 'String' which contains the label. + + It has been deemed safer by some experts that the block (i.e. compound statement) containing the goto should be the same as or nested within the block containing the label. Thus

    +
    
    +           {  label:  {  goto label;  }  }
    +
    +

    is permitted but

    +
    
    +           {  goto label;  {  label:  }  }
    +
    +

    is not. To assist the programmer, the message refers to the blocks using an identification code (Example: "1.2.1"). This identification scheme is defined as follows.

    +
      +
    • The outer block has an identification of 1.
    • +
    • If a particular block is identified by x then its immediate subblocks, if any, are identified as x.1, x.2, x.3, etc.
    • +
    +

    Thus in the following 'code',

    +
    
    +           {  {  }  { { label: } { } } }
    +
    +

    label: lies in block 1.2.1.

    ]]> +
    + INFO + LINEAR + 1min +
    + + 9042 + L9042: departure from MISRA switch syntax + + + + INFO + LINEAR + 1min + + + 9043 + L9043: static keyword between brackets of array declaration + + + + INFO + LINEAR + 1min + + + 9044 + L9044: function parameter modified + + + + INFO + LINEAR + 1min + + + 9045 + L9045: non-hidden definition of type 'Type' + + + + INFO + LINEAR + 1min + + + 9046 + L9046: Typographical ambiguity with respect to symbol, 'Symbol', Reasons, Location + + + + INFO + LINEAR + 1min + + + 9047 + L9047: FILE pointer dereferenced + + + + INFO + LINEAR + 1min + + + 9048 + L9048: unsigned integer literal without a 'U' suffix + + + + INFO + LINEAR + 1min + + + 9049 + L9049: increment/decrement operation combined with other operation with side-effects + + + + INFO + LINEAR + 1min + + + 9050 + L9050: dependence placed on C/C++ operator precedence + + + + INFO + LINEAR + 1min + + + 9051 + L9051: macro 'Symbol' defined with the same name as a C keyword + + + + INFO + LINEAR + 1min + + + 9052 + L9052: macro 'Symbol' defined with the same name as a C++ keyword + + + + INFO + LINEAR + 1min + + + 9053 + L9053: the shift value is at least the precision of the essential type of the left hand side + + + + INFO + LINEAR + 1min + + + 9054 + L9054: designated initializer used with array of unspecified dimension + + + + INFO + LINEAR + 1min + + + 9055 + L9055: Most closely enclosing compound statement of a case/default is not the body of a switch + + + + INFO + LINEAR + 1min + + + 9056 + L9056: Inline function 'Symbol' defined with storage-class specifier 'String' + + + + INFO + LINEAR + 1min + + + 9057 + L9057: Lowercase L follows 'u' in literal suffix + + + + INFO + LINEAR + 1min + + + 9058 + L9058: tag 'Symbol' (Location) unused outside of typedefs + + + + INFO + LINEAR + 1min + + + 9059 + L9059: C comment contains C++ comment + + + + INFO + LINEAR + 1min + + + 9060 + L9060: trigraph in comment + + + + INFO + LINEAR + 1min + + + 9063 + L9063: no comment or action in else-branch + + + + INFO + LINEAR + 1min + + + 9064 + L9064: goto references earlier label + + + + INFO + LINEAR + 1min + + + 9066 + L9066: C++ comment contains C comment + + + + INFO + LINEAR + 1min + + + 9067 + L9067: array declared without explicit dimension + + + + INFO + LINEAR + 1min + + + 9068 + L9068: partial array initialization + + + + INFO + LINEAR + 1min + + + 9069 + L9069: in initializer for symbol 'Symbol', initializer of type 'Type' needs braces or designator + + + + INFO + LINEAR + 1min + + + 9070 + L9070: recursive function 'Symbol', location Location + + + + INFO + LINEAR + 1min + + + 9071 + L9071: defined macro 'Name' is reserved to the compiler String + + + + INFO + LINEAR + 1min + + + 9072 + L9072: parameter list differs from prior declaration for function 'Symbol' + + + + INFO + LINEAR + 1min + + + 9074 + L9074: conversion between a pointer to function and another type + + + + INFO + LINEAR + 1min + + + 9075 + L9075: external symbol 'Symbol' defined without a prior declaration + + + + INFO + LINEAR + 1min + + + 9076 + L9076: conversion between a pointer to incomplete type and another type + + + + INFO + LINEAR + 1min + + + 9077 + L9077: missing unconditional break from final switch case + + + + INFO + LINEAR + 1min + + + 9078 + L9078: conversion between a pointer and integer type + + + + INFO + LINEAR + 1min + + + 9079 + L9079: conversion from pointer to void to pointer to other type + + + + INFO + LINEAR + 1min + + + 9080 + L9080: integer null pointer constant used + + + + INFO + LINEAR + 1min + + + 9081 + L9081: too few independent cases for switch + + + + INFO + LINEAR + 1min + + + 9082 + L9082: switch statement should either begin or end with default label + + + + INFO + LINEAR + 1min + + + 9083 + L9083: undefined macro 'String' matches an identifier reserved to the compiler + + + + INFO + LINEAR + 1min + + + 9084 + L9084: result of assignment operator used in larger expression + + + + INFO + LINEAR + 1min + + + 9085 + L9085: statement or comment should appear in default case + + + + INFO + LINEAR + 1min + + + 9086 + L9086: include directives should have single arguments + + + + INFO + LINEAR + 1min + + + 9087 + L9087: cast performed between a pointer to object type and a pointer to a different object type + + + + INFO + LINEAR + 1min + + + 9088 + L9088: named signed single-bit bit-field + + + + INFO + LINEAR + 1min + + + 9089 + L9089: potential side-effect in argument to sizeof + + + + INFO + LINEAR + 1min + + + 9090 + L9090: unconditional break missing from switch case + + + + INFO + LINEAR + 1min + + + 9091 + L9091: casting from pointer type to integer type + + + + INFO + LINEAR + 1min + + + 9092 + L9092: casting between a pointer to void and an integral type + + + + INFO + LINEAR + 1min + + + 9102 + L9102: possible digraph, 'String' + + + + INFO + LINEAR + 1min + + + 9104 + L9104: octal escape sequence used + + + + INFO + LINEAR + 1min + + + 9105 + L9105: unsigned octal and hexadecimal literals require a 'U' suffix + + + + INFO + LINEAR + 1min + + + 9106 + L9106: lower case literal suffix, 'String' + + + + INFO + LINEAR + 1min + + + 9107 + L9107: header cannot be included in more than one translation unit because of the definition of symbol 'Symbol' + + + + INFO + LINEAR + 1min + + + 9108 + L9108: function 'Symbol' not declared at file scope + + + + INFO + LINEAR + 1min + + + 9109 + L9109: type 'Symbol' previously declared at location 'Location' + + + + INFO + LINEAR + 1min + + + 9110 + L9110: bit representation of a floating point type used + + + + INFO + LINEAR + 1min + + + 9111 + L9111: boolean expression used with non-permitted operator 'String' + + + + INFO + LINEAR + 1min + + + 9112 + L9112: plain char used with prohibited operator 'String' + + + + INFO + LINEAR + 1min + + + 9113 + L9113: dependence placed on C/C++ operator precedence + + + + INFO + LINEAR + 1min + + + 9114 + L9114: implicit conversion of integer cvalue expression + + + + INFO + LINEAR + 1min + + + 9115 + L9115: implicit conversion from integer to floating point type + + + + INFO + LINEAR + 1min + + + 9116 + L9116: implicit conversion of floating point cvalue expression + + + + INFO + LINEAR + 1min + + + 9117 + L9117: implicit conversion changes signedness + + + + INFO + LINEAR + 1min + + + 9118 + L9118: implicit conversion from floating point to integer type + + + + INFO + LINEAR + 1min + + + 9119 + L9119: implicit conversion of integer to smaller type + + + + INFO + LINEAR + 1min + + + 9120 + L9120: implicit conversion of floating point to smaller type + + + + INFO + LINEAR + 1min + + + 9121 + L9121: cast of cvalue expression from integer to floating point type + + + + INFO + LINEAR + 1min + + + 9122 + L9122: cast of cvalue expression from floating point to integer type + + + + INFO + LINEAR + 1min + + + 9123 + L9123: cast of integer cvalue expression to larger type + + + + INFO + LINEAR + 1min + + + 9124 + L9124: cast of floating point cvalue expression to larger type + + + + INFO + LINEAR + 1min + + + 9125 + L9125: cast of cvalue expression changes signedness + + + + INFO + LINEAR + 1min + + + 9126 + L9126: operators '~' and '<<' require recasting to underlying type for sub-integers + + + + INFO + LINEAR + 1min + + + 9127 + L9127: disallowed use of non-character value String + + + + INFO + LINEAR + 1min + + + 9128 + L9128: plain char mixed with type other than plain char + + + + INFO + LINEAR + 1min + + + 9129 + L9129: disallowed use of non-numeric value String + + + + INFO + LINEAR + 1min + + + 9130 + L9130: bitwise operator 'String' applied to signed underlying type + + + + INFO + LINEAR + 1min + + + 9131 + L9131: non-postfix expression used with logical operator + + + + INFO + LINEAR + 1min + + + 9132 + L9132: array type passed to function expecting a pointer + + + + INFO + LINEAR + 1min + + + 9133 + L9133: boolean expression required for operator 'String' + + + + INFO + LINEAR + 1min + + + 9134 + L9134: prohibited operator 'String' applied to unsigned underlying type + + + + INFO + LINEAR + 1min + + + 9135 + L9135: unary operator & overloaded + + + + INFO + LINEAR + 1min + + + 9136 + L9136: out of bounds value for right hand side of shift operator + + + + INFO + LINEAR + 1min + + + 9137 + L9137: floating point test for equality or inequality + + + + INFO + LINEAR + 1min + + + 9138 + L9138: null statement not in line by itself + + + + INFO + LINEAR + 1min + + + 9139 + L9139: case label follows default in switch statement + + + + INFO + LINEAR + 1min + + + 9140 + L9140: continue statement detected + + + + INFO + LINEAR + 1min + + + 9141 + L9141: global declaration of symbol 'Symbol' + + + + INFO + LINEAR + 1min + + + 9142 + L9142: non-global function, main, declared + + + + INFO + LINEAR + 1min + + + 9144 + L9144: using-directive used + + + + INFO + LINEAR + 1min + + + 9145 + L9145: using-directive/declaration in header file + + + + INFO + LINEAR + 1min + + + 9146 + L9146: multiple declarators in a declaration + + + + INFO + LINEAR + 1min + + + 9147 + L9147: function identifier 'Symbol' used without '&' or parenthesized parameter list + + + + INFO + LINEAR + 1min + + + 9148 + L9148: '=' should initialize either all enum members or only the first for enumerator 'Symbol' + + + + INFO + LINEAR + 1min + + + 9149 + L9149: bit field must be explicitly signed integer, unsigned integer, or bool + + + + INFO + LINEAR + 1min + + + 9150 + L9150: non-private data member 'Symbol' within a non-POD structure + + + + INFO + LINEAR + 1min + + + 9151 + L9151: public copy assignment operator in abstract class + + + + INFO + LINEAR + 1min + + + 9152 + L9152: explicit specialization of overloaded function templates 'String' and 'String' + + + + INFO + LINEAR + 1min + + + 9153 + L9153: viable set contains both function 'Symbol' and template 'Symbol' + + + + INFO + LINEAR + 1min + + + 9154 + L9154: pointer expression thrown + + + + INFO + LINEAR + 1min + + + 9156 + L9156: empty throw outside of a catch block + + + + INFO + LINEAR + 1min + + + 9158 + L9158: '#define' used within a block for macro 'Name' + + + + INFO + LINEAR + 1min + + + 9159 + L9159: '#undef' used within a block for macro 'Name' + + + + INFO + LINEAR + 1min + + + 9160 + L9160: all preprocessing directives must be valid + + + + INFO + LINEAR + 1min + + + 9162 + L9162: use of 'String' at global scope + + + + INFO + LINEAR + 1min + + + 9163 + L9163: increment/decrement operator combined with another operator + + + + INFO + LINEAR + 1min + + + 9165 + L9165: function 'Symbol' defined with a variable number of arguments + + + + INFO + LINEAR + 1min + + + 9166 + L9166: function parameter list differs from prior declaration/overloaded function + + + + INFO + LINEAR + 1min + + + M1.1 + M1.1: Strict ANSI checking (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M1.2 + M1.2: No undefined or unspecified behavior (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M1.4 + M1.4: Identifier names must be unique in first 31 characters (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M2.1 + M2.1: No in-line assembly language (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M2.2 + M2.2: Do not use // comments (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M2.3 + M2.3: No nested comments (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M2.4 + M2.4: No nested comments (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M3.4 + M3.4: Report on pragma use (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M3.6 + M3.6: libraries should conform to MISRA standard (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M4.1 + M4.1: do not use non-ANSI escape sequences (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M4.2 + M4.2: do not use trigraphs (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M5.1 + M5.1: identifier names must be unique in first 31 characters (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M5.2 + M5.2: complain about name hiding (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M5.3 + M5.3: Do not reuse typedef names (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M5.4 + M5.4: Do not reuse tag names (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M5.5 + M5.5: Complain about name hiding (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M5.6 + M5.6: Complain about name hiding (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M5.7 + M5.7: Do not reuse identifier names (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M6.1 + M6.1: disallowed use of plain char (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M6.2 + M6.2: disallowed use of plain char (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M6.3 + M6.3: do not use modifiers (int, char, etc) outside of a typedef (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M6.4 + M6.4: bitfield type should be unsigned int or signed int (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M6.5 + M6.5: small bit field should be unsigned int (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M7.1 + M7.1: Octal constant used (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M8.1 + M8.1: use function prototypes (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M8.2 + M8.2: function has no explicit type (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M8.3 + M8.3: declaration and definition should have identical parameter types (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M8.4 + M8.4: symbol redeclared (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M8.5 + M8.5: No definitions of objects or function in header files (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M8.6 + M8.6: Function not declared at file scope (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M8.7 + M8.7: could define variable at block scope (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M8.8 + M8.8: object/function previously declared (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M8.9 + M8.9: symbol previously defined (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M8.10 + M8.10: symbol could be made static (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M8.11 + M8.11: symbol previously used as static (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M8.12 + M8.12: array has 0 dimension (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M9.1 + M9.1: symbol not initialized (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M9.2 + M9.2: omitted braces within an initializer (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M9.3 + M9.3: Should initialize either all enum members or only the first (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M10.1 + M10.1: loss of precision / possible loss of fraction (MISRA C) + + +
  • it is not a conversion to a wider integer type of the same signedness, or
  • +
  • the expression is complex, or
  • +
  • the expression is not constant and is a function argument, or
  • +
  • the expression is not constant and is a return expression
  • + + + ]]> +
    + misra + INFO + LINEAR + 1min +
    + + M10.2 + M10.2: prototype coercion (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M10.3 + M10.3: prohibited cast of complex integer expression (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M10.4 + M10.4: prohibited cast of complex floating point (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M10.5 + M10.5: recasting required for << and - operators (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M10.6 + M10.6: unsigned integer literals require a 'U' suffix (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M11.1 + M11.1: cast pointer to non-pointer (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M11.2 + M11.2: cast pointer to non-pointer (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M11.3 + M11.3: cast pointer to non-pointer (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M11.4 + M11.4: cast pointer to pointer (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M11.5 + M11.5: attempt to cast away const/volatile from a pointer or reference (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M12.1 + M12.1: dependence on C's operator precedence (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M12.2 + M12.2: order of evaluation (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M12.3 + M12.3: 'sizeof' used on expressions with side effect (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M12.4 + M12.4: Side effects on right hand side of logical operator (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M12.5 + M12.5: non-primary expression used with logical operator (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M12.6 + M12.6: boolean expression required for logical operator (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M12.7 + M12.7: Bitwise operator applied to signed underlying type (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M12.8 + M12.8: excessive shift value (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M12.9 + M12.9: Prohibited operator applied to unsigned underlying type (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M12.10 + M12.10: Comma operator used outside of 'for' expression (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M12.11 + M12.11: overflow in computing constant (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M12.12 + M12.12: bit representation of a floating point type used (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M12.13 + M12.13: increment or decrement combined with another operator (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M13.1 + M13.1: boolean test of assignment (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M13.2 + M13.2: boolean test of assignment (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M13.3 + M13.3: testing floats for equality (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M13.4 + M13.4: Floating point variable used as loop counter (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M13.5 + M13.5: "for" loop expressions do not match (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M13.6 + M13.6: detect loop variables modified within the loop (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M13.7 + M13.7: constant value Boolean (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M14.1 + M14.1: unreachable code (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M14.2 + M14.2: non-null statement has no effect (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M14.3 + M14.3: Null statement not in line by itself (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M14.4 + M14.4: do not use goto (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M14.5 + M14.5: continue statement should not be used (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M14.6 + M14.6: More than one 'break' terminates loop (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M14.7 + M14.7: return before function end (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M14.8 + M14.8: use braces around body of switch, else, for, do, while (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M14.9 + M14.9: use braces around body of if, else, else if (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M14.10 + M14.10: No 'else' at end of 'if ... else if' chain (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M15.0 + M15.0: use MISRA switch syntax (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M15.1 + M15.1: need a switch (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M15.2 + M15.2: use break to terminate case (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M15.3 + M15.3: case label follows default in switch statement (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M15.4 + M15.4: Boolean value in switch expression (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M15.5 + M15.5: switch does not have a case (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M16.1 + M16.1: Function has variable number of arguments (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M16.2 + M16.2: do not use recursive functions (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M16.3 + M16.3: use identifiers for all parameters in a prototype (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M16.4 + M16.4: function parameter list differs from prior declaration (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M16.5 + M16.5: function declaration is missing type info (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M16.6 + M16.6: too few or too many arguments for prototype (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M16.7 + M16.7: use const on parameters where appropriate (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M16.8 + M16.8: function should return a value (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M16.9 + M16.9: function identifier used without "&" or parenthesized parameter list (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M16.10 + M16.10: ignoring return value of function (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M17.1 + M17.1: pointer arithmetic used on non-array (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M17.2 + M17.2: relational or subtract operator applied to pointers (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M17.3 + M17.3: relational or subtract operator applied to pointers (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M17.4 + M17.4: pointer arithmetic by increment or decrement (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M17.5 + M17.5: more than two pointer indirection levels used (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M17.6 + M17.6: assigning address of auto to outer scope symbol or to static (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M18.1 + M18.1: vacuous type for variable (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M18.4 + M18.4: Unions shall not be used,MISRA Rule 18.4 + + + + misra + INFO + LINEAR + 1min + + + M19.1 + M19.1: only preprocessor statements and comments before '#include' (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M19.2 + M19.2: header file name with non-standard character (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M19.3 + M19.3: need < or " after #include (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M19.4 + M19.4: expression-like macro not parenthesized (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M19.5 + M19.5: '#define/#undef' used within a block (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M19.6 + M19.6: Use of '#undef' prohibited (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M19.7 + M19.7: use function instead of function-like macro (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M19.8 + M19.8: syntax error in call of macro (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M19.9 + M19.9: preprocessor directives in macro invocation (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M19.10 + M19.10: expression-like macro not parenthesized (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M19.11 + M19.11: undefined preprocessor variable (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M19.12 + M19.12: Multiple use of '#' and/or '##' operators in macro definition (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M19.13 + M19.13: do not use of # or ## operators in macro definition (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M19.14 + M19.14: Non-standard use of 'defined' preprocessor operator (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M19.15 + M19.15: repeated include file (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M19.16 + M19.16: #endif or #else is not followed by EOL (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M19.17 + M19.17: #if not closed within file (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M20.1 + M20.1: do not redefine standard functions (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M20.2 + M20.2: re-use of reserved identifier (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M20.3 + M20.3: calls to standard library functions are checked (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M20.4 + M20.4: do not use dynamic heap allocation (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M20.5 + M20.5: do not use errno (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M20.6 + M20.6: do not use offsetof (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M20.7 + M20.7: do not use longjmp, setjmp (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M20.8 + M20.8: do not use signal, raise (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M20.9 + M20.9: do not use stdio.h (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M20.10 + M20.10: do not use atof, atio, atoll (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M20.11 + M20.11: do not use abort, exit, getenv, system (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M20.12 + M20.12: do not use time, strftime, clock, difftime, mktime (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M21.1 + M21.1: static analysis by using PC-lint/FlexeLint (MISRA C) + + + + misra + INFO + LINEAR + 1min + + + M0-1-1 + M0-1-1: Unreachable (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M0-1-2 + M0-1-2: infeasible path (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M0-1-3 + M0-1-3: unused variable (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M0-1-4 + M0-1-4: symbol not referenced or accessed (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M0-1-5 + M0-1-5: unused type declaration (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M0-1-6 + M0-1-6: last value assigned to variable not used (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M0-1-7 + M0-1-7: ignoring return value of function (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M0-1-8 + M0-1-8: Void return type for function without external side-effects (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M0-1-9 + M0-1-9: dead(redundant) code (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M0-1-10 + M0-1-10: unused function (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M0-1-11 + M0-1-11: unused function parameter (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M0-1-12 + M0-1-12: unused function parameter (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M0-2-1 + M0-2-1: unions shall not be used (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M0-3-2 + M0-3-2: ignoring return value of function (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M1-0-1 + M1-0-1: strict ANSI / ISO (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M2-3-1 + M2-3-1: do not use trigraphs (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M2-5-1 + M2-5-1: possible digraph used (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M2-7-1 + M2-7-1: do not nest comments (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M2-10-1 + M2-10-1: suspicious constant (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M2-10-2 + M2-10-2: report on name hiding (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M2-10-6 + M2-10-6: symbol redeclared (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M2-13-1 + M2-13-1: non-ANSI escape sequence (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M2-13-2 + M2-13-2: octal constant or escape sequence used (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M2-13-3 + M2-13-3: unsigned octal & hexadecimal literals require a ‘U’ suffix (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M2-13-4 + M2-13-4: Lower case literal suffix (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M2-13-5 + M2-13-5: mixing narrow and wide string literals in concatenation (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M3-1-1 + M3-1-1: Object/function definitions in headers (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M3-1-2 + M3-1-2: Function not declared at file scope (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M3-1-3 + M3-1-3: Array has dimension 0 (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M3-2-1 + M3-2-1: Symbol is redeclared or redefined (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M3-2-2 + M3-2-2: Symbol is redeclared or redefined (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M3-2-3 + M3-2-3: Object/function type previously declared (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M3-2-4 + M3-2-4: Symbol is redeclared or redefined (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M3-3-1 + M3-3-1: Header declaration for symbol could be moved from header to module/symbol could be made static (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M3-3-2 + M3-3-2: Static symbol not declared static (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M3-9-2 + M3-9-2: Type or modifier used outside of typedef (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M3-9-3 + M3-9-3: Bit representation of a floating point type used (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M4-5-1 + M4-5-1: Boolean expression used with non-permitted operator (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M4-5-3 + M4-5-3: Plain char used with prohibited operator (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M4-10-2 + M4-10-2: Implicit conversion from 0 to pointer (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M5-0-1 + M5-0-1: Order of evaluation (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M5-0-2 + M5-0-2: Dependence placed on C's operator precedence (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M5-0-3 + M5-0-3: Implicit conversion of cvalue (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M5-0-4 + M5-0-4: Implicit conversion changes signedness (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M5-0-5 + M5-0-5: Implicit conversion between integer and floating point types (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M5-0-6 + M5-0-6: Implicit conversion to smaller type (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M5-0-7 + M5-0-7: Cast of cvalue between integer and floating point types (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M5-0-8 + M5-0-8: Cast of cvalue to larger type (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M5-0-9 + M5-0-9: Cast of cvalue changes signedness (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M5-0-10 + M5-0-10: Recasting required for operators '~' and '<<' (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M5-0-11 + M5-0-11: Type other than plain char (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M5-0-12 + M5-0-12: Disallowed use of non-numeric value (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M5-0-13 + M5-0-13: Implicit conversion (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M5-0-14 + M5-0-14: Implicit conversion (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M5-0-15 + M5-0-15: pointer arithmetic other than array indexing used (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M5-0-16 + M5-0-16: Out-of-bounds pointer (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M5-0-17 + M5-0-17: Subtract operator applied to pointers (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M5-0-18 + M5-0-18: Relational operator applied to pointers (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M5-0-19 + M5-0-19: More than two pointer indirection levels used (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M5-0-21 + M5-0-21: Bitwise operator applied to signed underlying type (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M5-2-1 + M5-2-1: non-postfix expression used with logical operator (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M5-2-2 + M5-2-2: use dynamic_cast to downcast polymorphic type (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M5-2-4 + M5-2-4: C-style cast (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M5-2-5 + M5-2-5: attempt to cast away const/volatile from a pointer or reference (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M5-2-6 + M5-2-6: Suspicious cast / unusual pointer cast (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M5-2-7 + M5-2-7: Pointer conversion to an unrelated type (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M5-2-8 + M5-2-8: Cast from integer or pointer to void to a pointer to an object (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M5-2-9 + M5-2-9: Cast from pointer to integral type (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M5-2-10 + M5-2-10: Increment or decrement combined with another operator (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M5-2-11 + M5-2-11: overloading special operators – ',' '&&' '||' (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M5-2-12 + M5-2-12: Array-pointer decay when passing the array to a function (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M5-3-1 + M5-3-1: boolean expression required for operator: '||'; the -strong(B,...) option can help provide Boolean-by-enforcement (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M5-3-2 + M5-3-2: Prohibited operator applied to unsigned underlying type (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M5-3-3 + M5-3-3: Overloading unary & (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M5-3-4 + M5-3-4: 'sizeof' used on expressions with side effect (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M5-8-1 + M5-8-1: excessive shift value (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M5-14-1 + M5-14-1: Side effects on right hand side of logical operator (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M5-18-1 + M5-18-1: Comma operator used (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M5-19-1 + M5-19-1: Overflow in computing constant (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M6-2-1 + M6-2-1: Assignment operator used in sub-expression (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M6-2-2 + M6-2-2: Testing floats for equality (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M6-2-3 + M6-2-3: Null statement not in line by itself (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M6-3-1 + M6-3-1: Left brace expected for if, else, for, do, switch and while (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M6-4-1 + M6-4-1: Left brace expected for if, else, for, do, switch and while (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M6-4-2 + M6-4-2: No 'else' at end of 'if ... else if' chain (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M6-4-5 + M6-4-5: Control flows into case/default (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M6-4-6 + M6-4-6: Switch statement has no default or case follows default (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M6-4-7 + M6-4-7: Boolean value in switch expression (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M6-4-8 + M6-4-8: Switch does not have a case (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M6-5-3 + M6-5-3: Reuse of for loop variable could cause chaos (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M6-6-2 + M6-6-2: Gotos jumping to an earlier point in the code (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M6-6-3 + M6-6-3: continue statement should not be used (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M6-6-4 + M6-6-4: More than one 'break' terminates loop (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M6-6-5 + M6-6-5: Return before function end (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M7-1-1 + M7-1-1: Use const on parameters where appropriate (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M7-1-2 + M7-1-2: Use const on parameters where appropriate (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M7-3-1 + M7-3-1: Global declarations other than main(), namespace declarations, extern "C" declarations and arithmetic typedefs (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M7-3-2 + M7-3-2: Using the identifier main for functions other than the global one (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M7-3-3 + M7-3-3: Unnamed namespaces in headers (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M7-3-4 + M7-3-4: No using-directives allowed (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M7-3-6 + M7-3-6: Using-directives or using declarations (except class and/or block scope using declarations) in header files (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M7-4-2 + M7-4-2: Only use the asm declaration to introduce assembly code (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M7-5-1 + M7-5-1: Returning address of auto variable (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M7-5-2 + M7-5-2: Assigning address of auto to static (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M7-5-3 + M7-5-3: Returning address of reference to a const parameter address of reference parameter transferred outside of function (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M7-5-4 + M7-5-4: Worst case function for stack usage (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M8-0-1 + M8-0-1: Multiple declarators in a declaration (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M8-3-1 + M8-3-1: Virtual function has default parameter (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M8-4-1 + M8-4-1: Function has variable number of arguments (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M8-4-2 + M8-4-2: Function parameter list differs from prior declaration (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M8-4-3 + M8-4-3: Function should return a value (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M8-4-4 + M8-4-4: Function parameter list differs from prior declaration (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M8-5-1 + M8-5-1: Symbol not initialized (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M8-5-2 + M8-5-2: Omitted braces within an initializer (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M8-5-3 + M8-5-3: Should initialize either all enum members or only the first (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M9-3-1 + M9-3-1: Const member function anomaly (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M9-3-2 + M9-3-2: Member function returns non-const address (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M9-3-3 + M9-3-3: Member function could be made const (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M9-5-1 + M9-5-1: Unions shall not be used (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M9-6-2 + M9-6-2: Bit field type should be int (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M9-6-3 + M9-6-3: Bit field type should be int (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M9-6-4 + M9-6-4: Small bit field is signed rather than unsigned (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M10-1-1 + M10-1-1: Base class need not be virtual (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M10-1-3 + M10-1-3: Non-virtual base class included twice in class (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M10-3-2 + M10-3-2: 'virtual' assumed for function (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M11-0-1 + M11-0-1: Non-private data member within a non-POD structure (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M12-1-1 + M12-1-1: Call to virtual function within a constructor or destructor (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M12-1-2 + M12-1-2: Symbol did not appear in constructor initializer list (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M12-8-1 + M12-8-1: Constructor access global data (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M12-8-2 + M12-8-2: Public copy constructor in abstract class (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M14-5-1 + M14-5-1: Generic function template associated with type (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M14-5-2 + M14-5-2: Template constructor cannot be a copy constructor (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M14-5-3 + M14-5-3: Operator =() for class is not assignment operator (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M14-6-1 + M14-6-1: Unqualified name subject to misinterpretation (MISRA C++) + + ]]> + + misra + INFO + LINEAR + 1min + + + M14-7-1 + M14-7-1: Template was defined but not instantiated (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M14-7-3 + M14-7-3: Specialization occurs in different file than template (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M14-8-1 + M14-8-1: Explicit specialization of overloaded function templates (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M14-8-2 + M14-8-2: Mixing template and non-template functions in a viable set (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M15-0-2 + M15-0-2: Throwing a pointer expression (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M15-0-3 + M15-0-3: Case/default within loop; may have been misplaced (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M15-1-2 + M15-1-2: Explicit throw of the NULL macro (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M15-1-3 + M15-1-3: Empty throw outside of a catch block (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M15-3-1 + M15-3-1: Exception thrown within destructor (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M15-3-4 + M15-3-4: Uncaught exception not on throw-list (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M15-3-5 + M15-3-5: Catch parameter is not a reference (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M15-3-7 + M15-3-7: Catch handler after catch(...) in a try-catch sequence (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M15-4-1 + M15-4-1: Exception specification conflict (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M15-5-1 + M15-5-1: Exception thrown within destructor (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M15-5-2 + M15-5-2: Exception not in throw-list of function (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M15-5-3 + M15-5-3: Exception thrown within destructor / uncaught exception not on throw-list (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M16-0-1 + M16-0-1: Only preprocessor statements and comments before '#include' (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M16-0-2 + M16-0-2: '#define/#undef' used within a block (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M16-0-3 + M16-0-3: Use of '#undef' is discouraged (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M16-0-4 + M16-0-4: Use of function-like macros is discouraged (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M16-0-5 + M16-0-5: Apparent preprocessor directive in macro (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M16-0-6 + M16-0-6: Unparenthesized parameter in macro is passed an expression (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M16-0-7 + M16-0-7: Undefined preprocessor variable (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M16-0-8 + M16-0-8: Unrecognized name after # / endif or else not followed by EOL (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M16-1-1 + M16-1-1: Non-standard use of 'defined' preprocessor operator (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M16-1-2 + M16-1-2: #if not closed off within file (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M16-2-2 + M16-2-2: Macro could become const variable (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M16-2-3 + M16-2-3: Header file lacks standard include guard (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M16-2-4 + M16-2-4: Header file name with non-standard character (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M16-2-5 + M16-2-5: header file name with non-standard character (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M16-2-6 + M16-2-6: need &< or " after #include (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M16-3-1 + M16-3-1: Multiple use of '#' and/or '##' operators in macro definition/FlexeLint (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M16-3-2 + M16-3-2: no use of '#' or '##' (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M17-0-1 + M17-0-1: complain about #define standard functions (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M17-0-2 + M17-0-2: Re-use of C++ identifier pattern (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M17-0-4 + M17-0-4: Use of +elib options to lint library code (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M17-0-5 + M17-0-5: Do not use setjmp and longjmp (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M18-0-1 + M18-0-1: Do not use C library (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M18-0-2 + M18-0-2: Do not use atof, atoi, atol (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M18-0-3 + M18-0-3: Do not use abort, exit, getenv, system (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M18-0-4 + M18-0-4: Do not use functions in ctime header (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M18-0-5 + M18-0-5: Do not use inbounded functions in cstring header (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M18-2-1 + M18-2-1: Do not use offsetof (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M18-4-1 + M18-4-1: Do not use dynamic heap memory allocation functions (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M18-7-1 + M18-7-1: Do not use csignal functions (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M19-3-1 + M19-3-1: Do not use errno (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M27-0-1 + M27-0-1: Do not use cstdio functions (MISRA C++) + + + + misra + INFO + LINEAR + 1min + + + M2012-1.1 + M2012-1.1: Violations of the standard C (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-1.2 + M2012-1.2: Language extensions (MISRA C 2012) + + + + misra-c2012 + LINEAR + 1min + + + M2012-1.3 + M2012-1.3: Unspecified behaviour (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-2.1 + M2012-2.1: Unreachable code (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-2.2 + M2012-2.2: Dead code (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-2.3 + M2012-2.3: Unused type declarations (MISRA C 2012) + + + + misra-c2012 + LINEAR + 1min + + + M2012-2.4 + M2012-2.4: Unused tag declarations (MISRA C 2012) + + + + misra-c2012 + LINEAR + 1min + + + M2012-2.5 + M2012-2.5: Unused macro declarations (MISRA C 2012) + + + + misra-c2012 + LINEAR + 1min + + + M2012-2.6 + M2012-2.6: Unused label declarations (MISRA C 2012) + + + + misra-c2012 + LINEAR + 1min + + + M2012-2.7 + M2012-2.7: Unused parameters in functions (MISRA C 2012) + + + + misra-c2012 + LINEAR + 1min + + + M2012-3.1 + M2012-3.1: /* or // used within a comment (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-3.2 + M2012-3.2: Line-splicing in // comment (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-4.1 + M2012-4.1: Escape sequences not terminated (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-4.2 + M2012-4.2: Trigraphs (MISRA C 2012) + + + + misra-c2012 + LINEAR + 1min + + + M2012-5.1 + M2012-5.1: Indistinct external identifiers (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-5.2 + M2012-5.2: Indistinct identifiers in same scope (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-5.3 + M2012-5.3: Identifier hiding other identifier (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-5.4 + M2012-5.4: Indistinct macro identifier (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-5.5 + M2012-5.5: Identifiers indistinct from macro names (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-5.6 + M2012-5.6: A typedef identifier not unique (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-5.7 + M2012-5.7: Tag name identifier not unique (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-5.8 + M2012-5.8: Identifiers with external linkage not unique (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-5.9 + M2012-5.9: Identifiers with internal linkage not unique (MISRA C 2012) + + + + misra-c2012 + LINEAR + 1min + + + M2012-6.1 + M2012-6.1: Bit-fields have not appropriate type (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-6.2 + M2012-6.2: Single-bit is signed type (MISRA C 2012) + + + + misra-c2012 + LINEAR + 1min + + + M2012-7.1 + M2012-7.1: Octal constants (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-7.2 + M2012-7.2: Unsigned constant integer required a 'U' or 'u' (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-7.3 + M2012-7.3: 'l' used in a literal suffix (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-7.4 + M2012-7.4: String literal assigned to wrong object (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-8.1 + M2012-8.1: Types not explicitly specified (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-8.2 + M2012-8.2: Function prototype missing or incomplete (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-8.3 + M2012-8.3: Different declaration of object function (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-8.4 + M2012-8.4: Non compatible declaration with external linkage (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-8.5 + M2012-8.5: An external element declared in several files (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-8.6 + M2012-8.6: Symbol is redeclared or redefined (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-8.7 + M2012-8.7: Functions or objects defined with external linkage and is referenced in only one translation unit (MISRA C 2012) + + + + misra-c2012 + LINEAR + 1min + + + M2012-8.8 + M2012-8.8: Storage class of symbol assumed static (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-8.9 + M2012-8.9: Object define outside of block for single function usage (MISRA C 2012) + + + + misra-c2012 + LINEAR + 1min + + + M2012-8.10 + M2012-8.10: Inline function defined without a storage-class specifier (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-8.11 + M2012-8.11: Externale array without explicit size (MISRA C 2012) + + + + misra-c2012 + LINEAR + 1min + + + M2012-8.12 + M2012-8.12: Element of enum whithout unique value (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-8.13 + M2012-8.13: Pointer parameter could be declared as pointing to const (MISRA C 2012) + + + + misra-c2012 + LINEAR + 1min + + + M2012-8.14 + M2012-8.14: Restrict type used (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-9.1 + M2012-9.1: Symbol read before been set (MISRA C 2012) + + + + misra-c2012 + BLOCKER + LINEAR + 1min + + + M2012-9.2 + M2012-9.2: Not initialized in braces (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-9.3 + M2012-9.3: Init of array not complete (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-9.4 + M2012-9.4: Element initialized more than once (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-9.5 + M2012-9.5: Size of the array not specified explicitly (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-10.1 + M2012-10.1: Inapropriate essential type (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-10.2 + M2012-10.2: Inapropriate ussage of character type in operation (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-10.3 + M2012-10.3: Assignation of a narrower essential type (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-10.4 + M2012-10.4: Operation with different type category (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-10.5 + M2012-10.5: Cast to an inappropriate type (MISRA C 2012) + + + + misra-c2012 + LINEAR + 1min + + + M2012-10.6 + M2012-10.6: Assignation to object with wider essential type (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-10.7 + M2012-10.7: Implicit conversion in arithmetic conversion (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-10.8 + M2012-10.8: Type conversion of composit expression (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-11.1 + M2012-11.1: Convertion between pointer to function and other type (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-11.2 + M2012-11.2: Conversion between incomplete pointer type and other type (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-11.3 + M2012-11.3: Cast between 2 pointers with different type (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-11.4 + M2012-11.4: Conversion between pointer to object and pointer to integer (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-11.5 + M2012-11.5: Conversion between pointer to void and pointer to object (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-11.6 + M2012-11.6: Conversion between pointer to void and arithmetic type (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-11.7 + M2012-11.7: Conversion between pointer to object and non-integer arithmetic type (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-11.8 + M2012-11.8: Pointer remove qualification to object (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-11.9 + M2012-11.9: Macro NULL used inappropriately (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-12.1 + M2012-12.1: Precedence of expression non explicit (MISRA C 2012) + + + + misra-c2012 + LINEAR + 1min + + + M2012-12.2 + M2012-12.2: The shift value is at least the precision of the essential type of the left hand side (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-12.3 + M2012-12.3: Usage of coma operator (MISRA C 2012) + + + + misra-c2012 + LINEAR + 1min + + + M2012-12.4 + M2012-12.4: Overflow in computing constant for operation (MISRA C 2012) + + + + misra-c2012 + LINEAR + 1min + + + M2012-12.5 + M2012-12.5: The parameter of the sizeof call is invalid (MISRA C 2012) + + + + misra-c2012 + LINEAR + 1min + + + M2012-13.1 + M2012-13.1: Initializer list with persistent side effect (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-13.2 + M2012-13.2: Different value of expression and persistent side effect (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-13.3 + M2012-13.3: Unexpected side effect for (++) or (--) operation (MISRA C 2012) + + + + misra-c2012 + LINEAR + 1min + + + M2012-13.4 + M2012-13.4: Utilisation of assignment operator result (MISRA C 2012) + + + + misra-c2012 + LINEAR + 1min + + + M2012-13.5 + M2012-13.5: Side effects on right hand of logical operator (MISRA C 2012) + + + + misra-c2012 + LINEAR + 1min + + + M2012-13.6 + M2012-13.6: Sizeof used on expression with side effect (MISRA C 2012) + + + + misra-c2012 + BLOCKER + LINEAR + 1min + + + M2012-14.1 + M2012-14.1: Use of floating type in a loop (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-14.2 + M2012-14.2: For loop not correct (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-14.3 + M2012-14.3: Always evaluate to same value (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-14.4 + M2012-14.4: Usage of non boolean control expression in if statement (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-15.1 + M2012-15.1: Usage of Goto (MISRA C 2012) + + + + misra-c2012 + LINEAR + 1min + + + M2012-15.2 + M2012-15.2: Goto jump outside of autorized position (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-15.3 + M2012-15.3: Label declared outside of goto block or enclosing block (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-15.4 + M2012-15.4: More than one goto or break to terminate operation (MISRA C 2012) + + + + misra-c2012 + LINEAR + 1min + + + M2012-15.5 + M2012-15.5: More than one end point to exit function (MISRA C 2012) + + + + misra-c2012 + LINEAR + 1min + + + M2012-15.6 + M2012-15.6: Sub-statement should be a compound statement (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-15.7 + M2012-15.7: Else statment missing (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-16.1 + M2012-16.1: Switch statement not well formed (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-16.2 + M2012-16.2: Most closely-enclosing compound statement is not the body of a switch statement (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-16.3 + M2012-16.3: Break missing to terminate case (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-16.4 + M2012-16.4: Default missing in the switch-case (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-16.5 + M2012-16.5: Default not in first or salt label (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-16.6 + M2012-16.6: Switch statment does not have enough case (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-16.7 + M2012-16.7: Usage of boolean type for switch statment (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-17.1 + M2012-17.1: Usage of stdarg.h is forbidden (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-17.2 + M2012-17.2: Function calling itself (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-17.3 + M2012-17.3: Function declared implicitly (MISRA C 2012) + + + + misra-c2012 + BLOCKER + LINEAR + 1min + + + M2012-17.4 + M2012-17.4: Function should return a value (MISRA C 2012) + + + + misra-c2012 + BLOCKER + LINEAR + 1min + + + M2012-17.5 + M2012-17.5: Array has wrong size in function argument (MISRA C 2012) + + + + misra-c2012 + LINEAR + 1min + + + M2012-17.6 + M2012-17.6: Usage of static parameter of an array between [] (MISRA C 2012) + + + + misra-c2012 + BLOCKER + LINEAR + 1min + + + M2012-17.7 + M2012-17.7: Velue returned by function not used (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-17.8 + M2012-17.8: Modification of function parameter (MISRA C 2012) + + + + misra-c2012 + LINEAR + 1min + + + M2012-18.1 + M2012-18.1: Likely creation of out-of-bounds pointer (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-18.2 + M2012-18.2: Substraction between different array with pointers (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-18.3 + M2012-18.3: Relational or subtract operator applied to pointers (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-18.4 + M2012-18.4: Increment or subtract operator applied tp pointer (MISRA C 2012) + + + + misra-c2012 + LINEAR + 1min + + + M2012-18.5 + M2012-18.5: More than 2 level of pointer (MISRA C 2012) + + + + misra-c2012 + LINEAR + 1min + + + M2012-18.6 + M2012-18.6: Address of object with automatic storage affected to non persistant object (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-18.7 + M2012-18.7: Usage of flexible array (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-18.8 + M2012-18.8: Variable-length length arrya (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-19.1 + M2012-19.1: Assignation or copy to an overlapping object (MISRA C 2012) + + + + misra-c2012 + BLOCKER + LINEAR + 1min + + + M2012-19.2 + M2012-19.2: Usage of Union Keyword (MISRA C 2012) + + + + misra-c2012 + LINEAR + 1min + + + M2012-20.1 + M2012-20.1: #include misplaced (MISRA C 2012) + + + + misra-c2012 + LINEAR + 1min + + + M2012-20.2 + M2012-20.2: Wrong character used in header file name (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-20.3 + M2012-20.3: #include followed by wrong sequence (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-20.4 + M2012-20.4: Macro name defined with a keyword (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-20.5 + M2012-20.5: Usage of #undef (MISRA C 2012) + + + + misra-c2012 + LINEAR + 1min + + + M2012-20.6 + M2012-20.6: Apparent preprocessor directive in invocation of macro (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-20.7 + M2012-20.7: Unparenthesized parameter in macro (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-20.8 + M2012-20.8: Conditional of #if does not evaluate to 0 or 1 (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-20.9 + M2012-20.9: Undefined preprocessor variable (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-20.10 + M2012-20.10: #or ## processor operator used (MISRA C 2012) + + + + misra-c2012 + LINEAR + 1min + + + M2012-20.11 + M2012-20.11: Stringize operator followed by macro parameter followed by pasting operator (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-20.12 + M2012-20.12: Macro operator usedas an operand to # or ## and is subject to replacement (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-20.13 + M2012-20.13: Not a valid preprocessing directive (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-20.14 + M2012-20.14: #else, #elif or #endif not in same file than #if, #ifdef or #ifndef (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-21.1 + M2012-21.1: Illegal macro name with # usage (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-21.2 + M2012-21.2: Illegal macro name using reserved identifier (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-21.3 + M2012-21.3: Usage of memory allocation and deallocation from stdlib.h is forbidden (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-21.4 + M2012-21.4: Usage of setjmp.h is forbidden (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-21.5 + M2012-21.5: Usage of signal.h is forbidden (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-21.6 + M2012-21.6: Usage of input/output functions (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-21.7 + M2012-21.7: Usage of atol, atol and atoll is forbidden (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-21.8 + M2012-21.8: Usage of abort, exit, getenv and system is forbidden (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-21.9 + M2012-21.9: Usage of bsearch and qsort is forbidden (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-21.10 + M2012-21.10: Usage of time and date function forbidden (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-21.11 + M2012-21.11: Usage of tgmath.h is forbidden (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-21.12 + M2012-21.12: Usage of exception handling from fenv.h is forbidden (MISRA C 2012) + + + + misra-c2012 + LINEAR + 1min + + + M2012-21.13 + M2012-21.13: Value passed to ctype.h function has an invalid type (MISRA C 2012) + + + + misra-c2012 + LINEAR + 1min + + + M2012-21.15 + M2012-21.15: Different pointer types in memcpy, memmove or memcmp function parameters (MISRA C 2012) + + + + misra-c2012 + LINEAR + 1min + + + M2012-21.16 + M2012-21.16: Invalid pointer types in memcmp function parameters (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-21.17 + M2012-21.17: Read or write access beyond the bounds of an object passed as a parameter to function in string.h (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-21.18 + M2012-21.18: Size_t argument passed to string.h functions must be valid (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-22.1 + M2012-22.1: Custodial pointer has not been freed or returned (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-22.2 + M2012-22.2: Block of memory freed in bad conditions (MISRA C 2012) + + + + misra-c2012 + BLOCKER + LINEAR + 1min + + + M2012-22.3 + M2012-22.3: Read and write function made in same time (MISRA C 2012) + + + + misra-c2012 + CRITICAL + LINEAR + 1min + + + M2012-22.4 + M2012-22.4: Try to write on read only stream (MISRA C 2012) + + + + misra-c2012 + BLOCKER + LINEAR + 1min + + + M2012-22.5 + M2012-22.5: Pointer to file dereferenced (MISRA C 2012) + + + + misra-c2012 + BLOCKER + LINEAR + 1min + + + M2012-22.6 + M2012-22.6: Value to pointer to file used after been closed (MISRA C 2012) + + + + misra-c2012 + BLOCKER + LINEAR + 1min + + + 1301 + L1301: integer sequences must have non-negative sequence length + + + + tool-error + BLOCKER + LINEAR + 1min + + + 1302 + L1302: integer sequences must have integral element type + + + + tool-error + BLOCKER + LINEAR + 1min + + + 1407 + L1407: incrementing expression of type bool + + + + LINEAR + 1min + + + 1420 + L1420: 'mutable' applied to a reference type is non-standard + + + + LINEAR + 1min + + + 1421 + L1421: template parameter illegally redefines default argument + + + + LINEAR + 1min + + + 1731 + L1731: public virtual function __symbol__ + + + + LINEAR + 1min + + + 175 + L0175: cannot pass __string__ to variadic __string__; expected type from format string was __type__ + + + + CRITICAL + BUG + LINEAR + 1min + + + 176 + L0176: operand of type __type__ cannot be cast to function pointer type __type__ + + + + CRITICAL + BUG + LINEAR + 1min + + + 1766 + L1766: catch(...) encountered without preceding catch clause + + + + LINEAR + 1min + + + 177 + L0177: operand of type __type__ cannot be cast to object pointer type __type__ + + + + CRITICAL + BUG + LINEAR + 1min + + + 178 + L0178: function pointer of type __type__ cannot be cast to type __type__ + + + + CRITICAL + BUG + LINEAR + 1min + + + 179 + L0179: object pointer of type __type__ cannot be cast to type __type__ + + + + CRITICAL + BUG + LINEAR + 1min + + + 1798 + L1798: block scope declaration of __symbol__ is taken to mean a member of __symbol__ but does not introduce a name + + + + LINEAR + 1min + + + 1906 + L1906: exception specification for function __symbol__ + + + + LINEAR + 1min + + + 1943 + L1943: declaration of __symbol__ of type __type__ may require global runtime construction + + + + LINEAR + 1min + + + 1944 + L1944: declaration of __symbol__ of type __type__ requires a global destructor + + + + LINEAR + 1min + + + 1945 + L1945: declaration of __symbol__ of type __type__ requires an exit-time destructor + + + + LINEAR + 1min + + + 1966 + L1966: catch(...) encountered after catch clause + + + + LINEAR + 1min + + + 1970 + L1970: use of default capture (__string__) in lambda expression + + + + LINEAR + 1min + + + 1971 + L1971: use of function try block for non-constructor function __symbol__ + + + + LINEAR + 1min + + + 1972 + L1972: empty declaration + + + + LINEAR + 1min + + + 1973 + L1973: deletion of non-parameter pointer to const + + + + LINEAR + 1min + + + 2001 + L2001: request for __string__ integer type with at least __integer__ bits could not be processed + + + + CRITICAL + BUG + LINEAR + 1min + + + 2006 + L2006: no hexadecimal digits following \__string__ escape sequence + + + + CRITICAL + BUG + LINEAR + 1min + + + 2400 + L2400: unexpected internal condition '__string__' + + + + LINEAR + 1min + + + 2401 + L2401: cannot mix positional and non-positional arguments in format string + + + + LINEAR + 1min + + + 2402 + L2402: '__string__' specified field __string__ is missing a matching 'int' argument + + + + LINEAR + 1min + + + 2403 + L2403: field __string__ should have type __type__, but argument has type __type__ + + + + LINEAR + 1min + + + 2404 + L2404: invalid position specified for __string__ + + + + LINEAR + 1min + + + 2405 + L2405: __string__ used with '__string__' conversion specifier is undefined + + + + LINEAR + 1min + + + 2406 + L2406: no closing ']' for '%[' in scanf format string + + + + LINEAR + 1min + + + 2407 + L2407: zero field width in scanf format string is unused + + + + LINEAR + 1min + + + 2408 + L2408: cannot pass __string__ object of type __type__ to variadic __string__; expected type from format string was __type__ + + + + LINEAR + 1min + + + 2409 + L2409: format string should not be a wide string + + + + LINEAR + 1min + + + 2410 + L2410: re-entrant initializer for static local variable __symbol__ causes undefined behavior + + + + LINEAR + 1min + + + 2423 + L2423: apparent domain error for function __symbol__, argument __integer__ (value=__string__) outside of accepted range (__string__) + + + + LINEAR + 1min + + + 2425 + L2425: user-defined function semantic '__string__' was rejected during call to function __symbol__ because __string__ + + + + LINEAR + 1min + + + 2426 + L2426: return value (__string__) of call to function __symbol__ conflicts with return semantic '__string__' + + + + LINEAR + 1min + + + 2427 + L2427: initializer_list elements will be destroyed before returning + + The array associated with an initializer list is allocated with a +temporary lifetime. The lifetime of the array will not be extended +beyond the full expression of a return statement. The returned +initializer list will contain dangling pointers. For example:

    +
    
    +    #include <initializer_list>
    +
    +    std::initializer_list<int> f() {
    +        return { 1, 2, 3 }; // The memory used to store the array
    +                            // elements will be freed before returning.
    +    }
    +
    +    void g() {
    +        auto x = f(); // Attempting to access the elements of x will read invalid memory.
    +    }
    ]]> +
    + LINEAR + 1min +
    + + 2430 + L2430: missing whitespace between macro name __name__ and definition + + + + LINEAR + 1min + + + 2431 + L2431: __#line/GNU line__ directive starting with zero is not interpreted as an octal number + + + + LINEAR + 1min + + + 2432 + L2432: macro __name__ used as header guard is followed by a #define of a similar but different macro '__name__' + + + + LINEAR + 1min + + + 2433 + L2433: conversion specifier '__string__' is not allowed for bounds-checked format function + + + + LINEAR + 1min + + + 2434 + L2434: memory was potentially deallocated + + + + LINEAR + 1min + + + 2435 + L2435: duplicate '__string__' declaration specifier + + + + LINEAR + 1min + + + 2436 + L2436: function __symbol__ declared 'noreturn' should not return + + + + LINEAR + 1min + + + 2437 + L2437: indirection of non-volatile null pointer may be optimized out + + + + LINEAR + 1min + + + 2438 + L2438: comparing values of different enumeration types (__type__ and __type__) + + + + LINEAR + 1min + + + 2439 + L2439: lint comment does not contain any options + + + + LINEAR + 1min + + + 2440 + L2440: __string__ '__string__' in comparison is never null + + The address of a function, array, or variable was directly compared to +null. This is suspicious because the address of a function or variable +can never be null in well-formed code. Note that this message is not +given for null checks of function or object pointers. For example:

    +
    
    +    void foo(int *pi) {
    +        if (!pi) return;        // Okay
    +        if (&pi == 0) return;   // 2440
    +        if (foo != 0) return;   // 2440
    +    }
    +
    +

    The first string parameter is one of 'function', 'array', or 'address +of' and the second string parameter represents the corresponding +function, array, or variable.

    ]]> +
    + LINEAR + 1min +
    + + 2441 + L2441: __string__ '__string__' used in boolean context is never null + + The address of a function, array, or variable was used in a boolean +context. This is suspicious because such an address can never be false. +Note that this message is not given for function or object pointers. For +example:

    +
    
    +    void foo(int *pi) {
    +        if (!pi) return;    // Okay
    +        if (&pi) return;    // 2441
    +        if (!foo) return;   // 2441
    +    }
    +
    +

    The first string parameter is one of 'function', 'array', or 'address +of' and the second string parameter represents the corresponding +function, array, or variable.

    ]]> +
    + LINEAR + 1min +
    + + 2444 + L2444: case value is not in enumeration __type__ + + + + LINEAR + 1min + + + 2445 + L2445: cast from __type__ to __type__ increases required alignment from __integer__ to __integer__ + + + + LINEAR + 1min + + + 2446 + L2446: pasting formed '__string__', an invalid preprocessing token + + + + LINEAR + 1min + + + 2447 + L2447: 'main' function should not be declared as '__string__' + + + + LINEAR + 1min + + + 2448 + L2448: 'main' function should return type 'int' + + + + LINEAR + 1min + + + 2450 + L2450: null character ignored + + + + LINEAR + 1min + + + 2452 + L2452: __string__ converts between pointers to integer types with different sign + + + + LINEAR + 1min + + + 2453 + L2453: incompatible pointer to integer conversion __string__ __string__ + + + + LINEAR + 1min + + + 2454 + L2454: incompatible pointer types __string__ __string__ + + + + LINEAR + 1min + + + 2455 + L2455: incompatible function pointer types __string__ __string__ + + A function pointer type was implicitly converted to an incompatible +function pointer type. For example:

    +
    
    +    void foo(int i) {
    +        int (*pf)(float) = &foo;    // Warning 2455
    +    }
    ]]> +
    + LINEAR + 1min +
    + + 2456 + L2456: C++ language linkage specification encountered in C mode + + + + LINEAR + 1min + + + 2465 + L2465: redefinition of tag __type__ will not be visible outside of this function + + + + LINEAR + 1min + + + 2466 + L2466: __symbol__ was used despite being marked as 'unused' + + + + LINEAR + 1min + + + 2491 + L2491: unknown expression '__string__' in sizeof will evaluate to 0, use -pp_sizeof to change the value used for evaluation + + + + LINEAR + 1min + + + 2501 + L2501: negation of value of unsigned type __type__ yields a value of signed type __type__ due to integral promotion + + + + LINEAR + 1min + + + 2586 + L2586: __string__ __name__ is deprecated + + + + LINEAR + 1min + + + 2623 + L2623: possible domain error for function __symbol__, argument __integer__ (value=__string__) outside of accepted range (__string__) + + + + LINEAR + 1min + + + 2641 + L2641: implicit conversion of enum __symbol__ to floating point type __type__ + + + + LINEAR + 1min + + + 2650 + L2650: constant '__integer__' out of range for '__string__' portion of compound comparison operator '__string__' + + 255) { } // 650 - 'a' can't be greater than 255 + if (a >= 255) { } // 2650 - 'a' could be equal but not greater than 255 + +Message 2650 is issued on line 4 because while a could be equal to 255, +it cannot be greater than 255 so the use of the >= operator is +suspicious (perhaps a was intended to be compared to a different value). +See also message 650 which is issued when the provided constant is out +of range for the entire comparison operator.]]> + + LINEAR + 1min + + + 2662 + L2662: pointer arithmetic on pointer that may not refer to an array + + This message is issued instead of 662 when a pointer that appears likely +not to refer to an array is subject to integer arithmetic. Addition, +subtraction, and array subscripting are considered. Referring to the +value itself with the operand zero is ignored. For example:

    +
    
    +    void f(int a) {
    +        int* p = &a;
    +        p[0] = 0;
    +        p[1] = 0;   // Warning 2662
    +        p + 0;
    +        p + 1;      // Warning 2662
    +    }
    ]]> +
    + LINEAR + 1min +
    + + 2701 + L2701: __variable/function__ __symbol__ declared outside of header is not defined in the same source file + + + + LINEAR + 1min + + + 2702 + L2702: static symbol __symbol__ declared in header not referenced + + + + LINEAR + 1min + + + 2703 + L2703: dangling else, add braces to body of parent statement to make intent explicit + + + + LINEAR + 1min + + + 2704 + L2704: potentially negating the most negative number + + + + LINEAR + 1min + + + 2705 + L2705: type qualifier(s) '__string__' applied to return type __has/have__ no effect + + + + LINEAR + 1min + + + 2706 + L2706: integer constant value does not match any enumerator in enumeration __type__ + + + + LINEAR + 1min + + + 2707 + L2707: function __symbol__ could be declared as 'noreturn' + + + + LINEAR + 1min + + + 2709 + L2709: array subscript is of type 'char' + + + + LINEAR + 1min + + + 2712 + L2712: large pass-by-value parameter __symbol__ of type __type__ (__integer__ bytes) for function __symbol__ + + + + LINEAR + 1min + + + 2713 + L2713: large return type __type__ (__integer__ bytes) for function __symbol__ + + + + LINEAR + 1min + + + 2715 + L2715: token pasting of ',' and __VA_ARGS__ is a GNU extension + + + + LINEAR + 1min + + + 2716 + L2716: tentative array definition for variable __symbol__ assumed to have one element + + + + LINEAR + 1min + + + 2865 + L2865: __string__ + + + + LINEAR + 1min + + + 2901 + L2901: stack usage information: __detail__ + + + + LINEAR + 1min + + + 2902 + L2902: discarded instance of post-__string__ operator + + + + LINEAR + 1min + + + 2932 + L2932: macro __name__ used as header guard is followed by a #define of a different macro '__name__' + + + + LINEAR + 1min + + + 319 + L0319: size option misconfiguration: '__type__' has size __integer__ and '__type__' has size __integer__ + + + + tool-error + BLOCKER + LINEAR + 1min + + + 331 + L0331: file '__parameter__' has been modified since the precompiled header '__parameter__' was built + + + + tool-error + BLOCKER + LINEAR + 1min + + + 334 + L0334: precompiled header failure: '__string__'; skipping this module; consider deleting the PCH, '__string__', and trying again + + + + tool-error + BLOCKER + LINEAR + 1min + + + 336 + L0336: source file is not valid UTF-8 + + + + tool-error + BLOCKER + LINEAR + 1min + + + 338 + L0338: precompiled header error: __string__; skipping this module; consider examining include path options and trying again + + + + tool-error + BLOCKER + LINEAR + 1min + + + 339 + L0339: precompiled header for '__string__' was not created due to errors + + + + tool-error + BLOCKER + LINEAR + 1min + + + 3401 + L3401: parameter to move constructor __symbol__ is an rvalue reference to const + + + + LINEAR + 1min + + + 3402 + L3402: lambda capture default captures 'this' by value + + + + LINEAR + 1min + + + 3403 + L3403: use of std::move on value of forwarding reference type __type__; was std::forward<__string__> intended? + + A forwarding reference (sometimes referred to as a universal reference) +was given as an argument to std::move. Either the formation of a +forwarding reference instead of an rvalue reference or the use of +std::move instead of std::forward was likely accidental. For example:

    +
    
    +    template<typename T>
    +    void f(T&& t) {
    +        g(std::move(t)); // might unexpectedly move from the caller's lvalue
    +    }
    ]]> +
    + LINEAR + 1min +
    + + 3405 + L3405: __symbol__ is specified with C linkage but returns type __type__ which is incompatible with C + + + + LINEAR + 1min + + + 3406 + L3406: incomplete return type __type__ for function __symbol__ specified with C linkage + + + + LINEAR + 1min + + + 3407 + L3407: __symbol__ should not return null unless declared with 'throw()' or 'noexcept' + + + + LINEAR + 1min + + + 3408 + L3408: address of reference in comparison is never null in well-formed C++ + + The address of a reference was directly compared to null. This is +suspicious because the address of a reference can never be null in +well-formed code

    +
    
    +    void foo(int &i) {
    +      int &ri = i;
    +      if (&i == 0) return;   // 3408
    +      if (&i != 0) return;   // 3408
    +    }
    ]]> +
    + LINEAR + 1min +
    + + 3409 + L3409: address of reference in boolean context is never null in well-formed C++ + + The address of a reference was used in a boolean context. This is +suspicious because such an address can never be false. For example:

    +
    
    +    void foo(int &i) {
    +      int &ri = i;
    +      if (&i) return;    // 3409
    +      if (&ri) return;   // 3409
    +      if (!&i) return;   // 3409
    +    }
    ]]> +
    + LINEAR + 1min +
    + + 3410 + L3410: conversion function converting __type__ to itself will never be used + + + + LINEAR + 1min + + + 3411 + L3411: conversion function converting __type__ to its base class __type__ will never be used + + + + LINEAR + 1min + + + 3412 + L3412: __type__ has virtual functions but non-virtual destructor + + + + LINEAR + 1min + + + 3413 + L3413: __delete/destructor__ called on non-final __type__ that has virtual functions but non-virtual destructor + + + + LINEAR + 1min + + + 3414 + L3414: __delete/destructor__ called on __type__ that is abstract but has non-virtual destructor + + + + LINEAR + 1min + + + 3415 + L3415: pointer initialized to temporary array + + + + LINEAR + 1min + + + 3416 + L3416: 'this' pointer used in boolean context is never null + + + + LINEAR + 1min + + + 3417 + L3417: 'this' pointer used in comparison is never null + + + + LINEAR + 1min + + + 3418 + L3418: 'reinterpret_cast' __string__ class __symbol__ __string__ its __string__ __symbol__ behaves differently than 'static_cast' + + + + LINEAR + 1min + + + 3420 + L3420: extraneous template parameter list in template specialization + + An extraneous template parameter list was provided in the declaration of +a template specialization. For example:

    +
    
    +    template <typename T>
    +    T foo(T);
    +
    +    template<>       // warning 3420
    +    template<>
    +    int foo(int);
    ]]> +
    + LINEAR + 1min +
    + + 3421 + L3421: __string__ template partial specialization contains __string__ that cannot be deduced so the specialization will never be used + + + + LINEAR + 1min + + + 3423 + L3423: __case value/enumerator value/non-type template argument/array size/constexpr if__ __cannot be narrowed from type to type__ + + A case value, enumerator value, non-type template argument, or array +size was provided that cannot be narrowed to the required type. For +example:

    +
    
    +    void foo(unsigned u) {
    +        switch(u) {
    +        case -1:         // warning 3423, cannot narrow -1 to unsigned
    +            break;
    +            ...
    +            }
    +    }
    +
    +    template <unsigned char I>
    +    struct S { unsigned char value = I; };
    +    S<300> s;           // warning 3423, cannot narrow 300 to unsigned char
    ]]> +
    + LINEAR + 1min +
    + + 3424 + L3424: constexpr __function/constructor__ never produces a constant expression + + + + LINEAR + 1min + + + 3425 + L3425: type __type__ cannot be narrowed to __type__ in initializer list + + + + LINEAR + 1min + + + 3426 + L3426: non-constant-expression cannot be narrowed from type __type__ to __type__ in initializer list + + + + LINEAR + 1min + + + 3427 + L3427: constant expression evaluates to __string__ which cannot be narrowed to type __type__ + + + + LINEAR + 1min + + + 3428 + L3428: out-of-line declaration of a member must be a definition + + + + LINEAR + 1min + + + 3429 + L3429: parenthesized initialization of a member array is a GNU extension + + + + LINEAR + 1min + + + 3430 + L3430: taking the address of a temporary object of type __type__ + + An attempt was made to take the address of a temporary object. For +example:

    +
    
    +    struct X { ... };
    +
    +    void foo() {
    +        &X();       // warning 3430
    +    }
    ]]> +
    + LINEAR + 1min +
    + + 3431 + L3431: in-class initializer for static data member of type __type__ requires 'constexpr' specifier + + + + LINEAR + 1min + + + 3432 + L3432: invalid suffix on literal, C++11 requires a space between literal and identifier + + + + LINEAR + 1min + + + 3450 + L3450: subtracting value of member __symbol__ from the address referred to by the 'this' pointer; use of -> to access the member may have been intended + + in -> was forgotten. +For example: + + struct X { + bool value; + bool getValue() const { + return this-value; // intended to be this->value + } + }; + +If for some reason explicitly applying a negative offset to the this +pointer based on a member value is actually desired then the member name +can be enclosed in parentheses to avoid confusion.]]> + + LINEAR + 1min + + + 365 + L0365: command pipe error: __string__ + + + + tool-error + BLOCKER + LINEAR + 1min + + + 366 + L0366: regex error: __string__ + + + + tool-error + BLOCKER + LINEAR + 1min + + + 367 + L0367: maximum hook recursion depth (__integer__ levels) reached + + + + tool-error + BLOCKER + LINEAR + 1min + + + 368 + L0368: invalid conditional expression: __string__ + + + + tool-error + BLOCKER + LINEAR + 1min + + + 369 + L0369: hook field error while processing '__string__': __string__ + + + + tool-error + BLOCKER + LINEAR + 1min + + + 370 + L0370: options executed within a module cannot invoke additional modules + + + + tool-error + BLOCKER + LINEAR + 1min + + + 3701 + L3701: use of __symbol__ implicitly invokes converting constructor __symbol__; __symbol__ could be used + + + + LINEAR + 1min + + + 3702 + L3702: lambda capture default captures 'this' by value + + + + LINEAR + 1min + + + 3703 + L3703: ellipsis at this point creates a C-style varargs function + + An ellipsis was encountered, which was probably intended to declare a +function parameter pack but instead declares a variable argument +function. For example:

    +
    
    +    template <typename... T>
    +    void foo() {
    +        bar([] {
    +            void g(T t...);     // warning 3703, probably meant g(T... t);
    +        }...);
    +    }
    ]]> +
    + LINEAR + 1min +
    + + 3704 + L3704: empty parentheses here declare a function, not a variable + + + + LINEAR + 1min + + + 3705 + L3705: parenthetic disambiguation results in function declaration + + A syntactic construct was encountered that could be interpreted as +either a variable declaration or a function declaration (sometimes +referred to as the ";most vexing parse";). The disambiguation rules +require that it be interpreted as a function declaration, which may not +be what the programmer intended. For example:

    +
    
    +    struct X { };
    +    struct Y {
    +        Y(const X&);
    +    };
    +
    +    void foo() {
    +        Y y(X());   // warning 3705
    +    }
    +
    +

    Here y is interpreted as a function that returns an object of type Y and +takes a single parameter that is a pointer to a function taking no +arguments and returning type X. In particular, it is not interpreted as +a declaration of an object of type Y initialized with a temporary of +type X as was almost certainly intended.

    + +

    There are several ways to force interpretation of a variable +declaration. In and later the simplest way is to employ uniform +initialization syntax, for example any of the following would work:

    +
    
    +    Y y1(X{});    // OK, variable declaration
    +    Y y2{X()};    // OK, variable declaration
    +    Y y3{X{}};    // OK, variable declaration
    +
    +

    Prior to , an extra pair of parenthesis can be used to force the desired +interpretation, e.g.:

    +
    
    +    Y y4((X()));   // OK, variable declaration
    +
    +

    The same issue can appear with casts, for example:

    +
    
    +    void foo(double d) {
    +        int i( int(d) );    // warning 3705
    +    }
    +
    +

    In this case, i is not a variable initialized with the truncated value +of d but rather a function returning int and taking int. In addition to +the methods mentioned above to force a variable declaration, the +functional cast can be converted to a C-style cast or a named cast, +e.g.:

    +
    
    +    int i1( (int) d );              // OK, variable declaration
    +    int i2( static_cast<int>(d) );  // OK, variable declaration
    ]]> +
    + LINEAR + 1min +
    + + 3706 + L3706: abstract class __symbol__ marked '__final/sealed__' + + + + LINEAR + 1min + + + 3707 + L3707: unknown linkage language '__string__' + + + + LINEAR + 1min + + + 373 + L0373: lint comments cannot appear after a #include directive on the same line + + + + tool-error + BLOCKER + LINEAR + 1min + + + 3901 + L3901: reference to __data member/member function__ __symbol__ of __symbol__ does not use an explicit 'this->' + + member to access the member. For example: + + struct A { + int value; + int getValue() { return this->value; } // OK, explicit this-> + void setValue(int v) { value = v; } // note 3901 + }; + +Some authors suggest always using this-> to access members to prevent +the potential for confusion when local objects or functions with the +same name as a member exist in the same scope. See also message 578, +which will be issued if a local symbol is declared that hides a member.]]> + + LINEAR + 1min + + + 3902 + L3902: thrown object of type __type__ is not a class derived from std::exception + + + + LINEAR + 1min + + + 450 + L0450: namespace __symbol__ declared within an extern ";C"; region + + + + LINEAR + 1min + + + 463 + L0463: could not parse '__string__' as a strong type: __string__ + + + + LINEAR + 1min + + + 466 + L0466: conversion __to/from__ pointer to function with no prototype (__context__) + + + + LINEAR + 1min + + + 473 + L0473: argument '__string__' is of insufficient length for array parameter __symbol__ declared as __type__ + + + + LINEAR + 1min + + + 474 + L0474: constant switch condition '__string__' not handled by switch + + + + LINEAR + 1min + + + 477 + L0477: array __symbol__ could be declared static + + + + LINEAR + 1min + + + 490 + L0490: __string__ + + + + LINEAR + 1min + + + 492 + L0492: incomplete format specifier '__string__' + + + + LINEAR + 1min + + + 493 + L0493: position arguments in format strings start counting at 1 (not 0) + + + + LINEAR + 1min + + + 494 + L0494: data argument position '__integer__' exceeds the number of data arguments (__integer__) + + + + LINEAR + 1min + + + 495 + L0495: format string body contains NUL character + + + + LINEAR + 1min + + + 496 + L0496: format string is not null terminated + + + + LINEAR + 1min + + + 497 + L0497: format string is empty + + + + LINEAR + 1min + + + 498 + L0498: unbounded scanf conversion specifier '__string__' may result in buffer overflow + + + + LINEAR + 1min + + + 499 + L0499: using length modifier '__string__' with conversion specifier '__string__' is not supported by ISO C + + + + LINEAR + 1min + + + 513 + L0513: the option '__string__' is not currently supported + + + + LINEAR + 1min + + + 523 + L0523: expression statement involving __string__ '__name__' lacks side effects + + + + LINEAR + 1min + + + 576 + L0576: excess elements in __string__ initializer + + + + LINEAR + 1min + + + 597 + L0597: suspicious use of unary operator could be confused for compound assignment (__string__) + + + + LINEAR + 1min + + + 599 + L0599: cannot open file matching wild card pattern '__string__' + + + + LINEAR + 1min + + + 709 + L0709: no intervening module since the last '-pch' option + + + + LINEAR + 1min + + + 8000 + L8000: __string__ + + + + CRITICAL + BUG + LINEAR + 1min + + + 837 + L0837: switch condition is a constant expression + + + + LINEAR + 1min + + + 853 + L0853: entering nested comment + + + + LINEAR + 1min + + + 854 + L0854: trigraph sequence converted to '__string__' character + + + + LINEAR + 1min + + + 855 + L0855: positional arguments are a non-ISO extension + + + + LINEAR + 1min + + + 856 + L0856: flag '__string__' is ignored when flag '__string__' is present + + + + LINEAR + 1min + + + 857 + L0857: argument 1 of type __type__ is not compatible with argument 2 of type __type__ in call to function __symbol__ + + + + LINEAR + 1min + + + 865 + L0865: __detail__ + + + + LINEAR + 1min + + + 868 + L0868: degenerate switch encountered + + + + LINEAR + 1min + + + 870 + L0870: no '-max_threads=N' option was encountered prior to the first module; only a single thread will be used by default + + + + LINEAR + 1min + + + 879 + L0879: semantic monikers are '__string__' and '__string__' + + + + LINEAR + 1min + + + 882 + L0882: sizeof applied to parameter __symbol__ of function __symbol__ declared an incomplete array type __type__ + + + + LINEAR + 1min + + + 890 + L0890: see section __detail__ ";__detail__"; in the manual for details + + + + LINEAR + 1min + + + 891 + L0891: reference information __text varies__ + + + + LINEAR + 1min + + + 892 + L0892: did you mean to __multiply/divide__ by a factor of type '__strong-type__'? + + + + LINEAR + 1min + + + 893 + L0893: expanded from macro + + + + LINEAR + 1min + + + 894 + L0894: during specific walk __detail__ + + + + LINEAR + 1min + + + 896 + L0896: semantic expression expands to '__string__' + + + + LINEAR + 1min + + + 897 + L0897: in instantiation of __string__ __symbol__ triggered here + + + + LINEAR + 1min + + + 901 + L0901: variable __symbol__ of type __type__ not initialized by definition + + + + LINEAR + 1min + + + 902 + L0902: non-static function __symbol__ declared outside of a header + + + + LINEAR + 1min + + + 907 + L0907: implicit conversion to 'void *' from type __type__ + + + + LINEAR + 1min + + + 9073 + L9073: parameter __integer__ of function __symbol__ has type alias name type difference with previous declaration (__type__ vs __type__) + + + + CRITICAL + BUG + LINEAR + 1min + + + 908 + L0908: implicit conversion from 'void *' to type __type__ + + + + LINEAR + 1min + + + 9093 + L9093: the name '__name__' is reserved to the compiler + + + + CRITICAL + BUG + LINEAR + 1min + + + 9094 + L9094: return type of function __symbol__ has type alias name difference with previous declaration (__type__ vs __type__) + + + + CRITICAL + BUG + LINEAR + 1min + + + 9095 + L9095: symbol __symbol__ has same name as previously defined macro + + + + CRITICAL + BUG + LINEAR + 1min + + + 9096 + L9096: symbol __symbol__ has same name as subsequently defined macro + + + + CRITICAL + BUG + LINEAR + 1min + + + 9097 + L9097: unparenthesized argument to sizeof operator + + + + CRITICAL + BUG + LINEAR + 1min + + + 9098 + L9098: pointer argument __integer__ (of type __type__) to function __symbol__ does not point to a pointer type or an essentially signed, unsigned, boolean, or enum type + + + + CRITICAL + BUG + LINEAR + 1min + + + 9103 + L9103: identifier '__name__' with static storage is reused + + + + CRITICAL + BUG + LINEAR + 1min + + + 9167 + L9167: macro '__name__' defined in __string__ __symbol__ not undefined in same __string__ + + + + CRITICAL + BUG + LINEAR + 1min + + + 9168 + L9168: variable __symbol__ has type alias name difference with previous declaration (__type__ vs __type__) + + + + CRITICAL + BUG + LINEAR + 1min + + + 9169 + L9169: constructor __symbol__ can be used for implicit conversions from fundamental type __type__ + + + + CRITICAL + BUG + LINEAR + 1min + + + 9170 + L9170: pure function __symbol__ overrides non-pure function __symbol__ + + + + CRITICAL + BUG + LINEAR + 1min + + + 9171 + L9171: downcast of polymorphic type __type__ to type __type__ + + + + CRITICAL + BUG + LINEAR + 1min + + + 9172 + L9172: bitwise operator '__operator__' used with non-constant operands of differing underlying types + + + + CRITICAL + BUG + LINEAR + 1min + + + 9173 + L9173: use of non-placement allocation function __symbol__ + + + + CRITICAL + BUG + LINEAR + 1min + + + 9174 + L9174: __type__ is a virtual base class of __symbol__ + + + + CRITICAL + BUG + LINEAR + 1min + + + 9175 + L9175: function __symbol__ has void return type and no external side-effects + + + + CRITICAL + BUG + LINEAR + 1min + + + 9176 + L9176: pointer type __type__ converted to unrelated pointer type __type__ + + + + CRITICAL + BUG + LINEAR + 1min + + + 9204 + L9204: hexadecimal escape sequence used + + + + tool-error + BLOCKER + LINEAR + 1min + + + 9209 + L9209: plain character data used with prohibited operator __string__ + + + + tool-error + BLOCKER + LINEAR + 1min + + + 9212 + L9212: bit field type __type__ is not explicitly signed int or unsigned int + + + + tool-error + BLOCKER + LINEAR + 1min + + + 9224 + L9224: expression is not effectively boolean and must be explicitly tested for zero + + An expression that is not ";effectively boolean"; is being implicitly +tested for zero in the controlling expression of an if statement, an +iteration statement, or the first operand of a conditional operator. For +example, given that x is an integer:

    +
    
    +    if (x)
    +
    +

    will elicit this message while:

    +
    
    +    if (x != 0)
    +
    +

    will not. ";Effectively boolean"; value are produced by the operators ==, +!=, <=, >=, <, >, !, ||, and &&.

    ]]> +
    + tool-error + BLOCKER + LINEAR + 1min +
    + + 9225 + L9225: integral expression of underlying type __underlying-type__ cannot be implicitly converted to type __type__ because it is not a wider integer type of the same signedness + + + + tool-error + BLOCKER + LINEAR + 1min + + + 9226 + L9226: integral expression of underlying type __underlying-type__ cannot be implicitly converted to type __type__ because it is __string__ + + + + tool-error + BLOCKER + LINEAR + 1min + + + 9227 + L9227: floating expression of underlying type __underlying-type__ cannot be implicitly converted to type __type__ because it is not a wider floating type + + + + tool-error + BLOCKER + LINEAR + 1min + + + 9228 + L9228: floating expression of underlying type __underlying-type__ cannot be implicitly converted to type __type__ because it is __string__ + + + + tool-error + BLOCKER + LINEAR + 1min + + + 9229 + L9229: complex integral expression may only be cast to another integral type of the same signedness no wider than the original type + + + + tool-error + BLOCKER + LINEAR + 1min + + + 9230 + L9230: complex floating expression may only be cast to another floating type no wider than the original type + + + + tool-error + BLOCKER + LINEAR + 1min + + + 9231 + L9231: result of __operator__ operator applied to operand of type __type__ must be immediately cast to __type__ + + + + tool-error + BLOCKER + LINEAR + 1min + + + 9232 + L9232: expected/did not expect an effectively boolean argument for operator __operator__ + + + + tool-error + BLOCKER + LINEAR + 1min + + + 9233 + L9233: bitwise operator __operator__ may not be applied to operand with signed underlying type + + + + tool-error + BLOCKER + LINEAR + 1min + + + 9234 + L9234: shift amount exceeds size of operand's underlying type + + + + tool-error + BLOCKER + LINEAR + 1min + + + 9235 + L9235: unary minus applied to operand with unsigned underlying type + + + + tool-error + BLOCKER + LINEAR + 1min + + + 9236 + L9236: assignment operator may not be used within a boolean-valued expression + + + + tool-error + BLOCKER + LINEAR + 1min + + + 9237 + L9237: conversion between pointer to function type __type__ and differing non-integral type __type__ + + + + tool-error + BLOCKER + LINEAR + 1min + + + 9238 + L9238: switch condition may not be boolean + + + + tool-error + BLOCKER + LINEAR + 1min + + + 9240 + L9240: __left/right__ side of logical operator '__operator__' is not a primary expression + + + + tool-error + BLOCKER + LINEAR + 1min + + + 9252 + L9252: testing floating point for equality using exact value + + + + tool-error + BLOCKER + LINEAR + 1min + + + 9254 + L9254: continue statement encountered + + + + tool-error + BLOCKER + LINEAR + 1min + + + 9259 + L9259: C comment contains '://' sequence + + + + tool-error + BLOCKER + LINEAR + 1min + + + 9260 + L9260: C++ style comment used + + + + tool-error + BLOCKER + LINEAR + 1min + + + 9264 + L9264: array subscript applied to variable __symbol__ declared with non-array type __type__ + + + + tool-error + BLOCKER + LINEAR + 1min + + + 9272 + L9272: parameter __integer__ of function __symbol__ has different name than overridden function __symbol__ (__symbol__ vs __symbol__) + + + + tool-error + BLOCKER + LINEAR + 1min + + + 9273 + L9273: parameter __integer__ of function __symbol__ has type alias name difference with overridden function __symbol__ (__type__ vs __type__) + + + + tool-error + BLOCKER + LINEAR + 1min + + + 9287 + L9287: cast from pointer to object type (__type__) to pointer to char type (__type__) + + + + tool-error + BLOCKER + LINEAR + 1min + + + 9288 + L9288: unnamed signed single-bit bitfield + + + + tool-error + BLOCKER + LINEAR + 1min + + + 9294 + L9294: return type of function __symbol__ has type alias name difference with overridden function __symbol__ (__type__ vs __type__) + + + + tool-error + BLOCKER + LINEAR + 1min + + + 9295 + L9295: conversion between object pointer type __type__ and non-integer arithmetic essential type '__essential-type__' + + + + tool-error + BLOCKER + LINEAR + 1min + + + 9401 + L9401: function __symbol__ returns pointer to void + + + + LINEAR + 1min + + + 9402 + L9402: function __symbol__ parameter __integer__ is void pointer + + + + LINEAR + 1min + + + 9403 + L9403: function __symbol__ parameter __integer__ has same unqualified type (__type__) as previous parameter + + + + LINEAR + 1min + + + 9404 + L9404: destructor for class __symbol__ should be declared 'noexcept' + + + + LINEAR + 1min + + + 9405 + L9405: move constructor for class __symbol__ should be declared 'noexcept' + + + + LINEAR + 1min + + + 9406 + L9406: move assignment operator __symbol__ should be declared 'noexcept' + + + + LINEAR + 1min + + + 9407 + L9407: copy assignment operator __symbol__ should not be virtual + + + + LINEAR + 1min + + + 9408 + L9408: copy assignment operator __symbol__ should take a const reference type + + + + LINEAR + 1min + + + 9409 + L9409: copy assignment operator __symbol__ should return a non-const lvalue-reference type + + + + LINEAR + 1min + + + 9410 + L9410: move assignment operator __symbol__ should not be virtual + + + + LINEAR + 1min + + + 9411 + L9411: move assignment operator __symbol__ should take a non-const reference type + + + + LINEAR + 1min + + + 9412 + L9412: move assignment operator __symbol__ should return a non-const lvalue-reference type + + + + LINEAR + 1min + + + 9413 + L9413: class __symbol__ contains data members of differing access levels + + + + LINEAR + 1min + + + 9416 + L9416: typedef used to define name __symbol__ + + + + LINEAR + 1min + + + 9417 + L9417: data member __symbol__ has protected access level + + + + LINEAR + 1min + + + 972 + L0972: unusual character '__string__' in '__kind__' literal + + + + LINEAR + 1min + + + 977 + L0977: non-literal non-boolean used in __type__ __string__ + + + + LINEAR + 1min + + + 978 + L0978: the name '__name__' matches a pattern reserved to the compiler __string__ + + + + LINEAR + 1min + + + 979 + L0979: function __symbol__ could be marked with a 'pure' semantic + + + + LINEAR + 1min + + + 980 + L0980: macro name '__name__' matches a pattern reserved to the compiler __string__ + + + + LINEAR + 1min + + + 981 + L0981: cast of expression of type __type__ to same type is redundant + + + + LINEAR + 1min + + + 983 + L0983: behavior of dash in scan list is implementation defined + + + + LINEAR + 1min + + + 986 + L0986: target type __type__ of type alias __symbol__ is deprecated + + + + LINEAR + 1min + + + 987 + L0987: constructor parameter __symbol__ shadows the field __symbol__ of __symbol__ + + + + LINEAR + 1min + + + 9901 + L9901: return value '__string__' for call to function __symbol__ updated to '__string__' via return semantic '__string__' + + + + LINEAR + 1min + + + 9902 + L9902: return value '__string__' for call to function __symbol__ not updated by return semantic '__string__' which adds no new information + + + + LINEAR + 1min + + + 9903 + L9903: __essential-type-preview__ + + + + LINEAR + 1min + + + 9904 + L9904: hook event: '__string__' + + + + LINEAR + 1min + + + 9905 + L9905: value tracking debug assertion not known to be unequivocally true + + + + LINEAR + 1min + + + 999 + L0999: defaulting to __string__ concurrent threads + + + + LINEAR + 1min + + + + 180 + L0180: cannot generate mangled name for symbol symbol whose type depends on string + + Name mangling refers to the process of taking the declared name of a symbol and producing a new name +which additionally incorporates information about the symbol, for example its type, return types, parameter +types, enclosing classes or namespaces, etc. Typical compilers and linkers use mangled names to implement +function overloading and to uniformly refer to and disambiguate external entities.

    +

    When certain combinations of compiler extensions are mixed in a manner that does not conform +to the language standard, situations may arise where it is not possible to systematically construct a mangled +name to allow an entity to be cross-referenced between translation units. This message is parameterized by +the category of grammatical entity for which mangling failed.

    ]]> +
    + LINEAR + 5min +
    + + 311 + L0311: indirect file depth limit of 'integer' exceeded + + + + LINEAR + 5min + + + 337 + L0337: unable to read file 'file' + + This message is given when the internal file information inside the precompiled header does not match its +contents.

    +]]> +
    + LINEAR + 2min +
    + + 398 + L0398: fatal error (requested by option): 'string' + + + + LINEAR + 5min + + + 399 + L0399: fatal error (requested by option): 'string' + + + + LINEAR + 5min + + + 823 + L0823: definition of macro 'name' ends in semi-colon + + The last token in the replacement text of the specified macro was a semi-colon. In addition to limiting the +places where the macro can be used, this can result in unintentional behavior when the macro is used in +what appears to be a larger expression. For example, in:

    +
    
    +    #define SUM(x, y) ((x) + (y));
    +    void foo(int a, int b) {
    +        int result = SUM(a, b) + 1;
    +    }
    +
    +

    result will be the sum of a and b without the + 1. +

    References

    +

    PRE11-C. Do not conclude macro definitions with a semicolon

    ]]> +
    + cert + LINEAR + 5min +
    + + 886 + L0886: preprocessor directive 'name' encountered in conditionally excluded region is deprecated. string + + A deprecated preprocessor directive (see the -deprecate option) was encountered in a conditionally excluded +region. For example:

    +
    
    +    //lint -deprecate(ppw, pragma)
    +    #if 0
    +    #pragma BLAH
    +    #endif
    +
    +

    will cause this message to be issued for the #pragma directive.

    ]]> +
    + LINEAR + 5min +
    + + 1422 + L1422: default constructor symbol defaulted outside of class + + + + LINEAR + 5min + + + 1423 + L1423: reinterpret_cast from type to type has undefined behavior + + + + LINEAR + 5min + + + 1756 + L1756: variable symbol has 'static/thread' storage duration and non-POD type type + + + + LINEAR + 5min + + + 1779 + L1779: virtual function symbol introduced in class symbol which is marked as 'final' + + + + LINEAR + 5min + + + 1946 + L1946: use of functional-style cast to convert from type type to type type + + + + misra + LINEAR + 5min + + + 2414 + L2414: non-standard literal suffix 'string' + + + + LINEAR + 2min + + + 2449 + L2449: string discards qualifiers + + Message 2450 continues to report the presence of a literal null character in a file. The +incompatible type warning has been moved to message 2449.

    +]]> +
    + LINEAR + 5min +
    + + 2460 + L2460: string literal string provided as argument integer to function symbol + + A string, character, integer, or floating literal was provided as an argument to a function parameter which +was designated with the noliteral argument semantic indicating that the argument should not be a literal. For +example, perhaps a database connection function should not receive a string literal in the password argument +field. +

    References

    +

    MSC32-C. Properly seed pseudorandom number generators

    +

    MSC41-C. Never hard code sensitive information

    ]]> +
    + cert + LINEAR + 5min +
    + + 2461 + L2461: 'rand/random' function used without any explicit call to 'srand/srandom' + + This message is issued at the conclusion of global wrap-up if a call to the standard rand or POSIX random +function was found in the program but no call to the corresponding seed function srand or srandom was +found. +

    References

    +

    MSC32-C. Properly seed pseudorandom number generators

    ]]> +
    + cert + LINEAR + 5min +
    + + 2470 + L2470: multiple consecutive pushbacks onto stream is not portable + + A file stream was subjected to multiple consecutive pushbacks (such as by the ungetc function). Standard C +guarantees support for pushing back a single character. While some implementations support pushback of +multiple characters, this is non-portable. +

    References

    +

    FIO13-C. Never push back anything other than one read character

    ]]> +
    + cert + LINEAR + 5min +
    + + 2471 + L2471: operation on stream that has been closed + + An operation was performed on a file stream that has been closed. The value of a file pointer after calling +fclose is indeterminate and attempts to perform file operations in such a pointer result in undefined behavior. +

    References

    +

    FIO46-C. Do not access a closed file

    ]]> +
    + cert + misra + LINEAR + 5min +
    + + 2472 + L2472: non-standard file mode character/component 'string' in mode string 'string' + + A non-standard character was encountered in the mode argument to fopen or freopen. The allowable +characters are a, b, r, w, x, and +; other characters appearing in the mode argument results in undefined +behavior. +

    References

    +

    FIO11-C. Take care when specifying the mode parameter of fopen()

    ]]> +
    + cert + LINEAR + 5min +
    + + 2473 + L2473: file mode string 'string' is not a legal file open mode: string + + The mode argument in a call to fopen or freopen contained valid characters but was not one of the +specific combinations allowed by Standard C and therefore will result in undefined behavior. The allowed +combinations are:

    +
    
    +"r"      "w"      "wx"      "a"
    +"rb"     "wb"     "wbx"     "ab"
    +"r+"     "w+"     "w+x"     "a+"
    +"r+b"    "w+b"    "w+bx"    "a+b"
    +"rb+"    "wb+"    "wb+x"    "ab+"
    +
    +

    The second string parameter provides an explanation of why the mode argument is invalid. +

    References

    +

    FIO11-C. Take care when specifying the mode parameter of fopen()

    ]]> +
    + cert + LINEAR + 5min +
    + + 2474 + L2474: attempt to flush stream that isn't open for writing + + + + LINEAR + 5min + + + 2475 + L2475: attempt to flush stream after an input operation + + + + LINEAR + 5min + + + 2476 + L2476: attempt to perform read operation on stream not opened for reading + + + + LINEAR + 5min + + + 2477 + L2477: attempt to perform write operation on stream not opened for writing + + + + misra + LINEAR + 5min + + + 2478 + L2478: attempt to perform read operation on stream after write without an intervening flush or reposition + + An attempt was made to read from a file stream following a write operation on the stream. Failure to flush +or reposition the stream between a write and subsequent read operation results in undefined behavior. +

    References

    +

    FIO39-C. Do not alternately input and output from a stream without an intervening flush or positioning call

    ]]> +
    + cert + LINEAR + 5min +
    + + 2479 + L2479: attempt to perform write operation on stream after read without an intervening reposition + + An attempt was made to write to a file stream following a read operation on the stream. Failure to reposition +the stream between a read and subsequent write operation results in undefined behavior. +

    References

    +

    FIO39-C. Do not alternately input and output from a stream without an intervening flush or positioning call

    ]]> +
    + cert + LINEAR + 5min +
    + + 2480 + L2480: attempt to perform byte-oriented operation on stream following wide-stream operation + + A byte-oriented file manipulation function was called with a wide-oriented file stream which results in +undefined behavior. +

    References

    +

    STR38-C. Do not confuse narrow and wide character strings and functions

    ]]> +
    + cert + LINEAR + 5min +
    + + 2481 + L2481: attempt to perform wide-oriented operation on stream following byte-stream operation + + A wide-oriented file manipulation function was called with a byte-oriented file stream which results in +undefined behavior. +

    References

    +

    STR38-C. Do not confuse narrow and wide character strings and functions

    ]]> +
    + cert + LINEAR + 5min +
    + + 2498 + L2498: comparison of object representations of floating point values of member symbol of type type may produce unexpected results that differ from a value equality test + + Bitwise comparison of structures containing floating point values leads to the comparison of the object +representations of data members of floating point type. See 2499. +

    References

    +

    FLP37-C. Do not use object representations to compare floating-point values

    ]]> +
    + cert + misra + LINEAR + 5min +
    + + 2499 + L2499: comparison of object representations of floating point values of type type may produce unexpected results that differ from a value equality test + + Bitwise comparison of the object representations of floating point values may differ in a number of ways from +value comparison using comparison operators. Common differences include inequality of representations of +zero and negative zero and equality of identical NaN representations (but inequality of NaNs with different +payload bits). +

    References

    +

    FLP37-C. Do not use object representations to compare floating-point values

    ]]> +
    + cert + misra + LINEAR + 5min +
    + + 2601 + L2601: passing address of auto variable symbol to parameter integer of function symbol + + A pointer to automatic storage was passed as an argument to a function parameter with the no_ptr_to_auto +semantic. Note that during a specific walk this message is not limited to local variables in the immediate +function performing the call, for example:

    +
    
    +    1  //lint -sem(save, no_ptr_to_auto(1))
    +    2  void save(int* p);
    +    3  void g(int* x) {
    +    4      save(x);
    +    5  }
    +    6  void f(void) {
    +    7      int a = 5;
    +    8      g(&a);
    +    9  }
    +
    +

    will report:

    +

    4 warning 2601: passing address of auto variable ’a’ to parameter 1 of + function ’save’ + save(x); + ^

    +

    8 supplemental 894: during specific walk g(&(5)) + g(&a); + ^ +

    References

    +

    POS34-C. Do not call putenv() with a pointer to an automatic variable as the argument

    ]]> +
    + cert + LINEAR + 5min +
    + + 2618 + L2618: non-type specifier 'string' appears after a type + + A non-type specifier was provided after a type specifier in a declaration. For example int inline foo(); will +elicit this message. The non-type specifiers reported by this message are: friend, constexpr, thread_local, +mutable, inline, virtual, and explicit. See also message 618 which reports storage class specifiers +appearing after a type and message 963 which reports on const and volatile qualifiers before or after a +type.

    +]]> +
    + LINEAR + 5min +
    + + 2666 + L2666: expression with side effects passed to unexpanded parameter integer of macro 'string': detail + + This message is issued when a function-like macro is invoked with a parameter that appears as though it +would have side effects if it were evaluated but since the corresponding parameter is not expanded in the +macro definition, no side-effect will occur. E.g.:

    +
    
    +    #define DEBUG_VAL(x)
    +    
    +    int process(int i) {
    +        DEBUG_VAL(++i); // 2666 - increment doesn’t occur
    +        /* ... */
    +        return i;
    +    }
    +
    +

    Since the parameter isn’t expanded, ++i is not evaluated and the increment does not occur which may +be unexpected. If the intention is that the side-effect occurs regardless of how the macro is defined, the +expression provoking the side effect should be placed outside the macro invocation. For the purpose of this +message, any expression appearing to contain a function call is considered to have side-effects.

    +

    Detail is one of “parameter is not referenced in the expansion” or “parameter is only used with +#/## operators”. The message can be suppressed based on the value of the detail parameter by using +-estring. +

    References

    +

    PRE31-C. Avoid side effects in arguments to unsafe macros

    ]]> +
    + cert + LINEAR + 5min +
    + + 2670 + L2670: call to async-signal-unsafe function symbol within signal-handler-category symbol + + A signal handler called an async-signal-unsafe function. This is likely to cause undefined behavior. +

    References

    +

    SIG30-C. Call only asynchronous-safe functions within signal handlers

    ]]> +
    + cert + LINEAR + 5min +
    + + 2671 + L2671: returning from exception signal handler symbol + + An exception signal handler contained a return statement. This is likely to cause undefined behavior. +

    References

    +

    SIG35-C. Do not return from a computational exception signal handler

    ]]> +
    + cert + LINEAR + 5min +
    + + 2760 + L2760: 'srand/srandom' seeded with 'time' + + +This message is issued to report a call to the standard srand or POSIX srandom function if the seed argument +is the result of a call to the standard time function. While this is not uncommon, it is considered insecure. The +current time is predictable and the poor granularity measured in seconds on typical implementations makes +it easy to probe the entire window in which the application may have called the seed function. The current +time can also be manipulated in a variety of ways, not only through local access but also potentially through +updates from a malicious time server. The ability for an attacker to predict the sequence of pseudorandom +numbers that will be generated can render various algorithms insecure. +

    References

    +

    MSC32-C. Properly seed pseudorandom number generators

    ]]> +
    + cert + LINEAR + 5min +
    + + 2761 + L2761: call to non-async-signal-safe function symbol within signal-handler-category symbol + + A signal handler called a function that was not explicitly async-signal-safe. This could potentially lead to +undefined behavior.

    References

    +

    SIG30-C. Call only asynchronous-safe functions within signal handlers

    +]]> +
    + cert + INFO + LINEAR + 5min +
    + + 2762 + L2762: call to signal registration function symbol within signal-handler-category symbol + + A signal handler called a signal registration function. This could lead to undefined behavior if the signal +number being registered is not the same signal that invoked this signal handler.

    References

    +

    SIG34-C. Do not call signal() from within interruptible signal handlers

    +]]> +
    + cert + INFO + LINEAR + 5min +
    + + 2763 + L2763: call to signal registration function symbol within signal-handler-category symbol to register itself + + A signal handler called a signal registration function to register itself. This could potentially lead to undefined +behavior if the signal number being registered is not the same signal that invoked this signal handler.

    References

    +

    SIG34-C. Do not call signal() from within interruptible signal handlers

    +]]> +
    + cert + INFO + LINEAR + 5min +
    + + 2764 + L2764: exception signal handler symbol does not explicitly end the program + + An exception signal handler did not appear to unconditionally end the program. (The end of the function +body was reachable for the purposes of message 527.) This could potentially lead to undefined behavior.

    References

    +

    SIG35-C. Do not return from a computational exception signal handler

    +]]> +
    + cert + INFO + LINEAR + 5min +
    + + 2765 + L2765: reference to variable symbol which is neither atomic nor volatile sig_atomic_t within signalhandler-category symbol + + A signal handler referenced a non-local variable that was not _Atomic, std::atomic<T>, nor volatile +sig_atomic_t. This is likely to cause undefined behavior.

    References

    +

    SIG31-C. Do not access shared objects in signal handlers

    +]]> +
    + cert + INFO + LINEAR + 5min +
    + + 2960 + L2960: integer constant expression with value integer provided as argument integer to function symbol + + An integer constant expression was provided as an argument to a function parameter which was designated +with the noliteral argument semantic indicating that the argument should not be a literal. While an integer +constant expression does not necessarily consist of a single literal, it may be suspicious for many of the same +reasons as the value is constant. For example, perhaps you do not want srand to be seeded with a constant +expression to ensure it produces a different sequence on each execution. This message can be enabled or +suppressed for specific constant values.

    +]]> +
    + LINEAR + 5min +
    + + 3419 + L3419: in-class initializer for static data member symbol of type type is a GNU extension + + An in-class initializer for a static data member of floating point type was encountered. This is a non-portable +extension.

    +]]> +
    + LINEAR + 5min +
    + + 9010 + L9010: conversion from integer type type to pointer type type + + An expression of integral type (other than a null pointer constant) was converted to a pointer type (other +than void*).

    +]]> +
    + misra + LINEAR + 5min +
    + + 9040 + L9040: possible struct hack declaration for detail member symbol with integer element(s) + + Prior to C99 adding flexible array members, the now obsolete struct hack technique was widely used to create +structures who’s last member was an array with variable length. In addition, some compilers also allowed this +technique to create variable length array members within unions. The technique required the variable length +member array(s) to be declared with a size of either 0 or 1 within the declaration of the structure or union.

    +
    
    +    struct S {
    +        int a;
    +        int b[0];    // warning 9040
    +    };
    +
    +    union U {
    +        int a;
    +        short b[1];  // warning 9040
    +        char c[1];   // warning 9040
    +        double d;
    +    };
    +

    References

    +

    DCL38-C. Use the correct syntax when declaring a flexible array member

    +]]> +
    + cert + LINEAR + 5min +
    + + 9181 + L9181: switch contains fewer than two non-default switch cases + + A switch was seen with fewer than two non-default cases. A switch with fewer than two cases might be +better expressed as an if statement. See also message 9081.

    +]]> +
    + LINEAR + 5min +
    + + 9215 + L9215: unnamed parameter for 'virtual/non-virtual' function symbol + + This message is emitted when an unnamed function parameter is encountered in the definition of a function.

    +]]> +
    + misra + LINEAR + 5min +
    + + 9414 + L9414: 'typeid' used on expression with side effect + + If the operand of the typeid operator is an expression, it is not usually evaluated. Using typeid with an +expression that would have side effects if it were evaluated could result in confusion about whether the +apparent side-effects will actually take place.

    +]]> +
    + LINEAR + 5min +
    + + 9415 + L9415: 'auto' variable symbol initialized using 'string' list initialization + + Initializing an auto variable using list initialization can result in unexpected and compiler-dependent results. +Additionally, the rules governing the type deduced when using list initialization with auto variables changed +in C++17 which can result in code that has different meaning depending on the target language of the +compiler. For example:

    +
    
    +    auto j1{1};         // direct list initialization
    +                        // j1 is std::initializer_list<int> in C++11 and int in C++17
    +    auto j2 = {1};      // copy list initialization
    +                        // j2 is always std::initializer_list<int>
    +    auto j3 = 1;        // copy initialization - NOT list initialization
    +                        // j3 is always int
    +
    +

    This message will be issued for the initialization of j1 and j2. Avoiding list initialization for auto variables +can prevent unintended results. The string parameter is either ’direct’ or ’copy’ indicating the type of list +initialization employed (copy list initialization uses an equal sign, direct list initialization does not).

    +]]> +
    + LINEAR + 5min +
    + + 9418 + L9418: enum symbol does not have an explicitly specified underlying type + + Since C++11 it is possible to explicitly specify an underlying type for enums and enum classes. This message +is issued for enums that do not explicitly specify an underlying type in their definition. This message is not +issued in C or C++03 modes.

    +]]> +
    + LINEAR + 5min +
    + + 9419 + L9419: enum symbol is not a scoped enumeration + + Scoped enumerations (those using enum class or enum struct) were introduced in C++11 and limit the +scope of the enumeration constants to the enumeration. This message is issued for unscoped enums. This +message is not issued in C or C++03 modes.

    +]]> +
    + LINEAR + 5min +
    + + 9420 + L9420: bitfield symbol does not have unsigned integer or explicitly unsigned enumeration type + + This message is issued when a bitfield is declared with a type that is not an implementation-independent +unsigned integral type. In particular, the message is issued for bitfields with plain char, plain int, or wchar_t +types or types that are implicitly or explicitly signed such as short and signed short. For bitfields of +enumeration type, if the underlying type of the enumeration is explicitly specified as an unsigned type, the +message is suppressed. As it is only possible to specify an explicit underlying type for enumerations since +C++11, the message will be issued for all bitfields of enum type in C or C++03 modes.

    +]]> +
    + LINEAR + 5min +
    + + 9421 + L9421: virtual function symbol overrides function symbol and is not marked with 'override' or 'final' + + A virtual function that overrides a base class function was not declared with at least one of override or +final. This message is only emitted for C++11 and higher. See also 1915 which is issued when an overriding +function is not specified with override, even if final is specified.

    +]]> +
    + LINEAR + 5min +
    + + 9422 + L9422: virtual function symbol should specify exactly one of 'virtual', 'override', or 'final' + + A virtual function was declared without specifying exactly one of virtual, override, or final. Some +authors suggest that virtual should be specified in the base class and that overriding functions should be +specified with either override or final and without a redundant virtual specifier. This message is only +issued for C++11 and higher.

    +]]> +
    + LINEAR + 5min +
    + + 9432 + L9432: class symbol has multiple non-interface bases + + An interface is a class where 1) all non-static member functions (if any) are public, virtual, and pure, and 2) +all data members (if any) are public, static (or thread_local), and constexpr (or const in C++ modes prior +to C++11). This message is issued when a class inherits from more than one non-interface class. The list of +non-interface bases are provided in a supplemental message.

    +]]> +
    + LINEAR + 5min +
    + + 9433 + L9433: literal operator function symbol declared + + This message is issued whenever a literal operator function declaration is encountered. Literal operators +introduce user-defined literal suffixes that can be applied to certain types of literals. See also message 9434 +which is issued when a literal operator is invoked by a user-defined literal.

    +]]> +
    + LINEAR + 5min +
    + + 9434 + L9434: user-defined literal with suffix string used + + This message is issued when a user-defined literal is encountered. This message is parameterized by the suffix +used and can be suppressed for individual suffixes using -estring. See also message 9433 which is issued for +the declaration of literal operator functions which introduce user-defined suffixes.

    +]]> +
    + LINEAR + 5min +
    + + 9435 + L9435: string symbol declared as friend in class symbol + + This message is issued when a friend declaration is encountered. The string parameter is either symbol or +type to indicate the kind of entity declared as a friend. The first symbol parameter is the entity declared as +a friend unless the entity is a type in which case the parameter is actually a type parameter. The last symbol +is the class in which the friend declaration appeared. Some authors suggest that friend declarations reduce +encapsulation and should be avoided.

    +]]> +
    + LINEAR + 5min +
    + + 9436 + L9436: symbol symbol has array type type + + A symbol was declared with array type or reference to array type in a C++ module. Because arrays are +implicitly convertible to pointers and don’t maintain size information across such conversions, arrays are the +subject of various programming errors. Some authors suggest replacing arrays with other container types +such as std::array or std::vector. This message is not issued for static constexpr class data members +(or static const data members in C++03 where constexpr is not available).

    +]]> +
    + LINEAR + 5min +
    + + 9437 + L9437: non-POD class symbol defined with 'struct' keyword + + This message is issued when a non-POD class is defined using the struct keyword. Some authors suggest +that non-POD types should be defined using the class keyword which forces private default access control.

    +]]> +
    + LINEAR + 2min +
    + + 9501 + L9501: preprocessing directive in call to function symbol + + A preprocessing directive appeared within the call to a function, for example:

    +
    
    +    void init_buffer(void *buffer) {
    +        memset(buffer, 0,
    +    #ifdef LARGE_BUFFER
    +        1024
    +    #else
    +        128
    +    #endif
    +        );
    +    }
    +
    +

    The problem is that if memset is implemented as a macro, the presence of the embedded preprocessor +directives would invoke undefined behavior. PC-lint Plus issues message 436 when a preprocessor directive +appears inside a macro invocation but message 9501 can be used to warn about directives in function calls +that may be implemented as macros in other configurations or when compiled on other platforms. +One alternative is to move the directives outside the call, e.g.:

    +
    
    +    void init_buffer(void *buffer) {
    +        const unsigned buf_size =
    +    #ifdef LARGE_BUFFER
    +        1024
    +    #else
    +        128
    +    #endif
    +        ;
    +        memset(buffer, 0, buf_size);
    +    }
    +
    +

    This message isn’t issued if the function name is surrounded by parenthesis which suppresses the invocation +of a potential macro by the same name. This message is parameterized on the function being called and can +be enabled for specific functions using either +esym or +ecall. +

    References

    +

    PRE32-C. Do not use preprocessor directives in invocations of function-like macros

    ]]> +
    + cert + LINEAR + 5min +
    + + 9502 + L9502: multi-statement macro 'name' is not enclosed in monocarpic do-while loop + + A macro definition appeared to contain multiple statements but was not enclosed in a mono-carpic do/while +loop. A macro is considered to contain multiple statements if the replacement text contains one or more +semi-colons. A mono-carpic do/while loop is one that will be executed exactly once. PC-lint Plus is specifically +expecting a loop of the following form:

    +
    
    +    #define M(x) do { ... } while (0)
    +
    +

    where 0 may be replaced by any integer literal with a zero value (0u, 0x0, etc.), the false keyword or a +keyword that has been assigned the same meaning as false with the -rw_asgn option, or an identifier whose +name is false, ignoring case.

    +

    A macro that expands to multiple statements may result in unintentional interpretation during expansion. +For example:

    +
    
    +    #define ADJUST(a, b) a = (b); a++; b = 0
    +
    +

    would not work as intended if used as:

    +
    
    +    void foo(int a, int b) {
    +        if (a >= b)
    +            ADJUST(a, b);
    +    }
    +
    +

    which would expand to:

    +
    
    +    void foo(int a, int b) {
    +        if (a >= b)
    +            a = (b); a++; b = 0;
    +    }
    +
    +

    where the last two statements would be unconditionally executed as they are not part of the if statement. +Simply wrapping the macro definition in braces is not always sufficient:

    +
    
    +    #define ADJUST(a, b) { a = (b); a++; b = 0; }
    +
    +

    as this will prevent the macro from being usable in certain contexts, e.g.:

    +
    
    +    void foo(int a, int b) {
    +        if (a >= b)
    +            ADJUST(a, b);
    +        else
    +            ADJUST(b, a);
    +    }
    +
    +

    will result in a compile error as the else is not attached to the if statement because of the semi-colon. +Wrapping the replacement text in a do/while (0) loop addresses all of the related issues:

    +
    
    +    #define ADJUST(a, b) do { a = (b); a++; b = 0; } while (0)
    +
    +

    References

    +

    PRE10-C. Wrap multistatement macros in a do-while loop

    ]]> +
    + cert + LINEAR + 5min +
    + + 9906 + L9906: value tracking debug value: string + + (Debug) When an explicit cast is seen to a type defined by a typedef named __vt_alert, conventionally +a typedef for void, this message will be issued during Value Tracking parameterized by the value of the +subexpression as it would be displayed in a Value Tracking message. This may occur multiple times for the +same expression during specific walks.

    +]]> +
    + LINEAR + 5min +
    + +
    diff --git a/cxx-sensors/src/test/java/org/sonar/cxx/sensors/pclint/CxxPCLintRuleRepositoryTest.java b/cxx-sensors/src/test/java/org/sonar/cxx/sensors/pclint/CxxPCLintRuleRepositoryTest.java index dbc2a47861..1cb6462ea3 100644 --- a/cxx-sensors/src/test/java/org/sonar/cxx/sensors/pclint/CxxPCLintRuleRepositoryTest.java +++ b/cxx-sensors/src/test/java/org/sonar/cxx/sensors/pclint/CxxPCLintRuleRepositoryTest.java @@ -36,7 +36,7 @@ public void createRulesTest() { def.define(context); RulesDefinition.Repository repo = context.repository(CxxPCLintRuleRepository.KEY); - assertEquals(1857, repo.rules().size()); + assertEquals(1920, repo.rules().size()); } }