EN JP CN

MISRA-C 2012 with Amendment 1 checker reference

These checkers detect violations of the MISRA-C 2012 standard.

Notes

  • This reference table includes Amendment 1. If you prefer to see the version without the amendment included, see MISRA-C 2012 チェッカー リファレンス.
  • For instructions on how to enable the MISRA checkers, see MISRA チェッカー パッケージのインストール
  • We provide full help for each MISRA-C and MISRA-C++ checker. Because this information is licensed, it is available as a part of your Klocwork installation, rather than online.
  • There are also several default checkers which detect violations of the MISRA standard. They are listed in Klocwork チェッカーにマッピングされた MISRA-C 2012 規則.
  • The information on MISRA checkers in the online Documentation reflects the latest service releases and patches.
  • For MISRA.SHIFT.RANGE.2012, the implemented checker addresses the rule only partially, namely only in the cases where the right-hand side of the shift operator is constant.

MISRA-C 2012 C90

Issue codeDescriptionMISRA-C RuleIssuedImproved
ABV.ANY_SIZE_ARRAY Buffer Overflow - Array Index Out of Bounds21.17, 21.18Pre-9.29.5
ABV.GENERAL Buffer Overflow - Array Index Out of Bounds21.17, 21.189.610.1, 10.3, 10.4, 11.0, 11.1, 11.2
ABV.MEMBER Buffer Overflow - Array Index Out of Bounds21.17, 21.189.510.3
ABV.STACK Buffer Overflow - Local Array Index Out of Bounds21.17, 21.18Pre-9.29.5
ABV.TAINTED Buffer Overflow from Unvalidated InputDir. 4.14Pre-9.29.5, 10.3, 11.2
ABV.UNKNOWN_SIZE Buffer Overflow - Array Index Out of Bounds21.17, 21.189.6 
EFFECT Statement has no effect2.2Pre-9.2 
FMM.MIGHT Freeing Mismatched Memory - possible22.2Pre-9.210.1
FMM.MUST Freeing Mismatched Memory22.2Pre-9.210.1
FNH.MIGHT Freeing Non-Heap Memory - possible22.2Pre-9.2 
FNH.MUST Freeing Non-Heap Memory22.2Pre-9.2 
FREE.INCONSISTENT Inconsistent Freeing of Memory22.1Pre-9.2 
FUM.GEN.MIGHT Freeing Unallocated Memory - possible22.2Pre-9.2 
FUM.GEN.MUST Freeing Unallocated Memory22.2Pre-9.2 
FUNCRET.GEN Non-void function does not return value17.4Pre-9.2 
FUNCRET.IMPLICIT Non-void function implicitly returning int does not return value17.4Pre-9.2 
INVARIANT_CONDITION.GEN Invariant expression in a condition14.310.110.2
INVARIANT_CONDITION.UNREACH Invariant expression in a condition14.310.110.2
LA_UNUSED Label unused2.6Pre-9.2 
LOCRET.ARG Function returns address of local variable18.6Pre-9.29.5
LOCRET.GLOB Function returns address of local variable18.6Pre-9.29.5
LOCRET.RET Function returns address of local variable18.6Pre-9.29.5
LV_UNUSED.GEN Local variable unused2.2Pre-9.2 

MISRA.ASM.ENCAPS

Assembly language is not isolated.Dir. 4.39.1 

MISRA.ASSIGN.OVERLAP

Object is assigned to an overlapping object19.19.5 

MISRA.ASSIGN.SUBEXPR.2012

The result of an assignment operator is used13.411.3 

MISRA.BITFIELD.SIGNED

Length of a named signed bit-field is less than 26.29.19.2, 10.4

MISRA.BITFIELD.TYPE

Type of bit-field is not signed/unsigned integer6.19.19.2, 11.0

MISRA.BREAK_OR_GOTO.MULTIPLE.2012

Iteration statement has more than one break or goto for loop termination.15.410.2 

MISRA.BUILTIN_NUMERIC

Builtin numeric type is usedDir. 4.69.19.2, 9.2 SR1, 9.5

MISRA.CAST.CONST

Cast operation removes const or volatile modifier from a pointer or reference11.89.19.2, 10.4

MISRA.CAST.FUNC_PTR.2012

Conversion performed between a pointer to a function and another incompatible type11.110.210.3

MISRA.CAST.INCOMPLETE_PTR_TO_ANY.2012

Conversion performed between a pointer to an incomplete type and a different type11.210.210.3

MISRA.CAST.OBJ_PTR_TO_INT.2012

Conversion performed between a pointer to an object and an integer type11.410.210.3

MISRA.CAST.OBJ_PTR_TO_NON_INT.2012

A cast between a pointer to object and a non-integer arithmetic type11.710.2 

MISRA.CAST.OBJ_PTR_TO_OBJ_PTR.2012

Cast between a pointer to object type and a pointer to a different object type11.310.210.3

MISRA.CAST.VOID_PTR_TO_INT.2012

Cast between a pointer to void and an arithmetic type11.610.2 

MISRA.CAST.VOID_PTR_TO_OBJ_PTR.2012

Conversion performed from a pointer to void to a pointer to an object11.510.210.3

MISRA.CHAR.TRIGRAPH

Trigraph usage4.29.19.2

MISRA.COMMA

Comma operator is used12.39.1 

MISRA.COMP.WRAPAROUND

Wrap-around in a condition12.49.29.5

MISRA.CT.UNIQUE.ID

