|
PC-lint/FlexeLint Output | Reference Manual Explanation | Home Page bug550.cpp
In this rendition of Cows and Bulls the function is to return a value of 100 times the number of bulls plus the number of cows. But it doesn't seem to be giving the right answer. What's the problem?
bug550.cpp lint Output
--- Module: bug550.cpp
_
}
bug550.cpp 19 Warning 550: Symbol 'cows' (line 8) not accessed
bug550.cpp 19 Warning 550: Symbol 'bulls' (line 8) not accessed
Reference Manual Explanation
550 Symbol 'Symbol' (Location) not accessed -- A variable (local to
some function) was not accessed. This means that the value of a
variable was never used. Perhaps the variable was assigned a
value but was never used. Note that a variable's value is not
considered accessed by autoincrementing or autodecrementing
unless the autoincrement/decrement appears within a larger
expression which uses the resulting value. The same applies to a
construct of the form: var += expression. If an address of a
variable is taken, its value is assumed to be accessed. An array,
struct or union is considered accessed if any portion thereof is
accessed.
|
Previous Bug - Bug #542 - June 2001