[cfe-commits] [PATCH] review request: mempcpy() checker implementation for Static Analyzer

Lenny Maiorani lenny at Colorado.EDU
Thu Mar 31 13:22:47 PDT 2011


On 03/31/2011 02:00 PM, Ted Kremenek wrote:
> This looks a bit odd:
>
> +
> +  // If the size is zero, there won't be any actual memory access, so
> +  // just bind the return value to the destination buffer and return.
> +  if (stateZeroSize) {
>       C.addTransition(stateZeroSize);
> +    state = state->BindExpr(CE, destVal);
> +    return;
> +  }
>
> It looks like 'state' is assigned a new value that is never read.
>
Good catch. It shall be fixed.

-Lenny




More information about the cfe-commits mailing list