Identifier clashes with type name5.79.19.2, 9.2 SR1

MISRA.DECL.ARRAY_SIZE

Declaration of array with unknown size8.119.1 

MISRA.DECL.NO_TYPE

Declaration without a type8.19.19.2 SR1

MISRA.DEFINE.FUNC

Function-like macro definitionDir. 4.99.1 

MISRA.DEFINE.SHARP

# or ## operator in a macro definition20.109.1 

MISRA.DEFINE.SHARP.ORDER.2012

A macro parameter immediately following a # operator shall not immediately be followed by a ## operator20.1111.3 

MISRA.DEFINE.SHARP.REPLACE.2012

Macro parameter used as an operand to the # or ## operators, which is itself subject to further macro replacement, shall only be used as an operand to these operators20.1211.3 

MISRA.DEFINE.WRONGNAME

Usage of a name from the standard library for naming a macro21.19.19.2 SR2, 9.5

MISRA.DEFINE.WRONGNAME.UNDERSCORE

Usage of a reserved name for naming a macro21.19.2 SR2 

MISRA.ELIF.OTHERFILE

#elif in an improper file20.149.1 

MISRA.ELIF.UNDEF

Undefined macros in #elif directive20.99.1 

MISRA.ELSE.OTHERFILE

#else in an improper file20.149.1 

MISRA.ENDIF.OTHERFILE

#endif in an improper file20.149.1 

MISRA.ENUM.IMPLICIT.VAL.NON_UNIQUE.2012

Implicit enumerator value is not unique8.1210.2 

MISRA.ETYPE.ASSIGN.2012

Assignment to an object of a narrower essential type or a different essential type category10.310.210.3, 11.0

MISRA.ETYPE.CATEGORY.DIFFERENT.2012

The operands of an operator in which the usual arithmetic conversions are performed do not have the same essential type category10.410.211.3

MISRA.ETYPE.ASSIGN.2012

The value of a composite expression is assigned to an object with a wider essential type10.610.210.3

MISRA.ETYPE.COMP.CAST.EXPL.DIFFERENT.2012

The value of a composite expression is cast to a different essential type category10.810.2 

MISRA.ETYPE.COMP.CAST.EXPL.WIDER.2012

The value of a composite expression is cast to a wider essential type10.810.2 

MISRA.ETYPE.COMP.CAST.IMPL.WIDER.2012

A composite expression used as an operand of an operator in which the usual arithmetic conversions are performed has its other operand having a wider essential type10.710.2 

MISRA.ETYPE.INAPPR.CAST.2012

The value of an expression is cast to an inappropriate essential type10.510.2 

MISRA.ETYPE.INAPPR.CHAR.2012

Inappropriate usage of Essentially Character type in an addittion or subtraction operation10.210.2 

MISRA.ETYPE.INAPPR.OPERAND.BINOP.2012

Operand(s) to a binary operator have inappropriate essential type10.110.2 

MISRA.ETYPE.INAPPR.OPERAND.INDEXPR.2012

Index expression has inappropriate essential type10.110.2 

MISRA.ETYPE.INAPPR.OPERAND.TERNOP.2012

First operand to a ternary operator has inappropriate essential type10.110.2 

MISRA.ETYPE.INAPPR.OPERAND.UNOP.2012

Operand to a unary operator has inappropriate essential type10.110.2 

MISRA.EXPANSION.DIRECTIVE

Directive-like tokens within a macro argument20.69.1 

MISRA.EXPR.PARENS.2012

The precedence of operators within expressions should be made explicit12.110.3 

MISRA.EXPR.PARENS.SIZEOF.2012

The precedence of operators within expressions should be made explicit12.110.3 

MISRA.FILE_PTR.DEREF.2012

A pointer to a FILE object shall not be dereferenced22.511.1 

MISRA.FILE_PTR.DEREF.CAST.2012

A pointer to a FILE object shall not be indirectly dereferenced by a system function22.511.1 

MISRA.FILE_PTR.DEREF.INDIRECT.2012

A pointer to a FILE object (returned by a function) shall not be dereferenced22.511.1 

MISRA.FILE_PTR.DEREF.RETURN.2012

A pointer to a FILE object shall not be dereferenced22.511.1 

MISRA.FOR.COUNTER.FLT

For loop counter has a floating point type14.19.2 

MISRA.FUNC.MODIFIEDPAR.2012

A function parameter should not be modified17.82017 

MISRA.FUNC.NOPROT.CALL

Function is called but has no prototype17.3 8.29.29.2 SR1

MISRA.FUNC.NOPROT.DEF.2012

Function has a definition but no prototype8.42017 

MISRA.FUNC.NO_PARAMS

Function without parameters is missing void parameter type8.29.1 

MISRA.FUNC.PROT_FORM.KR.2012

Function types shall be in prototype form8.210.2 

MISRA.FUNC.RECUR

Recursive function17.29.19.2, 9.2 SR1

MISRA.FUNC.STATIC.REDECL

Function or object redeclaration does not include 'static' modifier8.89.2 

MISRA.FUNC.UNMATCHED.PARAMS

Number of formal and actual parameters passed to function do not match17.3 8.29.1 

MISRA.FUNC.UNNAMED.PARAMS

Function declaration has unnamed parameters8.29.1 

MISRA.FUNC.UNUSEDPAR.2012

Unused parameters in functions2.711.3 

MISRA.FUNC.UNUSEDRET.2012

