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. |