﻿# V6005\. The 'x' variable is assigned to itself\.

The analyzer has detected a potential error: a variable is assigned to itself\.

The example:

```cpp
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:

```cpp
void change(int width, int height, int length)
{
  this.mWidth = width;
  this.mHeight = height;
  this.mLength = length;
}
```