[Mesa-dev] [PATCH 1/2] mesa/fbo: do not assign a value that is never read later on

Brian Paul brianp at vmware.com
Mon Mar 30 08:00:48 PDT 2015


On 03/30/2015 02:25 AM, Martin Peres wrote:
> The issue has been detected by coverty.
>
> Signed-off-by: Martin Peres <martin.peres at linux.intel.com>
> ---
>   src/mesa/main/fbobject.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
> index 072e1a8..5f9a6db 100644
> --- a/src/mesa/main/fbobject.c
> +++ b/src/mesa/main/fbobject.c
> @@ -1419,7 +1419,7 @@ create_render_buffers(struct gl_context *ctx, GLsizei n, GLuint *renderbuffers,
>         renderbuffers[i] = name;
>
>         if (dsa) {
> -         obj = allocate_renderbuffer(ctx, name, func);
> +         allocate_renderbuffer(ctx, name, func);
>         } else {
>            obj = &DummyRenderbuffer;
>
>


Maybe you can also move the declaration of obj into the else clause 
since it's only used there.

-Brian



More information about the mesa-dev mailing list