V764. Possible incorrect order of arguments passed to function.

The analyzer detected a suspicious sequence of arguments being passed to a function: some of the arguments' names do not correspond with the names of the parameters they are meant to represent. It may indicate an error when passing values to a function.

Let we have the following declaration of the function:

void SetRGB(unsigned r, unsigned g, unsigned b);

Here's an example of incorrect code:

void Foo(){
  unsigned R = 0, G = 0, B = 0; 
  SetRGB(R, B, G);

When defining the object color, the programmer accidentally swapped the blue and green color parameters.

The fixed version of the code should look like this:

SetRGB(R, G, B);

This diagnostic is classified as:

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

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 →