The return value of a non-void function shall be used17.711.1 

MISRA.FUNC.VARARG

Function with variable number of arguments17.19.1 

MISRA.GOTO

Goto statement is used15.19.1 

MISRA.GOTO.AFTER_LABEL.2012

Goto jumps to label declared before in same function.15.210.2 

MISRA.GOTO.NESTED.2012

Label referenced by goto is not in this or enclosing block.15.310.2 

MISRA.IDENT.DISTINCT.C90.2012

Identifiers declared in the same scope and name space shall be distinct5.211.2 

MISRA.IF.NO_COMPOUND

The body of if/else statement is not a compound statement15.69.1 

MISRA.IF.NO_ELSE

A chain of if/else-if statements is not terminated with else or is terminated with an empty else clause15.79.110.4

MISRA.IF.UNDEF

Undefined macros in #if directive20.99.1 

MISRA.INCGUARD

Include guard is not providedDir. 4.109.1 

MISRA.INCL.BAD

Non-standard include directive20.39.19.2, 11.1

MISRA.INCL.INSIDE

Include directive preceded by a preprocessor output token20.19.1 

MISRA.INCL.SIGNAL.2012

The standard header file signal.h shall not be used.21.511.3 

MISRA.INCL.STDIO.2012

The standard header files stdio.h shall not be used.21.611.3 

MISRA.INCL.SYMS

Non-standard characters in header file names20.29.1 

MISRA.INCL.TIME.2012

The standard header file time.h shall not be used21.1011.3 

MISRA.INCR_DECR.SIDEEFF.2012

A full expression containing an increment (++) or decrement (--) operator should have no other potential side effects other than that caused by the increment or decrement operator13.32017 

MISRA.INIT.BRACES.2012

The initializer for an aggregate or union shall be enclosed in braces9.210.3 

MISRA.INIT.PARTIAL.2012

Arrays shall not be partially initialized9.310.3 

MISRA.LITERAL.NULL.PTR.CONST.2012

The macro NULL shall be the only permitted form of integer null pointer constant11.911.2 

MISRA.LITERAL.UNSIGNED.SUFFIX

Unsigned integer literal without 'U' suffix7.29.19.5

MISRA.LOGIC.SIDEEFF

Right operand in a logical 'and' or 'or' expression contains side effects13.59.210.4

MISRA.MEMB.FLEX_ARRAY.2012

Flexible array members shall not be declared18.711.2 

MISRA.PPARAM.NEEDS.CONST

Pointer parameter is not used to modify the addressed object but is not declared as a pointer to const8.139.19.2 SR1, 9.5, 10.4

MISRA.PTR.ARITH.2012

Pointer is used in arithmetic expression18.42017 

MISRA.PTR_TO_PTR_TO_PTR

Pointer declaration has more than two levels of indirection18.59.19.2

MISRA.RESOURCES.FILE.USE_AFTER_CLOSE.2012

The value of a pointer to a FILE shall not be used after the associated stream has been closed22.62017 

MISRA.RETURN.NOT_LAST

Return is not the last statement in a function15.59.19.2 SR2, 9.5

MISRA.SHIFT.RANGE.2012

Right operand of shift operation is out of range - greater or equal to the essential type size of left operand, or is negative12.210.2 

MISRA.SIZEOF.SIDE_EFFECT

Operand of sizeof has side effects13.69.1 

MISRA.STDLIB.ABORT.2012_AMD1

The library functions abort, exit, and system of 'stdlib.h' shall not be used21.82017 

MISRA.STDLIB.ATOI

Use of 'atof', 'atoi' or 'atol' from library stdlib.h21.79.1 

MISRA.STDLIB.BSEARCH.2012

The library functions bsearch and qsort of <stdlib.h> shall not be used21.911.2 

MISRA.STDLIB.LONGJMP

Use of setjmp macro or longjmp function21.49.1 

MISRA.STDLIB.MEMORY

Use of dynamic heap memory allocation21.39.1 

MISRA.STDLIB.SIGNAL

Use of the signal handling facilities of signal.h21.59.1 

MISRA.STDLIB.STDIO

Use of input/output library stdio.h in production code21.69.1 

MISRA.STDLIB.TIME

Use of the time handling functions of library time.h21.109.1 

MISRA.STDLIB.WRONGNAME

Reused name of standard library macro, object or function21.29.19.2 SR2

MISRA.STDLIB.WRONGNAME.UNDERSCORE

Usage of a reserved name for naming a language entity21.29.2 SR2 

MISRA.STMT.COND.NOT_BOOLEAN.2012

The controlling expression of an if statement and the controlling expression of an iteration-statement shall have essentially Boolean type14.410.4 

MISRA.STMT.NO_COMPOUND

The body of switch, while, do/while or for statement is not a compound statement15.69.1 

MISRA.STRING_LITERAL.NON_CONST.2012

A string literal shall not be assigned to an object unless the object's type is "pointer to const-qualified char"7.410.4 

MISRA.SWITCH.COND.BOOL.2012

A switch-expression shall not have essentially Boolean type16.710.3 

MISRA.SWITCH.WELL_FORMED.2012

All switch statements shall be well-formed16.110.3 

MISRA.SWITCH.WELL_FORMED.BREAK.2012

An unconditional break statement shall terminate every switch-clause16.310.3 

MISRA.SWITCH.WELL_FORMED.DEFAULT.2012

Every switch statement shall have a default label16.410.3 

