Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
bgColor#ccccff
int *p1, *p2;
p1 = foo();; 
int *p2 = NULL;;
bar(); /* Removable if bar() does not produce any side-effects */
if (baz()) {
   return p1;
}
else {
    p2 = p1;
}
return p2;

Risk Assessment

...

The Coverity Prevent UNUSED_VALUE checker finds variables that are assigned pointer values returned from a function call but never used.. Coverity Prevent cannot discover all violations of this rule so further verification is necessary.

...