Our website uses cookies to enhance your browsing experience.
Accept
to the top
>
>
>
V6048. This expression can be...
menu mobile close menu
Additional information
toggle menu Contents

V6048. This expression can be simplified. One of the operands in the operation equals NN. Probably it is a mistake.

May 10 2018

The analyzer allows to detect suspicious operations such as '+', '-', '<<', '>>' where one of the operands is equal to 0, or the operation '*', '/', '%' with the operand, equal to 1.

The V6048 diagnostic rule helps to perform code refactoring and sometimes detect errors.

These are examples of constructs that cause this diagnostic message to appear:

int y = 1;
...
int z = x * y;

This code can be simplified. For example:

int z = x;

This diagnostic is classified as:

You can look at examples of errors detected by the V6048 diagnostic.