MISRA.SWITCH.WELL_FORMED.DEFAULT.FIRST_OR_LAST.2012

A default label shall appear as either the first or the last switch label of a switch statement16.510.3 

MISRA.SWITCH.WELL_FORMED.NESTED_LABEL.2012

A switch label shall only be used when the most closely-enclosing compound statement is the body of a switch statement16.210.3 

MISRA.SWITCH.WELL_FORMED.TWO_CLAUSES.2012

Every switch statement shall have at least two switch-clauses16.610.3 

MISRA.TOKEN.BADCOM

Inappropriate character sequence in a comment3.19.1 

MISRA.TOKEN.L.SUFFIX.FLOAT

The lowercase character "I" shall not be used in a literal suffix7.310.4 

MISRA.TOKEN.L.SUFFIX.INT

The lowercase character "I" shall not be used in a literal suffix7.310.4 

MISRA.TOKEN.OCTAL.INT

Usage of octal integer constants7.19.1 

MISRA.TYPEDEF.NOT_UNIQUE

Typedef name is used for another entity5.69.19.2, 9.5

MISRA.UNDEF

Undef usage20.59.1 

MISRA.UNDEF.WRONGNAME

Undefinition of a name from the standard library21.19.19.5

MISRA.UNDEF.WRONGNAME.UNDERSCORE

Undefinition of a reserved name21.19.2 SR2 

MISRA.UNION

Union is used19.29.1 

MISRA.USE.UNKNOWNDIR

Unknown preprocessor directive is used20.139.111.3

MISRA.VAR.HIDDEN

Identifier declared in an inner scope hides identifier in outer scope5.39.29.2 SR1, 9.5, 10.1
MLK.MIGHT Memory Leak - possible22.1Pre-9.29.2, 9.5
MLK.MUST Memory Leak22.1Pre-9.29.2, 9.5, 11.1
MLK.RET.MIGHT Memory Leak - possible22.19.6 
MLK.RET.MUST Memory Leak22.19.6 
NNTS.MIGHT Buffer Overflow - Non-null Terminated String21.17Pre-9.29.2, 10.3
NNTS.MUST Buffer Overflow - Non-null Terminated String21.17Pre-9.29.2, 10.3
NNTS.TAINTED Unvalidated User Input Causing Buffer Overflow - Non-Null Terminated StringDir. 4.14Pre-9.29.2, 10.3
PORTING.VAR.EFFECTS Variable used twice in one expression where one usage is subject to side-effects13.29.29.5
RH.LEAK Resource leak22.1Pre-9.29.5, 11.1
SV.TAINTED.ALLOC_SIZE Use of Unvalidated Integer in Memory AllocationDir. 4.14Pre-9.210.1, 10.2
SV.TAINTED.BINOP Use of Unvalidated Integer in Binary OperationDir. 4.1410.3 
SV.TAINTED.CALL.BINOP Use of Unvalidated Integer in Binary OperationDir. 4.1410.3 
SV.TAINTED.CALL.DEREF Dereference Of An Unvalidated PointerDir. 4.1411.2 
SV.TAINTED.CALL.INDEX_ACCESS Use of Unvalidated Integer as Array Index by Function CallDir. 4.14Pre-9.210.1, 10.2
SV.TAINTED.CALL.LOOP_BOUND Use of Unvalidated Integer in Loop Condition through a Function CallDir. 4.14Pre-9.210.1, 10.2
SV.TAINTED.DEREF Dereference Of An Unvalidated PointerDir. 4.1411.2 
SV.TAINTED.FMTSTR Use of Unvalidated Data in a Format StringDir. 4.14Pre-9.210.1
SV.TAINTED.INDEX_ACCESS Use of Unvalidated Integer as Array IndexDir. 4.14Pre-9.210.1, 10.2, 11.1
SV.TAINTED.INJECTION Command InjectionDir. 4.14Pre-9.210.1
SV.TAINTED.LOOP_BOUND Use of Unvalidated Integer in Loop ConditionDir. 4.14Pre-9.210.1, 10.2
SV.TAINTED.PATH_TRAVERSAL Use of Unvalidated Data in a Path TraversalDir. 4.1411.0 
SV.TAINTED.SECURITY_DECISION Security DecisionDir. 4.1410.4 
UNINIT.HEAP.MIGHT Uninitialized Heap Use - possible9.1Pre-9.29.2, 9.5
UNINIT.HEAP.MUST Uninitialized Heap Use9.1Pre-9.29.2, 9.5
UNINIT.STACK.ARRAY.MIGHT Uninitialized Array - possible9.1Pre-9.29.2, 9.5
UNINIT.STACK.ARRAY.MUST Uninitialized Array9.1Pre-9.29.2, 9.5
UNINIT.STACK.ARRAY.PARTIAL.MUST Partialy Uninitialized Array9.1Pre-9.29.2, 9.5
UNINIT.STACK.MIGHT Uninitialized Variable - possible9.1Pre-9.29.2, 9.5
UNINIT.STACK.MUST Uninitialized Variable9.1Pre-9.29.2, 9.5, 11.2
UNREACH.GEN Unreachable code2.1Pre-9.29.2, 9.5, 10.1, 10.3, 10.4, 11.2
UNREACH.RETURN Unreachable Void Return2.1Pre-9.29.2, 9.5, 11.2
VA_UNUSED.GEN Value is Never Used after Assignment2.2Pre-9.29.5
VA_UNUSED.INIT Value is Never Used after Initialization2.2Pre-9.29.5, 11.2

