Our website uses cookies to enhance your browsing experience.
Accept
to the top
>
>
>
Classification of PVS-Studio warnings a…

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 Code

Error Description

Mapping

V3501

Octal constants should not be used.

AUTOSAR-M2.13.2

V3502

Size of an array is not specified.

AUTOSAR-A3.1.4

V3503

The 'goto' statement shouldn't jump to a label declared earlier.

AUTOSAR-M6.6.2

V3504

The body of a loop\conditional statement should be enclosed in braces.

AUTOSAR-M6.3.1, AUTOSAR-M6.4.1

V3505

The function with the 'atof/atoi/atol/atoll' name should not be used.

AUTOSAR-A18.0.2

V3506

The function with the 'abort/exit/getenv/system' name should not be used.

AUTOSAR-M18.0.3

V3507

The macro with the 'setjmp' name and the function with the 'longjmp' name should not be used.

AUTOSAR-M17.0.5

V3508

Unbounded functions performing string operations should not be used.

AUTOSAR-M18.0.5

V3509

Unions should not be used.

AUTOSAR-M9.5.1

V3510

Declaration should contain no more than two levels of pointer nesting.

AUTOSAR-A5.0.3

V3511

The 'if' ... 'else if' construct should be terminated with an 'else' statement.

AUTOSAR-M6.4.2

V3512

Literal suffixes should not contain lowercase characters.

AUTOSAR-M2.13.4

V3513

Every switch-clause should be terminated by an unconditional 'break' or 'throw' statement.

AUTOSAR-M6.4.5

V3514

The 'switch' statement should have 'default' as the last label.

AUTOSAR-M6.4.6

V3515

All integer constants of unsigned type should have 'U' suffix.

AUTOSAR-M2.13.3

V3516

A switch-label should only appear at the top level of the compound statement forming the body of a 'switch' statement.

AUTOSAR-M6.4.4

V3517

The functions from time.h/ctime should not be used.

AUTOSAR-M18.0.4

V3518

A switch-expression should not have Boolean type. Consider using of 'if-else' construct.

AUTOSAR-M6.4.7

V3519

The comma operator should not be used.

AUTOSAR-M5.18.1

V3520

Any label should be declared in the same block as 'goto' statement or in any block enclosing it.

AUTOSAR-M6.6.1

V3521

The loop counter should not have floating-point type.

AUTOSAR-A6.5.2

V3522

Unreachable code should not be present in the project.

AUTOSAR-M0.1.1

V3523

Functions should not have unused parameters.

AUTOSAR-M0.1.11

V3524

The value of uninitialized variable should not be used.

AUTOSAR-M8.5.1

V3525

Function with a non-void return type should return a value from all exit paths.

AUTOSAR-A8.4.2

V3526

Expression resulting from the macro expansion should be surrounded by parentheses.

AUTOSAR-M16.0.6

V3527

The return value of non-void function should be used.

AUTOSAR-A0.1.2

V3528

The address of an object with local scope should not be passed out of its scope.

AUTOSAR-M7.5.2

V3529

Floating-point values should not be tested for equality or inequality.

AUTOSAR-M6.2.2

V3530

Variable should be declared in a scope that minimizes its visibility.

AUTOSAR-M3.4.1

V3531

Expressions with enum underlying type should have values corresponding to the enumerators of the enumeration.

AUTOSAR-A7.1.2

V3532

Unary minus operator should not be applied to an expression of the unsigned type.

AUTOSAR-M5.3.2

V3533

Expression containing increment (++) or decrement (--) should not have other side effects.

AUTOSAR-M5.2.10

V3534

Incorrect shifting expression.

AUTOSAR-M5.8.1

V3535

Operand of sizeof() operator should not have other side effects.

AUTOSAR-M5.3.4

V3536

A 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

V3537

Subtraction, >, >=, <, <= should be applied only to pointers that address elements of the same array.

AUTOSAR-M5.0.17, AUTOSAR-M5.0.18

V3538

The result of an assignment expression should not be used.

AUTOSAR-M6.2.1

V3539

Array 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

V3540

There should be no implicit integral-floating conversion.

AUTOSAR-M5.0.5

V3541

A function should not call itself either directly or indirectly.

AUTOSAR-A7.5.1

V3542

Constant expression evaluation should not result in an unsigned integer wrap-around.

AUTOSAR-M5.19.1

V3543

Cast should not remove 'const' / 'volatile' qualification from the type that is pointed to by a pointer or a reference.

AUTOSAR-A5.2.3

V3544

The 'operator &&', 'operator ||', 'operator ,' and the unary 'operator &' should not be overloaded.

AUTOSAR-M5.2.11, AUTOSAR-M5.3.3

V3545

Operands of the logical '&&' or the '||' operators, the '!' operator should have 'bool' type.

AUTOSAR-M5.3.1

V3546

Conversions between pointers to objects and integer types should not be performed.

AUTOSAR-M5.2.8, AUTOSAR-M5.2.9

V3547

Identifiers that start with '__' or '_[A-Z]' are reserved.

AUTOSAR-A17.0.1

V3548

Functions should not be declared at block scope.

AUTOSAR-M3.1.2

V3549

The global namespace should only contain 'main', namespace declarations and 'extern "C"' declarations.

AUTOSAR-M7.3.1

V3550

The identifier 'main' should not be used for a function other than the global function 'main'.

AUTOSAR-M7.3.2

V3551

An identifier with array type passed as a function argument should not decay to a pointer.

AUTOSAR-M5.2.12

V3552

Cast should not convert a pointer to a function to any other pointer type, including a pointer to function type.

AUTOSAR-M5.2.6

V3553

The standard signal handling functions should not be used.

AUTOSAR-M18.7.1

V3554

The standard input/output functions should not be used.

AUTOSAR-M27.0.1

V3555

The 'static' storage class specifier should be used in all declarations of functions that have internal linkage.

AUTOSAR-M3.3.2

close form

Fill out the form in 2 simple steps below:

Your contact information:

Step 1
Congratulations! This is your promo code!

Desired license type:

Step 2
Team license
Enterprise license
** By clicking this button you agree to our Privacy Policy statement
close form
Request our prices
New License
License Renewal
--Select currency--
USD
EUR
* By clicking this button you agree to our Privacy Policy statement

close form
Free PVS‑Studio license for Microsoft MVP specialists
* By clicking this button you agree to our Privacy Policy statement

close form
To get the licence for your open-source project, please fill out this form
* By clicking this button you agree to our Privacy Policy statement

close form
I am interested to try it on the platforms:
* By clicking this button you agree to our Privacy Policy statement

close form
check circle
Message submitted.

Your message has been sent. We will email you at


If you do not see the email in your inbox, please check if it is filtered to one of the following folders:

  • Promotion
  • Updates
  • Spam