Joint Strike Fighter Air Vehicle C++ IDs mapped to Klocwork C++ checkers
The table below maps the Joint Strike Fighter Air Vehicle C++ coding standard to Klocwork C++ checkers. The Joint Strike Fighter Air Vehicle C++ coding standard, developed by Lockheed Martin, helps programmers develop error-free code for safety-critical systems.
JSF AV ID | Checker Code and Description |
---|---|
011 |
MISRA.CHAR.TRIGRAPH Trigraph usage |
012 |
MISRA.CHAR.DIGRAPH Digraph usage |
014 |
MISRA.LITERAL.SUFFIX.CASE Literal suffix in lower case. |
017 |
MISRA.STDLIB.ERRNO Use of error indicator 'errno' |
018 |
MISRA.EXPANSION.UNSAFE Unsafe macro usage |
020 |
MISRA.STDLIB.LONGJMP Use of setjmp macro or longjmp function |
021 |
MISRA.STDLIB.SIGNAL Use of the signal handling facilities of signal.h |
022 |
MISRA.STDLIB.STDIO Use of input/output library stdio.h in production code |
023 |
MISRA.STDLIB.ATOI Use of 'atof', 'atoi' or 'atol' from library stdlib.h |
024 |
MISRA.STDLIB.ABORT Use of 'abort', 'exit', 'getenv' or 'system' from library stdlib.h |
025 |
MISRA.STDLIB.TIME Use of the time handling functions of library time.h |
026 |
MISRA.DEFINE.NOPARS Macro parameter with no parentheses MISRA.ELIF.UNDEF Undefined macros in #elif directive MISRA.EXPANSION.DIRECTIVE Directive-like tokens within a macro argument MISRA.UNDEF Undef usage MISRA.USE.DEFINE Non-guarding macro definition MISRA.USE.EXPANSION Macro expansion MISRA.USE.UNKNOWNDIR Unknown preprocessor directive is used MISRA.USE.WRONGDIR Improper preprocessor directive |
027 |
MISRA.USE.DEFINE Non-guarding macro definition MISRA.USE.EXPANSION Macro expansion MISRA.USE.WRONGDIR Improper preprocessor directive |
029 |
MISRA.DEFINE.BADEXP.CPP Inappropriate macro expansion in a C++ source MISRA.DEFINE.FUNC Function-like macro definition MISRA.EXPANSION.DIRECTIVE Directive-like tokens within a macro argument |
031 |
MISRA.DEFINE.BADEXP.CPP Inappropriate macro expansion in a C++ source |
033 |
MISRA.INCL.BAD Non-standard include directive |
035 |
MISRA.INCGUARD Include guard is not provided |
040 |
MISRA.ONEDEFRULE.FUNC Global function definition in a header file MISRA.ONEDEFRULE.VAR Global variable definition in a header file |
053.1 |
MISRA.INCL.SYMS Non-standard characters in header file names |
066 |
MISRA.MEMB.NOT_PRIVATE Member variable in non-POD class is not private |
067 |
MISRA.MEMB.NOT_PRIVATE Member variable in non-POD class is not private |
070.1 |
MISRA.CTOR.DYNAMIC Object's dynamic type is used from the body of its constructor |
088 |
MISRA.DERIVE.VIRTUAL Class is derived from virtual base MISRA.VIRTUAL.BASE.DIAMOND Base class is used as virtual not in diamond hierarchy |
089 |
MISRA.VIRTUAL.NOVIRTUAL Overriding virtual function declared with no 'virtual' keyword |
095 |
MISRA.SAME.DEFPARAMS Overriding virtual function and the function it overrides have different default arguments |
097 |
MISRA.FUNC.ARRAY.PARAMS Function argument with array type decay to a pointer |
098 |
MISRA.NS.GLOBAL Function, variable or type declaration in global namespace |
107 |
MISRA.OBJ.TYPE.COMPAT Type not compatible with type of other declaration |
108 |
MISRA.FUNC.VARARG Function with variable number of arguments |
113 |
MISRA.RETURN.NOT_LAST Return is not the last statement in a function |
115 |
MISRA.FUNC.UNUSEDRET Return value of a non-void function is not used |
117 |
MISRA.PPARAM.NEEDS.CONST Pointer parameter is not used to modify the addressed object but is not declared as a pointer to const |
119 |
MISRA.FUNC.RECUR Recursive function |
135 |
MISRA.VAR.HIDDEN Identifier declared in an inner scope hides identifier in outer scope |
136 |
MISRA.VAR.MIN.VIS Name visibility is too wide |
144 |
MISRA.INIT.BRACES Incorrect initializer braces placement. |
145 |
MISRA.ENUM.INIT Non-first enumerator is explicitly initialized, but not all elements are explicitly initialized. |
147 |
MISRA.FLOAT.BIT.REPR Use of bit manipulations of floating-point values which rely on storage layout |
149 |
MISRA.TOKEN.OCTAL.ESCAPE Usage of octal escape sequences MISRA.TOKEN.OCTAL.INT Usage of octal integer constants |
152 |
MISRA.DECL.MANY_DCLS More than one declarator in one declaration |
153 |
MISRA.UNION Union is used |
154 |
MISRA.BITFIELD.SIGNED Length of a named signed bit-field is less than 2 MISRA.BITFIELD.TYPE.CPP Type of bit-field is neither bool, nor signed/unsigned integer MISRA.FIELD.BIT.ENUM Bit-field has enum type. |
157 |
MISRA.LOGIC.SIDEEFF Right operand in a logical 'and' or 'or' expression contains side effects |
158 |
MISRA.LOGIC.POSTFIX Operand in a logical 'and' or 'or' expression is not a postfix expression |
159 |
MISRA.BIN_OP.OVERLOAD Comma, || or && operator overloaded MISRA.UN_OP.OVERLOAD Unary & operator is overloaded |
160 |
MISRA.ASSIGN.COND Assignment operator is used in a condition MISRA.ASSIGN.SUBEXPR Assignment operator is used in a sub-expression outside a condition |
164 |
MISRA.SHIFT.RANGE Right operand of shift operation is out of range - greater or equal to max bit-length of left operand, or negative |
165 |
MISRA.UMINUS.UNSIGNED Operand of unary minus is unsigned |
166 |
MISRA.SIZEOF.SIDE_EFFECT Operand of sizeof has side effects |
168 |
MISRA.COMMA Comma operator is used |
170 |
MISRA.PTR.TO_PTR_TO_PTR Pointer declaration has more than two levels of indirection |
175 |
MISRA.LITERAL.NULL.PTR Literal zero used as the null-pointer-constant. |
177 |
MISRA.CTOR.NOT_EXPLICIT Constructor with one argument of built-in type is not declared 'explicit' |
178 |
MISRA.CAST.POLY.TYPE Cast from a polymorphic base class to a derived class MISRA.CAST.PTR.VRCLASS A cast form pointer to a virtual base class to pointer to a derived class does not use 'dynamic_cast' |
179 |
MISRA.CAST.POLY.TYPE Cast from a polymorphic base class to a derived class |
180 |
MISRA.CONV.NUM.NARROWER Implicit numeric conversion to narrower type |
182 |
MISRA.CAST.INT_TO_PTR Object with integer type or pointer to void cast to pointer type MISRA.CAST.PTR.UNRELATED Object of pointer type cast to unrelated type MISRA.CAST.PTR_TO_INT Cast between a pointer and an integral type |
184 |
MISRA.CONV.FLOAT Implicit floating-point conversion |
185 |
MISRA.C_CAST C-style cast to non-void type MISRA.FUNC_CAST Functional notation cast different from explicit constructor call |
186 |
UNREACH.GEN Unreachable code UNREACH.RETURN Unreachable Void Return |
189 |
MISRA.GOTO.AFTER.LABEL Unconstrained use of goto MISRA.GOTO.NESTED Goto to a label declared in a nested compound statement |
190 |
MISRA.CONTINUE.ILL Continue statement is used in an ill-formed for loop |
192 |
MISRA.IF.NO_ELSE A chain of if/else-if statements is not terminated with else or is terminated with an empty else clause |
193 |
MISRA.SWITCH.NOT_WELL_FORMED Switch statement is not well-formed MISRA.SWITCH.NO_BREAK No break or throw statement at the end of switch-clause |
194 |
MISRA.SWITCH.NODEFAULT No default clause at the end of a switch statement MISRA.SWITCH.NOT_WELL_FORMED Switch statement is not well-formed |
195 |
MISRA.SWITCH.BOOL Condition of switch statement is boolean expression |
196 |
MISRA.SWITCH.NOT_WELL_FORMED Switch statement is not well-formed MISRA.SWITCH.NO_CASE No case-clause in a switch statement |
197 |
MISRA.FOR.COUNTER.FLT For loop counter has a floating point type MISRA.FOR.COUNTER.MANY Many counters in a for loop |
201 |
MISRA.FOR.COND.CHANGE For loop counter is modified within the loop condition section MISRA.FOR.STMT.CHANGE For loop counter is modified within the loop statement |
202 |
MISRA.FLOAT_EQUAL Floating point expression is tested for equality |
206 |
MISRA.STDLIB.MEMORY Use of dynamic heap memory allocation |
209 |
MISRA.BUILTIN_NUMERIC Builtin numeric type is used |
210 |
PORTING.BITFIELDS Usage of bitfields within a structure PORTING.BSWAP.MACRO A custom byte swap macro is used without checking endian PORTING.BYTEORDER.SIZE An incompatible type is used with a network macro such as 'ntohl' PORTING.CAST.FLTPNT Cast of a floating point expression to a non floating point type PORTING.CAST.PTR Cast between types that are not both pointers or not pointers PORTING.CAST.PTR.FLTPNT Cast of a pointer to a floating point expression to a non floating point type pointer PORTING.CAST.PTR.SIZE Attempt to cast an expression to a type of a potentially incompatible size PORTING.CAST.SIZE Expression is cast to a type of potentially different size PORTING.CMPSPEC.EFFECTS.ASSIGNMENT Assignment in a function parameter PORTING.CMPSPEC.TYPE.BOOL Assignment to a 'bool' type is larger than 1 byte PORTING.CMPSPEC.TYPE.LONGLONG Use of 'long long' PORTING.MACRO.NUMTYPE Macro describing a builtin numeric type is used PORTING.OPTS Compiler dependant option is used PORTING.PRAGMA.ALIGN #pragma align usage PORTING.PRAGMA.PACK #pragma pack usage PORTING.SIGNED.CHAR 'char' used without explicitly specifying signedness PORTING.STORAGE.STRUCT Byte position of elements in a structure could depend on alignment and packing attributes. PORTING.STRUCT.BOOL Struct/class has a bool member PORTING.UNIONS Union is used within an enclosing struct/class/other union PORTING.UNSIGNEDCHAR.OVERFLOW.FALSE Relational expression may be always false depending on 'char' type signedness PORTING.UNSIGNEDCHAR.OVERFLOW.TRUE Relational expression may be always true depending on 'char' type signedness PORTING.UNSIGNEDCHAR.RELOP Relational operations used between explicitly signed/unsigned char and char without signedness specification PORTING.VAR.EFFECTS Variable used twice in one expression where one usage is subject to side-effects PRECISION.LOSS Loss of Precision PRECISION.LOSS.CALL Loss of Precision during function call |
210.1 |
PORTING.BITFIELDS Usage of bitfields within a structure PORTING.BSWAP.MACRO A custom byte swap macro is used without checking endian PORTING.BYTEORDER.SIZE An incompatible type is used with a network macro such as 'ntohl' PORTING.CAST.FLTPNT Cast of a floating point expression to a non floating point type PORTING.CAST.PTR Cast between types that are not both pointers or not pointers PORTING.CAST.PTR.FLTPNT Cast of a pointer to a floating point expression to a non floating point type pointer PORTING.CAST.PTR.SIZE Attempt to cast an expression to a type of a potentially incompatible size PORTING.CAST.SIZE Expression is cast to a type of potentially different size PORTING.CMPSPEC.EFFECTS.ASSIGNMENT Assignment in a function parameter PORTING.CMPSPEC.TYPE.BOOL Assignment to a 'bool' type is larger than 1 byte PORTING.CMPSPEC.TYPE.LONGLONG Use of 'long long' PORTING.MACRO.NUMTYPE Macro describing a builtin numeric type is used PORTING.OPTS Compiler dependant option is used PORTING.PRAGMA.ALIGN #pragma align usage PORTING.PRAGMA.PACK #pragma pack usage PORTING.SIGNED.CHAR 'char' used without explicitly specifying signedness PORTING.STORAGE.STRUCT Byte position of elements in a structure could depend on alignment and packing attributes. PORTING.STRUCT.BOOL Struct/class has a bool member PORTING.UNIONS Union is used within an enclosing struct/class/other union PORTING.UNSIGNEDCHAR.OVERFLOW.FALSE Relational expression may be always false depending on 'char' type signedness PORTING.UNSIGNEDCHAR.OVERFLOW.TRUE Relational expression may be always true depending on 'char' type signedness PORTING.UNSIGNEDCHAR.RELOP Relational operations used between explicitly signed/unsigned char and char without signedness specification PORTING.VAR.EFFECTS Variable used twice in one expression where one usage is subject to side-effects PRECISION.LOSS Loss of Precision PRECISION.LOSS.CALL Loss of Precision during function call |
211 |
PORTING.BITFIELDS Usage of bitfields within a structure PORTING.BSWAP.MACRO A custom byte swap macro is used without checking endian PORTING.BYTEORDER.SIZE An incompatible type is used with a network macro such as 'ntohl' PORTING.CAST.FLTPNT Cast of a floating point expression to a non floating point type PORTING.CAST.PTR Cast between types that are not both pointers or not pointers PORTING.CAST.PTR.FLTPNT Cast of a pointer to a floating point expression to a non floating point type pointer PORTING.CAST.PTR.SIZE Attempt to cast an expression to a type of a potentially incompatible size PORTING.CAST.SIZE Expression is cast to a type of potentially different size PORTING.CMPSPEC.EFFECTS.ASSIGNMENT Assignment in a function parameter PORTING.CMPSPEC.TYPE.BOOL Assignment to a 'bool' type is larger than 1 byte PORTING.CMPSPEC.TYPE.LONGLONG Use of 'long long' PORTING.MACRO.NUMTYPE Macro describing a builtin numeric type is used PORTING.OPTS Compiler dependant option is used PORTING.PRAGMA.ALIGN #pragma align usage PORTING.PRAGMA.PACK #pragma pack usage PORTING.SIGNED.CHAR 'char' used without explicitly specifying signedness PORTING.STORAGE.STRUCT Byte position of elements in a structure could depend on alignment and packing attributes. PORTING.STRUCT.BOOL Struct/class has a bool member PORTING.UNIONS Union is used within an enclosing struct/class/other union PORTING.UNSIGNEDCHAR.OVERFLOW.FALSE Relational expression may be always false depending on 'char' type signedness PORTING.UNSIGNEDCHAR.OVERFLOW.TRUE Relational expression may be always true depending on 'char' type signedness PORTING.UNSIGNEDCHAR.RELOP Relational operations used between explicitly signed/unsigned char and char without signedness specification PORTING.VAR.EFFECTS Variable used twice in one expression where one usage is subject to side-effects PRECISION.LOSS Loss of Precision PRECISION.LOSS.CALL Loss of Precision during function call |
212 |
PORTING.BITFIELDS Usage of bitfields within a structure PORTING.BSWAP.MACRO A custom byte swap macro is used without checking endian PORTING.BYTEORDER.SIZE An incompatible type is used with a network macro such as 'ntohl' PORTING.CAST.FLTPNT Cast of a floating point expression to a non floating point type PORTING.CAST.PTR Cast between types that are not both pointers or not pointers PORTING.CAST.PTR.FLTPNT Cast of a pointer to a floating point expression to a non floating point type pointer PORTING.CAST.PTR.SIZE Attempt to cast an expression to a type of a potentially incompatible size PORTING.CAST.SIZE Expression is cast to a type of potentially different size PORTING.CMPSPEC.EFFECTS.ASSIGNMENT Assignment in a function parameter PORTING.CMPSPEC.TYPE.BOOL Assignment to a 'bool' type is larger than 1 byte PORTING.CMPSPEC.TYPE.LONGLONG Use of 'long long' PORTING.MACRO.NUMTYPE Macro describing a builtin numeric type is used PORTING.OPTS Compiler dependant option is used PORTING.PRAGMA.ALIGN #pragma align usage PORTING.PRAGMA.PACK #pragma pack usage PORTING.SIGNED.CHAR 'char' used without explicitly specifying signedness PORTING.STORAGE.STRUCT Byte position of elements in a structure could depend on alignment and packing attributes. PORTING.STRUCT.BOOL Struct/class has a bool member PORTING.UNIONS Union is used within an enclosing struct/class/other union PORTING.UNSIGNEDCHAR.OVERFLOW.FALSE Relational expression may be always false depending on 'char' type signedness PORTING.UNSIGNEDCHAR.OVERFLOW.TRUE Relational expression may be always true depending on 'char' type signedness PORTING.UNSIGNEDCHAR.RELOP Relational operations used between explicitly signed/unsigned char and char without signedness specification PORTING.VAR.EFFECTS Variable used twice in one expression where one usage is subject to side-effects PRECISION.LOSS Loss of Precision PRECISION.LOSS.CALL Loss of Precision during function call |
213 |
MISRA.EXPR.PARENS.INSUFFICIENT Limited dependence required for operator precedence rules in expressions MISRA.EXPR.PARENS.REDUNDANT Limited dependence required for operator precedence rules in expressions |
215 |
MISRA.PTR.ARITH Pointer is used in arithmetic or array index expression |