To get a trial key
fill out the form below
Team License (a basic version)
Enterprise License (an extended version)
* By clicking this button you agree to our Privacy Policy statement

Request our prices
New License
License Renewal
--Select currency--
USD
EUR
GBP
RUB
* By clicking this button you agree to our Privacy Policy statement

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

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

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

Message submitted.

Your message has been sent. We will email you at


If you haven't received our response, please do the following:
check your Spam/Junk folder and click the "Not Spam" button for our message.
This way, you won't miss messages from our team in the future.

>
>
>
Classification of PVS-Studio warnings a…

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.

C/C++ warnings

Error Code

Error Description

Mapping

V2501

Octal constants should not be used.

MISRA-C-7.1, MISRA-CPP-2.13.2

V2502

The 'goto' statement should not be used.

MISRA-C-15.1

V2503

Implicitly specified enumeration constants should be unique – consider specifying non-unique constants explicitly.

MISRA-C-8.12

V2504

Size of an array is not specified.

MISRA-C-8.11, MISRA-CPP-3.1.3

V2505

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

MISRA-C-15.2, MISRA-CPP-6.6.2

V2506

A function should have a single point of exit at the end.

MISRA-C-15.5, MISRA-CPP-6.6.5

V2507

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

V2508

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

MISRA-C-21.7, MISRA-CPP-18.0.2

V2509

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

MISRA-C-21.8, MISRA-CPP-18.0.3

V2510

The function with the 'qsort/bsearch' name should not be used.

MISRA-C-21.9

V2511

Memory allocation and deallocation functions should not be used.

MISRA-C-21.3, MISRA-CPP-18.4.1

V2512

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

V2513

Unbounded functions performing string operations should not be used.

MISRA-CPP-18.0.5

V2514

Unions should not be used.

MISRA-C-19.2, MISRA-CPP-9.5.1

V2515

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

MISRA-C-18.5, MISRA-CPP-5.0.19

V2516

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

MISRA-C-15.7, MISRA-CPP-6.4.2

V2517

Literal suffixes should not contain lowercase characters.

MISRA-C-7.3, MISRA-CPP-2.13.4

V2518

The 'default' label should be either the first or the last label of a 'switch' statement.

MISRA-C-16.5

V2519

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

V2520

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

MISRA-C-16.3, MISRA-CPP-6.4.5

V2521

Only the first member of enumerator list should be explicitly initialized, unless all members are explicitly initialized.

MISRA-CPP-8.5.3

V2522

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

MISRA-CPP-6.4.6

V2523

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

MISRA-C-7.2, MISRA-CPP-2.13.3

V2524

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

V2525

Every 'switch' statement should contain non-empty switch-clauses.

MISRA-C-16.6, MISRA-CPP-6.4.8

V2526

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

MISRA-C-21.10, MISRA-CPP-18.0.4

V2527

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

MISRA-C-16.7, MISRA-CPP-6.4.7

V2528

The comma operator should not be used.

MISRA-C-12.3, MISRA-CPP-5.18.1

V2529

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

V2530

Any loop should be terminated with no more than one 'break' or 'goto' statement.

MISRA-C-15.4, MISRA-CPP-6.6.4

V2531

Expression of essential type 'foo' should not be explicitly cast to essential type 'bar'.

MISRA-C-10.5

V2532

String literal should not be assigned to object unless it has type of pointer to const-qualified char.

MISRA-C-7.4

V2533

C-style and functional notation casts should not be performed.

MISRA-CPP-5.2.4

V2534

The loop counter should not have floating-point type.

MISRA-C-14.1, MISRA-CPP-6.5.1

V2535

Unreachable code should not be present in the project.

MISRA-C-2.1, MISRA-CPP-0.1.1

V2536

Function should not contain labels not used by any 'goto' statements.

MISRA-C-2.6

V2537

Functions should not have unused parameters.

MISRA-C-2.7, MISRA-CPP-0.1.11

V2538

The value of uninitialized variable should not be used.

MISRA-C-9.1, MISRA-CPP-8.5.1

V2539

Class destructor should not exit with an exception.

MISRA-CPP-15.5.1

V2540

Arrays should not be partially initialized.

MISRA-C-9.3

V2541

Function should not be declared implicitly.

MISRA-C-17.3

V2542

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

MISRA-C-17.4, MISRA-CPP-8.4.3

V2543

Value of the essential character type should be used appropriately in the addition/subtraction operations.

MISRA-C-10.2

V2544

The values used in expressions should have appropriate essential types.

MISRA-C-10.1

V2545

Conversion between pointers of different object types should not be performed.

MISRA-C-11.3

V2546

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

MISRA-C-20.7, MISRA-CPP-16.0.6

V2547

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

MISRA-C-17.7, MISRA-CPP-0.1.7

V2548

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

V2549

Pointer to FILE should not be dereferenced.

MISRA-C-22.5

V2550

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

MISRA-CPP-6.2.2

V2551

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

MISRA-CPP-3.4.1

V2552

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

MISRA-CPP-7.2.1

V2553

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

MISRA-CPP-5.3.2

V2554

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

MISRA-C-13.3, MISRA-CPP-5.2.10

V2555

Incorrect shifting expression.

MISRA-C-12.2, MISRA-CPP-5.8.1