MISRA-C 2012 C99

Issue codeDescriptionMISRA-C RuleIssuedImproved
ABV.ANY_SIZE_ARRAY Buffer Overflow - Array Index Out of Bounds21.17, 21.18Pre-9.29.5
ABV.GENERAL Buffer Overflow - Array Index Out of Bounds21.17, 21.189.610.1, 10.3, 10.4, 11.0, 11.1, 11.2
ABV.MEMBER Buffer Overflow - Array Index Out of Bounds21.17, 21.189.510.3
ABV.STACK Buffer Overflow - Local Array Index Out of Bounds21.17, 21.18Pre-9.29.5
ABV.TAINTED Buffer Overflow from Unvalidated InputDir. 4.14Pre-9.29.5, 10.3, 11.2
ABV.UNKNOWN_SIZE Buffer Overflow - Array Index Out of Bounds21.17, 21.189.6 
EFFECT Statement has no effect2.2Pre-9.2 
FMM.MIGHT Freeing Mismatched Memory - possible22.2Pre-9.210.1
FMM.MUST Freeing Mismatched Memory22.2Pre-9.210.1
FNH.MIGHT Freeing Non-Heap Memory - possible22.2Pre-9.2 
FNH.MUST Freeing Non-Heap Memory22.2Pre-9.2 
FREE.INCONSISTENT Inconsistent Freeing of Memory22.1Pre-9.2 
FUM.GEN.MIGHT Freeing Unallocated Memory - possible22.2Pre-9.2 
FUM.GEN.MUST Freeing Unallocated Memory22.2Pre-9.2 
FUNCRET.GEN Non-void function does not return value17.4Pre-9.2 
FUNCRET.IMPLICIT Non-void function implicitly returning int does not return value17.4Pre-9.2 
INVARIANT_CONDITION.GEN Invariant expression in a condition14.310.110.2
INVARIANT_CONDITION.UNREACH Invariant expression in a condition14.310.110.2
LA_UNUSED Label unused2.6Pre-9.2 
LOCRET.ARG Function returns address of local variable18.6Pre-9.29.5
LOCRET.GLOB Function returns address of local variable18.6Pre-9.29.5
LOCRET.RET Function returns address of local variable18.6Pre-9.29.5
LV_UNUSED.GEN Local variable unused2.2Pre-9.2 

MISRA.ARRAY.VAR_LENGTH.2012

Variable-length array types shall not be used18.811.2 

MISRA.ASM.ENCAPS

Assembly language is not isolatedDir. 4.39.1 

MISRA.ASSIGN.OVERLAP

Object is assigned to an overlapping object19.19.5 

MISRA.ASSIGN.SUBEXPR.2012

The result of an assignment operator is used13.411.3 

MISRA.BITFIELD.SIGNED

Length of a named signed bit-field is less than 26.29.19.2, 10.4

MISRA.BITFIELD.TYPE

Type of bit-field is not signed/unsigned integer6.19.19.2, 11.0

MISRA.BREAK_OR_GOTO.MULTIPLE.2012

Iteration statement has more than one break or goto for loop termination.15.410.2 

MISRA.BUILTIN_NUMERIC

Builtin numeric type is usedDir. 4.69.19.2, 9.2 SR1, 9.5

MISRA.CAST.CONST

Cast operation removes const or volatile modifier from a pointer or reference11.89.19.2, 10.4

MISRA.CAST.FUNC_PTR.2012

Conversion performed between a pointer to a function and another incompatible type11.110.210.3

MISRA.CAST.INCOMPLETE_PTR_TO_ANY.2012

Conversion performed between a pointer to an incomplete type and a different type11.210.210.3

MISRA.CAST.OBJ_PTR_TO_INT.2012

Conversion performed between a pointer to an object and an integer type11.410.210.3

MISRA.CAST.OBJ_PTR_TO_NON_INT.2012

A cast between a pointer to object and a non-integer arithmetic type11.710.2 

MISRA.CAST.OBJ_PTR_TO_OBJ_PTR.2012

Cast between a pointer to object type and a pointer to a different object type11.310.210.3

MISRA.CAST.VOID_PTR_TO_INT.2012

Cast between a pointer to void and an arithmetic type11.610.2 

MISRA.CAST.VOID_PTR_TO_OBJ_PTR.2012

Conversion performed from a pointer to void to a pointer to an object11.510.210.3

MISRA.CHAR.TRIGRAPH

Trigraph usage4.29.19.2

MISRA.COMMA

Comma operator is used12.39.1 

MISRA.COMP.WRAPAROUND

Wrap-around in a condition12.49.29.5

MISRA.CT.UNIQUE.ID

Identifier clashes with type name5.79.19.2, 9.2 SR1

MISRA.DECL.ARRAY_SIZE

Declaration of array with unknown size8.119.1 

MISRA.DECL.FUNC.INLINE.STATIC.2012

Declaration of inline function without static storage class8.1010.210.4

MISRA.DEFINE.FUNC

Function-like macro definitionDir. 4.99.1 

MISRA.DEFINE.SHARP

# or ## operator in a macro definition20.109.1 

MISRA.DEFINE.SHARP.ORDER.2012

A macro parameter immediately following a # operator shall not immediately be followed by a ## operator20.1111.3 

MISRA.DEFINE.SHARP.REPLACE.2012

Macro parameter used as an operand to the # or ## operators, which is itself subject to further macro replacement, shall only be used as an operand to these operators20.1211.3 

