[previous] 2982 [next] This assignment is redundant. The value of this object is never used before being modified.
Redundancy

This assignment appears to be redundant because the value of the object is not used before it is modified again.

For example:


/*PRQA S 2017,3198,3408,3447 ++*/

extern int bar(int n);

int foo(void)
{
    int x;

    x = 0;                     /* 2982 */

    x = bar(1);

    return x;
}

QA·C Source Code Analyser 8.1.2
© 2013 Programming Research.
www.programmingresearch.com
Personality Groups | Glossary | Message Index Contents