V6005. The 'x' variable is assigned to itself.
The analyzer has detected a potential error: a variable is assigned to itself.
The example:
void change(int width, int height, int length)
{
this.mWidth = width;
this.mHeight = height;
this.mLength = this.mLength;
}
The values of an object's properties are intended to be changed according to the method parameters, but mistakenly assigned its own value to the mLength instead of the length argument's value.
The fixed code:
void change(int width, int height, int length)
{
this.mWidth = width;
this.mHeight = height;
this.mLength = length;
}
This diagnostic is classified as:
|
You can look at examples of errors detected by the V6005 diagnostic. |