[Piglit] [PATCH v2] arb_program_interface_query: Silence uninitialized variable warning.

Martin Peres martin.peres at linux.intel.com
Thu Dec 3 09:08:18 PST 2015


On 02/12/15 01:38, Brian Paul wrote:
> On 12/01/2015 04:18 PM, Vinson Lee wrote:
>> Fixes Coverity "uninitialized scalar variable" defect.
>>
>> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
>> ---
>> v2 - Updated after Brian Paul's comments.
>>
>>   tests/spec/arb_program_interface_query/getprogramresourceiv.c | 6 
>> ++++++
>>   1 file changed, 6 insertions(+)
>>
>> diff --git 
>> a/tests/spec/arb_program_interface_query/getprogramresourceiv.c 
>> b/tests/spec/arb_program_interface_query/getprogramresourceiv.c
>> index 769e29f..e8e917f 100755
>> --- a/tests/spec/arb_program_interface_query/getprogramresourceiv.c
>> +++ b/tests/spec/arb_program_interface_query/getprogramresourceiv.c
>> @@ -668,6 +668,9 @@ check_prop(GLuint prog, GLenum programInterface, 
>> int index, const char *name,
>>           case GL_BUFFER_VARIABLE:
>>               pif = GL_SHADER_STORAGE_BLOCK;
>>               break;
>> +        default:
>> +            assert(!"unexpected programInterface value");
>> +            pif = GL_NONE;
>>           }
>>
>>           parent_idx = glGetProgramResourceIndex(prog, pif,
>> @@ -739,6 +742,9 @@ check_prop(GLuint prog, GLenum programInterface, 
>> int index, const char *name,
>>           case GL_COMPUTE_SUBROUTINE_UNIFORM:
>>               pif = GL_COMPUTE_SUBROUTINE;
>>               break;
>> +        default:
>> +            assert(!"unexpected programInterface value");
>> +            pif = GL_NONE;
>>           }
>>
>>           /* check that the return count is as expected */
>>
>
> Reviewed-by: Brian Paul <brianp at vmware.com>

Thanks for doing this!

Reviewed-by: Martin Peres <martin.peres at intel.linux.com>


More information about the Piglit mailing list