The analyzer detected a suspicious function where one of the parameters is never used while another parameter is used several times. It may indicate an error in the code.
Consider the following example:
static bool CardHasLock(int width, int height)
{
const double xScale = 0.051;
const double yScale = 0.0278;
int lockWidth = (int)floor(width * xScale);
int lockHeight = (int)floor(width * yScale);
....
}
The 'height' parameter is never used in the function body while the 'width' parameter is used twice, including the initialization of the 'lockHeight' variable. There is very likely an error here and the code initializing the 'lockHeight' variable should actually look like this:
int lockHeight = (int)floor(height * yScale);
This diagnostic is classified as:
|
You can look at examples of errors detected by the V751 diagnostic. |
Was this page helpful?
Your message has been sent. We will email you at
If you do not see the email in your inbox, please check if it is filtered to one of the following folders:
Take
a chance!