MISRA.DEFINE.STDIO.WCHAR.2012

Inappropriate macro expansion21.611.3 

MISRA.DEFINE.WCSFTIME.2012

No macro with 'wcsftime' name shall be expanded21.1011.3 

MISRA.DEFINE.WRONGNAME

Usage of a name from the standard library for naming a macro21.19.19.2 SR2, 9.5

MISRA.DEFINE.WRONGNAME.UNDERSCORE

Usage of a reserved name for naming a macro21.19.2 SR2 

MISRA.ELIF.OTHERFILE

#elif in an improper file20.149.1 

MISRA.ELIF.UNDEF

Undefined macros in #elif directive20.99.1 

MISRA.ELSE.OTHERFILE

#else in an improper file20.149.1 

MISRA.ENDIF.OTHERFILE

#endif in an improper file20.149.1 

MISRA.ENUM.IMPLICIT.VAL.NON_UNIQUE.2012

Implicit enumerator value is not unique8.1210.2 

MISRA.ETYPE.ASSIGN.2012

Assignment to an object of a narrower essential type or a different essential type category10.310.210.3, 11.0

MISRA.ETYPE.CATEGORY.DIFFERENT.2012

The operands of an operator in which the usual arithmetic conversions are performed do not have the same essential type category10.410.211.3

MISRA.ETYPE.ASSIGN.2012

The value of a composite expression is assigned to an object with a wider essential type10.610.210.3

MISRA.ETYPE.COMP.CAST.EXPL.DIFFERENT.2012

The value of a composite expression is cast to a different essential type category10.810.2 

MISRA.ETYPE.COMP.CAST.EXPL.WIDER.2012

The value of a composite expression is cast to a wider essential type10.810.2 

MISRA.ETYPE.COMP.CAST.IMPL.WIDER.2012

A composite expression used as an operand of an operator in which the usual arithmetic conversions are performed has its other operand having a wider essential type10.710.2 

MISRA.ETYPE.INAPPR.CAST.2012

The value of an expression is cast to an inappropriate essential type10.510.2 

MISRA.ETYPE.INAPPR.CHAR.2012

Inappropriate usage of Essentially Character type in an addittion or subtraction operation10.210.2 

MISRA.ETYPE.INAPPR.OPERAND.BINOP.2012

Operand(s) to a binary operator have inappropriate essential type10.110.2 

MISRA.ETYPE.INAPPR.OPERAND.INDEXPR.2012

Index expression has inappropriate essential type10.110.2 

MISRA.ETYPE.INAPPR.OPERAND.TERNOP.2012

First operand to a ternary operator has inappropriate essential type10.110.2 

MISRA.ETYPE.INAPPR.OPERAND.UNOP.2012

Operand to a unary operator has inappropriate essential type10.110.2 

MISRA.EXPANSION.DIRECTIVE

Directive-like tokens within a macro argument20.69.1 

MISRA.EXPR.PARENS.2012

The precedence of operators within expressions should be made explicit12.110.3 

MISRA.EXPR.PARENS.SIZEOF.2012

The precedence of operators within expressions should be made explicit12.110.3 

MISRA.FILE_PTR.DEREF.2012

A pointer to a FILE object shall not be dereferenced22.511.1 

MISRA.FILE_PTR.DEREF.CAST.2012

A pointer to a FILE object shall not be indirectly dereferenced by a system function22.511.1 

MISRA.FILE_PTR.DEREF.INDIRECT.2012

A pointer to a FILE object (returned by a function) shall not be dereferenced22.511.1 

MISRA.FILE_PTR.DEREF.RETURN.2012

A pointer to a FILE object shall not be dereferenced22.511.1 

MISRA.FOR.COUNTER.FLT

For loop counter has a floating point type14.19.2 

MISRA.FUNC.MODIFIEDPAR.2012

A function parameter should not be modified17.82017 

MISRA.FUNC.NOPROT.DEF.2012

Function has a definition but no prototype8.42017 

MISRA.FUNC.NO_PARAMS

Function without parameters is missing void parameter type8.29.1 

MISRA.FUNC.PROT_FORM.KR.2012

Function types shall be in prototype form8.210.2 

MISRA.FUNC.RECUR

Recursive function17.29.19.2, 9.2 SR1

MISRA.FUNC.STATIC.REDECL

Function or object redeclaration does not include 'static' modifier8.89.2 

MISRA.FUNC.UNNAMED.PARAMS

Function declaration has unnamed parameters8.29.1 

MISRA.FUNC.UNUSEDPAR.2012

Unused parameters in functions2.711.3 

MISRA.FUNC.UNUSEDRET.2012

The return value of a non-void function shall be used17.711.1 

MISRA.FUNC.VARARG

Function with variable number of arguments17.19.1 

MISRA.GOTO

Goto statement is used15.19.1 

MISRA.GOTO.AFTER_LABEL.2012

Goto jumps to label declared before in same function.15.210.2 

MISRA.GOTO.NESTED.2012

Label referenced by goto is not in this or enclosing block.15.310.2 

MISRA.IDENT.DISTINCT.C99.2012

Identifiers declared in the same scope and name space shall be distinct5.211.2 

MISRA.IF.NO_COMPOUND

The body of if/else statement is not a compound statement15.69.1 

MISRA.IF.NO_ELSE

A chain of if/else-if statements is not terminated with else or is terminated with an empty else clause15.79.110.4