V2556

Use of a pointer to FILE when the associated stream has already been closed.

MISRA-C-22.6

V2557

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

MISRA-C-13.6, MISRA-CPP-5.3.4

V2558

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

V2559

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

MISRA-CPP-5.0.17, MISRA-CPP-5.0.18

V2560

There should be no user-defined variadic functions.

MISRA-CPP-8.4.1

V2561

The result of an assignment expression should not be used.

MISRA-C-13.4, MISRA-CPP-6.2.1

V2562

Expressions with pointer type should not be used in the '+', '-', '+=' and '-=' operations.

MISRA-C-18.4, MISRA-CPP-5.0.15

V2563

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

V2564

There should be no implicit integral-floating conversion.

MISRA-CPP-5.0.5

V2565

A function should not call itself either directly or indirectly.

MISRA-C-17.2, MISRA-CPP-7.5.4

V2566

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

MISRA-C-12.4, MISRA-CPP-5.19.1

V2567

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

V2568

Both operands of an operator should be of the same type category.

MISRA-C-10.4

V2569

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

MISRA-CPP-5.2.11, MISRA-CPP-5.3.3

V2570

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

MISRA-CPP-5.3.1

V2571

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

V2572

Value of the expression should not be converted to the different essential type or the narrower essential type.

MISRA-C-10.3

V2573

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

MISRA-C-21.1, MISRA-C-21.2, MISRA-CPP-17.0.1

V2574

Functions should not be declared at block scope.

MISRA-CPP-3.1.2

V2575

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

MISRA-CPP-7.3.1

V2576

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

MISRA-CPP-7.3.2

V2577

The function argument corresponding to a parameter declared to have an array type should have an appropriate number of elements.

MISRA-C-17.5

V2578

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

MISRA-CPP-5.2.12

V2579

Macro should not be defined with the same name as a keyword.

MISRA-C-20.4

V2580

The 'restrict' specifier should not be used.

MISRA-C-14.3, MISRA-C-8.14

V2581

Single-line comments should not end with a continuation token.

MISRA-C-3.2

V2582

Block of memory should only be freed if it was allocated by a Standard Library function.

MISRA-C-22.2

V2583

Line whose first token is '#' should be a valid preprocessing directive.

MISRA-C-20.13

V2584

Expression used in condition should have essential Boolean type.

MISRA-C-14.4

V2585

Casts between a void pointer and an arithmetic type should not be performed.

MISRA-C-11.7, MISRA-C-11.6

V2586

Flexible array members should not be declared.

MISRA-C-18.7

V2587

The '//' and '/*' character sequences should not appear within comments.

MISRA-C-3.1

V2588

All memory or resources allocated dynamically should be explicitly released.

MISRA-C-22.1

V2590

Conversions should not be performed between pointer to function and any other type.

MISRA-C-11.1

V2591

Bit fields should only be declared with explicitly signed or unsigned integer type

MISRA-C-6.1

V2592

An identifier declared in an inner scope should not hide an identifier in an outer scope.

MISRA-C-5.3

V2593

Single-bit bit fields should not be declared as signed type.

MISRA-C-6.2

V2595

Array size should be specified explicitly when array declaration uses designated initialization.

MISRA-C-9.5

V2596

The value of a composite expression should not be assigned to an object with wider essential type.

MISRA-C-10.6

V2597

Cast should not convert pointer to function to any other pointer type.

MISRA-CPP-5.2.6

V2598

Variable length array types are not allowed.

MISRA-C-18.8

V2599

The standard signal handling functions should not be used.

MISRA-C-21.5, MISRA-CPP-18.7.1

V2600

The standard input/output functions should not be used.

MISRA-C-21.6, MISRA-CPP-27.0.1

V2601

Functions should be declared in prototype form with named parameters.

MISRA-C-8.2

V2602

Octal and hexadecimal escape sequences should be terminated.

MISRA-C-4.1

V2603

The 'static' keyword shall not be used between [] in the declaration of an array parameter.

MISRA-C-17.6

V2604

Features from <stdarg.h> should not be used.

MISRA-C-17.1

V2605

Features from <tgmath.h> should not be used.

MISRA-C-21.11

V2606

There should be no attempt to write to a stream that has been opened for reading.

MISRA-C-22.4

V2607

Inline functions should be declared with the static storage class.

MISRA-C-8.10

V2608

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

MISRA-C-8.8, MISRA-CPP-3.3.2

V2609

There should be no occurrence of undefined or critical unspecified behaviour.

MISRA-C-1.3

V2610

The ', " or \ characters and the /* or // character sequences should not occur in a header file name.

MISRA-C-20.2

V2611

Casts between a pointer to an incomplete type and any other type shouldn't be performed.

MISRA-C-11.2

V2612

Array element should not be initialized more than once.

MISRA-C-9.4

V2613

Operand that is a composite expression has more narrow essential type than the other operand.

MISRA-C-10.7

V2614

External identifiers should be distinct.

MISRA-C-5.1

V2615

A compatible declaration should be visible when an object or function with external linkage is defined.

MISRA-C-8.4

V2616

All conditional inclusion preprocessor directives should reside in the same file as the conditional inclusion directive to which they are related.

MISRA-C-20.4, MISRA-CPP-16.1.2

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 →
Accept