[Mesa-dev] [PATCH 1/2] mesa/fbo: do not assign a value that is never read later on
Martin Peres
martin.peres at linux.intel.com
Mon Mar 30 08:11:07 PDT 2015
On 30/03/15 18:00, Brian Paul wrote:
> 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
>
Good point. I will update the patch.
Can you have a look at the second patch? You have a much better
understanding of what ctx->Shared->mutex is supposed to protect against.
Martin
More information about the mesa-dev
mailing list