MISRA.IF.UNDEF

Undefined macros in #if directive20.99.1 

MISRA.INCGUARD

Include guard is not providedDir. 4.109.1 

MISRA.INCL.BAD

Non-standard include directive20.39.19.2, 11.1

MISRA.INCL.INSIDE

Include directive preceded by a preprocessor output token20.19.1 

MISRA.INCL.SIGNAL.2012

The standard header file signal.h shall not be used.21.511.3 

MISRA.INCL.STDIO.2012

The standard header files stdio.h shall not be used.21.611.3 

MISRA.INCL.SYMS

Non-standard characters in header file names20.29.1 

MISRA.INCL.TIME.2012

The standard header file time.h shall not be used21.1011.3 

MISRA.INCL.TGMATH.2012

The standard header file tgmath.h shall not be used21.1111.3 

MISRA.INCR_DECR.SIDEEFF.2012

A full expression containing an increment (++) or decrement (--) operator should have no other potential side effects other than that caused by the increment or decrement operator13.32017 

MISRA.INIT.BRACES.2012

The initializer for an aggregate or union shall be enclosed in braces9.210.3 

MISRA.INIT.MULTIPLE.2012

An element of an object shall not be initialized more than once9.410.3 

MISRA.INIT.PARTIAL.2012

Arrays shall not be partially initialized9.310.3 

MISRA.INIT.SIZE.IMPLICIT.2012

Where designated initializers are used to initialize an array object the size of the array shall be specific explicitly9.510.3 

MISRA.LITERAL.NULL.PTR.CONST.2012

The macro NULL shall be the only permitted form of integer null pointer constant11.911.2 

MISRA.LITERAL.UNSIGNED.SUFFIX

Unsigned integer literal without 'U' suffix7.29.19.5

MISRA.LOGIC.SIDEEFF

Right operand in a logical 'and' or 'or' expression contains side effects13.59.210.4

MISRA.MEMB.FLEX_ARRAY.2012

Flexible array members shall not be declared18.711.2 

MISRA.PPARAM.NEEDS.CONST

Pointer parameter is not used to modify the addressed object but is not declared as a pointer to const8.139.19.2 SR1, 9.5, 10.4

MISRA.PTR.ARITH.2012

Pointer is used in arithmetic expression18.42017 

MISRA.PTR_TO_PTR_TO_PTR

Pointer declaration has more than two levels of indirection18.59.19.2

MISRA.RESOURCES.FILE.USE_AFTER_CLOSE.2012

The value of a pointer to a FILE shall not be used after the associated stream has been closed22.62017 

MISRA.RETURN.NOT_LAST

Return is not the last statement in a function15.59.19.2 SR2, 9.5

MISRA.SHIFT.RANGE.2012

Right operand of shift operation is out of range - greater or equal to the essential type size of left operand, or is negative12.210.2 

MISRA.SIZEOF.SIDE_EFFECT

Operand of sizeof has side effects13.69.1 

MISRA.STDLIB.ABORT.2012_AMD1

The library functions abort, exit, and system of 'stdlib.h' shall not be used21.82017 

MISRA.STDLIB.ATOI

Use of 'atof', 'atoi' or 'atol' from library stdlib.h21.79.1 

MISRA.STDLIB.BSEARCH.2012

The library functions bsearch and qsort of <stdlib.h> shall not be used21.911.2 

MISRA.STDLIB.LONGJMP

Use of setjmp macro or longjmp function21.49.1 

MISRA.STDLIB.MEMORY

Use of dynamic heap memory allocation21.39.1 

MISRA.STDLIB.SIGNAL

Use of the signal handling facilities of signal.h21.59.1 

MISRA.STDLIB.STDIO

Use of input/output library stdio.h in production code21.69.1 

MISRA.STDLIB.STDIO.WCHAR.2012

Wide-character equivalent identifiers from stdio.h shall not be used21.611.3 

MISRA.STDLIB.TIME

Use of the time handling functions of library time.h21.109.1 

MISRA.STDLIB.WCSFTIME.2012

The identifier 'wcsftime' shall not be used21.1011.3 

MISRA.STDLIB.WRONGNAME

Reused name of standard library macro, object or function21.29.19.2 SR2

MISRA.STDLIB.WRONGNAME.UNDERSCORE

Usage of a reserved name for naming a language entity21.29.2 SR2 

MISRA.STMT.COND.NOT_BOOLEAN.2012

The controlling expression of an if statement and the controlling expression of an iteration-statement shall have essentially Boolean type14.410.4 

MISRA.STMT.NO_COMPOUND

The body of switch, while, do/while or for statement is not a compound statement15.69.1 

MISRA.STRING_LITERAL.NON_CONST.2012

A string literal shall not be assigned to an object unless the object's type is "pointer to const-qualified char"7.410.4 

MISRA.SWITCH.COND.BOOL.2012

A switch-expression shall not have essentially Boolean type16.710.3 

MISRA.SWITCH.WELL_FORMED.2012

All switch statements shall be well-formed16.110.3 

MISRA.SWITCH.WELL_FORMED.BREAK.2012

An unconditional break statement shall terminate every switch-clause16.310.3 

MISRA.SWITCH.WELL_FORMED.DEFAULT.2012

Every switch statement shall have a default label16.410.3 

MISRA.SWITCH.WELL_FORMED.DEFAULT.FIRST_OR_LAST.2012

A default label shall appear as either the first or the last switch label of a switch statement16.510.3 

