Classification of PVS-Studio warnings according to the standards: MISRA C, MISRA C++

MISRA C and MISRA C++ are standards of software development, created by the MISRA (Motor Industry Software Reliability Association) organization. The purpose of these standards is to improve security, portability and reliability of programs for embedded systems.

The analyzer is oriented to the latest versions of the standards: MISRA C:2012 and MISRA C++:2008.

Error CodeError DescriptionMISRA Rule
V2501MISRA. Octal constants should not be used.MISRA-C-7.1, MISRA-CPP-2.13.2
V2502MISRA. The 'goto' statement should not be used.MISRA-C-15.1
V2503MISRA. Implicitly specified enumeration constants should be unique – consider specifying non-unique constants explicitly.MISRA-C-8.12
V2504MISRA. Size of an array is not specified.MISRA-C-8.11, MISRA-CPP-3.1.3
V2505MISRA. The 'goto' statement shouldn't jump to a label declared earlier.MISRA-C-15.2, MISRA-CPP-6.6.2
V2506MISRA. A function should have a single point of exit at the end.MISRA-C-15.5, MISRA-CPP-6.6.5
V2507MISRA. The body of a loop\conditional statement should be enclosed in braces.MISRA-C-15.6, MISRA-CPP-6.3.1, MISRA-CPP-6.4.1
V2508MISRA. The function with the 'atof/atoi/atoll/atoll' name should not be used.MISRA-C-21.7, MISRA-CPP-18.0.2
V2509MISRA. The function with the 'abort/exit/getenv/system' name should not be used.MISRA-C-21.8, MISRA-CPP-18.0.3
V2510MISRA. The function with the 'qsort/bsearch' name should not be used.MISRA-C-21.9
V2511MISRA. Memory allocation and deallocation functions should not be used.MISRA-C-21.3, MISRA-CPP-18.4.1
V2512MISRA. The macro with the 'setjmp' name and the function with the 'longjmp' name should not be used.MISRA-C-21.4, MISRA-CPP-17.0.5
V2513MISRA. Unbounded functions performing string operations should not be used.MISRA-CPP-18.0.5
V2514MISRA. Unions should not be used.MISRA-C-19.2, MISRA-CPP-9.5.1
V2515MISRA. Declaration should contain no more than two levels of pointer nesting.MISRA-C-18.5, MISRA-CPP-5.0.19
V2516MISRA. The 'if' ... 'else if' construct should be terminated with an 'else' statement.MISRA-C-15.7, MISRA-CPP-6.4.2
V2517MISRA. Literal suffixes should not contain lowercase characters.MISRA-C-7.3, MISRA-CPP-2.13.4
V2518MISRA. The 'default' label should be either the first or the last label of a 'switch' statement.MISRA-C-16.5
V2519MISRA. Every 'switch' statement should have a 'default' label, which, in addition to the terminating 'break' statement, should contain either a statement or a comment.MISRA-C-16.4
V2520MISRA. Every switch-clause should be terminated by an unconditional 'break' or 'throw' statement.MISRA-C-16.3, MISRA-CPP-6.4.5
V2521MISRA. Only the first member of enumerator list should be explicitly initialized, unless all members are explicitly initialized.MISRA-CPP-8.5.3
V2522MISRA. The 'switch' statement should have 'default' as the last label.MISRA-CPP-6.4.6
V2523MISRA. All integer constants of unsigned type should have 'u' or 'U' suffix.MISRA-C-7.2, MISRA-CPP-2.13.3
V2524MISRA. A switch-label should only appear at the top level of the compound statement forming the body of a 'switch' statement.MISRA-C-16.2, MISRA-CPP-6.4.4
V2525MISRA. Every 'switch' statement should contain non-empty switch-clauses.MISRA-C-16.6, MISRA-CPP-6.4.8
V2526MISRA. The functions from time.h/ctime should not be used.MISRA-C-21.10, MISRA-CPP-18.0.4
V2527MISRA. A switch-expression should not have Boolean type. Consider using of 'if-else' construct.MISRA-C-16.7, MISRA-CPP-6.4.7
V2528MISRA. The comma operator should not be used.MISRA-C-12.3, MISRA-CPP-5.18.1
V2529MISRA. Any label should be declared in the same block as 'goto' statement or in any block enclosing it.MISRA-C-15.3, MISRA-CPP-6.6.1
V2530MISRA. Any loop should be terminated with no more than one 'break' or 'goto' statement.MISRA-C-15.4, MISRA-CPP-6.6.4
V2531MISRA. Expression of essential type 'foo' should not be explicitly cast to essential type 'bar'.MISRA-C-10.5
V2532MISRA. String literal should not be assigned to object unless it has type of pointer to const-qualified char.MISRA-C-7.4
V2533MISRA. C-style and functional notation casts should not be performed.MISRA-CPP-5.2.4
V2534MISRA. The loop counter should not have floating-point type.MISRA-C-14.1, MISRA-CPP-6.5.1
V2535MISRA. Unreachable code should not be present in the project.MISRA-C-2.1, MISRA-CPP-0.1.1
V2536MISRA. Function should not contain labels not used by any 'goto' statements.MISRA-C-2.6
V2537MISRA. Functions should not have unused parameters.MISRA-C-2.7, MISRA-CPP-0.1.11
V2538MISRA. The value of uninitialized variable should not be used.MISRA-C-9.1, MISRA-CPP-8.5.1
V2539MISRA. Class destructor should not exit with an exception.MISRA-CPP-15.5.1
V2540MISRA. Arrays should not be partially initialized.MISRA-C-9.3
V2541MISRA. Function should not be declared implicitly.MISRA-C-17.3
V2542MISRA. Function with a non-void return type should return a value from all exit paths.MISRA-C-17.4, MISRA-CPP-8.4.3
V2543MISRA. Value of the essential character type should be used appropriately in the addition/subtraction operations.MISRA-C-10.2
V2544MISRA. The values used in expressions should have appropriate essential types.MISRA-C-10.1
V2545MISRA. Conversion between pointers of different object types should not be performed.MISRA-C-11.3
V2546MISRA. Expression resulting from the macro expansion should be surrounded by parentheses.MISRA-CPP-16.0.6, MISRA-C-20.7
V2547MISRA. The return value of non-void function should be used.MISRA-C-17.7, MISRA-CPP-0.1.7
V2548MISRA. The address of an object with local scope should not be passed out of its scope.MISRA-C-18.6, MISRA-CPP-7.5.2
V2549MISRA. Pointer to FILE should not be dereferenced.MISRA-C-22.5
V2550MISRA. Floating-point values should not be tested for equality or inequality.MISRA-CPP-6.2.2
V2551MISRA. Variable should be declared in a scope that minimizes its visibility.MISRA-CPP-3.4.1
V2552MISRA. Expressions with enum underlying type should have values corresponding to the enumerators of the enumeration.MISRA-CPP-7.2.1
V2553MISRA. Unary minus operator should not be applied to an expression of the unsigned type.MISRA-CPP-5.3.2
V2554MISRA. Expression containing increment (++) or decrement (--) should not have other side effects.MISRA-C-13.3, MISRA-CPP-5.2.10
V2555MISRA. Incorrect shifting expression.MISRA-C-12.2, MISRA-CPP-5.8.1
V2556MISRA. Use of a pointer to FILE when the associated stream has already been closed.MISRA-C-22.6
V2557MISRA. Operand of sizeof() operator should not have other side effects.MISRA-C-13.6, MISRA-CPP-5.3.4
V2558MISRA. A pointer/reference parameter in a function should be declared as pointer/reference to const if the corresponding object was not modified.MISRA-CPP-7.1.2
V2559MISRA. Subtraction, >, >=, <, <= should be applied only to pointers that address elements of the same array.MISRA-CPP-5.0.18, MISRA-CPP-5.0.17
V2560MISRA. There should be no user-defined variadic functions.MISRA-CPP-8.4.1
V2561MISRA. The result of an assignment expression should not be used.MISRA-C-13.4, MISRA-CPP-6.2.1
V2562MISRA. Expressions with pointer type should not be used in the '+', '-', '+=' and '-=' operations.MISRA-C-18.4
V2563MISRA. Array indexing should be the only form of pointer arithmetic and it should be applied only to objects defined as an array type.MISRA-CPP-5.0.15
V2564MISRA. There should be no implicit integral-floating conversion.MISRA-CPP-5.0.5
V2565MISRA. A function should not call itself either directly or indirectly.MISRA-C-17.2, MISRA-CPP-7.5.4
V2566MISRA. Constant expression evaluation should not result in an unsigned integer wrap-around.MISRA-C-12.4, MISRA-CPP-5.19.1
V2567MISRA. Cast should not remove 'const' / 'volatile' qualification from the type that is pointed to by a pointer or a reference.MISRA-C-11.8, MISRA-CPP-5.2.5
V2568MISRA. Both operands of an operator should be of the same type category.MISRA-C-10.4
V2569MISRA. The 'operator &&', 'operator ||', 'operator ,' and the unary 'operator &' should not be overloaded.MISRA-CPP-5.2.11, MISRA-CPP-5.3.3
V2570MISRA. Operands of the logical '&&' or the '||' operators, the '!' operator should have 'bool' type.MISRA-CPP-5.3.1
V2571MISRA. Conversions between pointers to objects and integer types should not be performed.MISRA-C-11.4, MISRA-C-11.5, MISRA-CPP-5.2.8, MISRA-CPP-5.2.9
V2572MISRA. Value of the expression should not be converted to the different essential type or the narrower essential type.MISRA-C-10.3
V2573MISRA. Identifiers that start with '__' or '_[A-Z]' are reserved.MISRA-C-21.2, MISRA-C-21.1, MISRA-CPP-17.0.1

Bugs Found

Checked Projects
Collected Errors
14 111
This website uses cookies and other technology to provide you a more personalized experience. By continuing the view of our web-pages you accept the terms of using these files. If you don't want your personal data to be processed, please, leave this site. Learn More →