Classification of PVS-Studio warnings according to the AUTOSAR C++14 Coding Guidelines

The AUTOSAR C++14 Coding Guidelines for the usage of the C++14 language in the safety-related and critical environments is an update of MISRA C++:2008, based on other leading coding standards and the research/analysis done by AUTOSAR. The main application sector is automotive, but it can be used in other embedded application sectors.

C/C++ warnings

Error CodeError DescriptionASVS Requirement
V3501Octal constants should not be used.AUTOSAR-M2.13.2
V3502Size of an array is not specified.AUTOSAR-A3.1.4
V3503The 'goto' statement shouldn't jump to a label declared earlier.AUTOSAR-M6.6.2
V3504The body of a loop\conditional statement should be enclosed in braces.AUTOSAR-M6.3.1, AUTOSAR-M6.4.1
V3505The function with the 'atof/atoi/atoll/atoll' name should not be used.AUTOSAR-A18.0.2
V3506The function with the 'abort/exit/getenv/system' name should not be used.AUTOSAR-M18.0.3
V3507The macro with the 'setjmp' name and the function with the 'longjmp' name should not be used.AUTOSAR-M17.0.5
V3508Unbounded functions performing string operations should not be used.AUTOSAR-M18.0.5
V3509Unions should not be used.AUTOSAR-M9.5.1
V3510Declaration should contain no more than two levels of pointer nesting.AUTOSAR-A5.0.3
V3511The 'if' ... 'else if' construct should be terminated with an 'else' statement.AUTOSAR-M6.4.2
V3512Literal suffixes should not contain lowercase characters.AUTOSAR-M2.13.4
V3513Every switch-clause should be terminated by an unconditional 'break' or 'throw' statement.AUTOSAR-M6.4.5
V3514The 'switch' statement should have 'default' as the last label.AUTOSAR-M6.4.6
V3515All integer constants of unsigned type should have 'U' suffix.AUTOSAR-M2.13.3
V3516A switch-label should only appear at the top level of the compound statement forming the body of a 'switch' statement.AUTOSAR-M6.4.4
V3517The functions from time.h/ctime should not be used.AUTOSAR-M18.0.4
V3518A switch-expression should not have Boolean type. Consider using of 'if-else' construct.AUTOSAR-M6.4.7
V3519The comma operator should not be used.AUTOSAR-M5.18.1
V3520Any label should be declared in the same block as 'goto' statement or in any block enclosing it.AUTOSAR-M6.6.1
V3521The loop counter should not have floating-point type.AUTOSAR-A6.5.2
V3522Unreachable code should not be present in the project.AUTOSAR-M0.1.1
V3523Functions should not have unused parameters.AUTOSAR-M0.1.11
V3524The value of uninitialized variable should not be used.AUTOSAR-M8.5.1
V3525Function with a non-void return type should return a value from all exit paths.AUTOSAR-A8.4.2
V3526Expression resulting from the macro expansion should be surrounded by parentheses.AUTOSAR-M16.0.6
V3527The return value of non-void function should be used.AUTOSAR-A0.1.2
V3528The address of an object with local scope should not be passed out of its scope.AUTOSAR-M7.5.2
V3529Floating-point values should not be tested for equality or inequality.AUTOSAR-M6.2.2
V3530Variable should be declared in a scope that minimizes its visibility.AUTOSAR-M3.4.1
V3531Expressions with enum underlying type should have values corresponding to the enumerators of the enumeration.AUTOSAR-A7.1.2
V3532Unary minus operator should not be applied to an expression of the unsigned type.AUTOSAR-M5.3.2
V3533Expression containing increment (++) or decrement (--) should not have other side effects.AUTOSAR-M5.2.10
V3534Incorrect shifting expression.AUTOSAR-M5.8.1
V3535Operand of sizeof() operator should not have other side effects.AUTOSAR-M5.3.4
V3536A pointer/reference parameter in a function should be declared as pointer/reference to const if the corresponding object was not modified.AUTOSAR-M7.1.2
V3537Subtraction, >, >=, <, <= should be applied only to pointers that address elements of the same array.AUTOSAR-M5.0.17, AUTOSAR-M5.0.18
V3538The result of an assignment expression should not be used.AUTOSAR-M6.2.1
V3539Array indexing should be the only form of pointer arithmetic and it should be applied only to objects defined as an array type.AUTOSAR-M5.0.15
V3540There should be no implicit integral-floating conversion.AUTOSAR-M5.0.5
V3541A function should not call itself either directly or indirectly.AUTOSAR-A7.5.1
V3542Constant expression evaluation should not result in an unsigned integer wrap-around.AUTOSAR-M5.19.1
V3543Cast should not remove 'const' / 'volatile' qualification from the type that is pointed to by a pointer or a reference.AUTOSAR-A5.2.3
V3544The 'operator &&', 'operator ||', 'operator ,' and the unary 'operator &' should not be overloaded.AUTOSAR-M5.2.11, AUTOSAR-M5.3.3
V3545Operands of the logical '&&' or the '||' operators, the '!' operator should have 'bool' type.AUTOSAR-M5.3.1
V3546Conversions between pointers to objects and integer types should not be performed.AUTOSAR-M5.2.8, AUTOSAR-M5.2.9
V3547Identifiers that start with '__' or '_[A-Z]' are reserved.AUTOSAR-A17.0.1
V3548Functions should not be declared at block scope.AUTOSAR-M3.1.2
V3549The global namespace should only contain 'main', namespace declarations and 'extern "C"' declarations.AUTOSAR-M7.3.1
V3550The identifier 'main' should not be used for a function other than the global function 'main'.AUTOSAR-M7.3.2

Bugs Found

Checked Projects
Collected Errors
14 526
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 →