MISRA.SWITCH.WELL_FORMED.NESTED_LABEL.2012

A switch label shall only be used when the most closely-enclosing compound statement is the body of a switch statement16.210.3 

MISRA.SWITCH.WELL_FORMED.TWO_CLAUSES.2012

Every switch statement shall have at least two switch-clauses16.610.3 

MISRA.TOKEN.BADCOM

Inappropriate character sequence in a comment3.19.1 

MISRA.TOKEN.L.SUFFIX.FLOAT

The lowercase character "I" shall not be used in a literal suffix7.310.4 

MISRA.TOKEN.L.SUFFIX.INT

The lowercase character "I" shall not be used in a literal suffix7.310.4 

MISRA.TOKEN.OCTAL.INT

Usage of octal integer constants7.19.1 

MISRA.TYPE.RESTRICT.QUAL.2012

The restrict type qualifier shall not be used8.1411.3 

MISRA.TYPEDEF.NOT_UNIQUE

Typedef name is used for another entity5.69.19.2, 9.5

MISRA.UNDEF

Undef usage20.59.1 

MISRA.UNDEF.WRONGNAME

Undefinition of a name from the standard library21.19.19.5

MISRA.UNDEF.WRONGNAME.UNDERSCORE

Undefinition of a reserved name21.19.2 SR2 

MISRA.UNION

Union is used19.29.1 

MISRA.USE.UNKNOWNDIR

Unknown preprocessor directive is used20.139.111.3

MISRA.VAR.HIDDEN

Identifier declared in an inner scope hides identifier in outer scope5.39.29.2 SR1, 9.5, 10.1
MLK.MIGHT Memory Leak - possible22.1Pre-9.29.2, 9.5
MLK.MUST Memory Leak22.1Pre-9.29.2, 9.5, 11.1
MLK.RET.MIGHT Memory Leak - possible22.19.6 
MLK.RET.MUST Memory Leak22.19.6 
NNTS.MIGHT Buffer Overflow - Non-null Terminated String21.17Pre-9.29.2, 10.3
NNTS.MUST Buffer Overflow - Non-null Terminated String21.17Pre-9.29.2, 10.3
NNTS.TAINTED Unvalidated User Input Causing Buffer Overflow - Non-Null Terminated StringDir. 4.14Pre-9.29.2, 10.3
PORTING.VAR.EFFECTS Variable used twice in one expression where one usage is subject to side-effects13.29.29.5
RH.LEAK Resource leak22.1Pre-9.29.5, 11.1
SV.TAINTED.ALLOC_SIZE Use of Unvalidated Integer in Memory AllocationDir. 4.14Pre-9.210.1, 10.2
SV.TAINTED.BINOP Use of Unvalidated Integer in Binary OperationDir. 4.1410.3 
SV.TAINTED.CALL.BINOP Use of Unvalidated Integer in Binary OperationDir. 4.1410.3 
SV.TAINTED.CALL.DEREF Dereference Of An Unvalidated PointerDir. 4.1411.2 
SV.TAINTED.CALL.INDEX_ACCESS Use of Unvalidated Integer as Array Index by Function CallDir. 4.14Pre-9.210.1, 10.2
SV.TAINTED.CALL.LOOP_BOUND Use of Unvalidated Integer in Loop Condition through a Function CallDir. 4.14Pre-9.210.1, 10.2
SV.TAINTED.DEREF Dereference Of An Unvalidated PointerDir. 4.1411.2 
SV.TAINTED.FMTSTR Use of Unvalidated Data in a Format StringDir. 4.14Pre-9.210.1
SV.TAINTED.INDEX_ACCESS Use of Unvalidated Integer as Array IndexDir. 4.14Pre-9.210.1, 10.2, 11.1
SV.TAINTED.INJECTION Command InjectionDir. 4.14Pre-9.210.1
SV.TAINTED.LOOP_BOUND Use of Unvalidated Integer in Loop ConditionDir. 4.14Pre-9.210.1, 10.2
SV.TAINTED.PATH_TRAVERSAL Use of Unvalidated Data in a Path TraversalDir. 4.1411.0 
SV.TAINTED.SECURITY_DECISION Security DecisionDir. 4.1410.4 
UNINIT.HEAP.MIGHT Uninitialized Heap Use - possible9.1Pre-9.29.2, 9.5
UNINIT.HEAP.MUST Uninitialized Heap Use9.1Pre-9.29.2, 9.5
UNINIT.STACK.ARRAY.MIGHT Uninitialized Array - possible9.1Pre-9.29.2, 9.5
UNINIT.STACK.ARRAY.MUST Uninitialized Array9.1Pre-9.29.2, 9.5
UNINIT.STACK.ARRAY.PARTIAL.MUST Partialy Uninitialized Array9.1Pre-9.29.2, 9.5
UNINIT.STACK.MIGHT Uninitialized Variable - possible9.1Pre-9.29.2, 9.5
UNINIT.STACK.MUST Uninitialized Variable9.1Pre-9.29.2, 9.5, 11.2
UNREACH.GEN Unreachable code2.1Pre-9.29.2, 9.5, 10.1, 10.3, 10.4, 11.2
UNREACH.RETURN Unreachable Void Return2.1Pre-9.29.2, 9.5, 11.2
VA_UNUSED.GEN Value is Never Used after Assignment2.2Pre-9.29.5
VA_UNUSED.INIT Value is Never Used after Initialization2.2Pre-9.29.5, 11.2