Code Analyzer has identified a variable that appears to be a
struct
. It also appears that this
struct
variable had one or more fields changed, but the
code never uses the variable, nor is the variable returned. This scenario
indicates that the assignment to the variable has no effect.
Although Code Analyzer generates this message conservatively, it is possible
for Code Analyzer to identify the variable incorrectly as a struct
when it actually
is an object. It is possible for an assignment to an object property to have
side effects that make this assignment appropriate. If the object is a handle
object, this usage is not only appropriate, but common.
If the message is appropriate, you can either:
Remove the assignment, if it is not useful
Correct the program so that it either assigns or returns the value
If the message is inappropriate, do one of the following:
Suppress the message for this assignment.
Suppress the message for the entire file.
Suppress this message for all files, if your programming style is such that this message frequently appears inappropriately.