[Piglit] [PATCH] textureSize: Silence GCC maybe-uninitialized warning.

Ian Romanick idr at freedesktop.org
Wed May 31 19:55:16 UTC 2017


Okay... probably ignore this.  I don't know why a message from 2015 just
popped up as "new and unread" in my inbox.  Weird.

On 05/31/2017 12:54 PM, Ian Romanick wrote:
> Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
> 
> On 01/08/2015 12:42 PM, Vinson Lee wrote:
>> textureSize.c: In function 'generate_GLSL':
>> textureSize.c:367:22: warning: 'gs' may be used uninitialized in this function [-Wmaybe-uninitialized]
>>   if (!vs || (gs_code && !gs) || !fs)
>>                       ^
>>
>> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
>> ---
>>  tests/texturing/shaders/textureSize.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/tests/texturing/shaders/textureSize.c b/tests/texturing/shaders/textureSize.c
>> index ee64b07..4013b49 100644
>> --- a/tests/texturing/shaders/textureSize.c
>> +++ b/tests/texturing/shaders/textureSize.c
>> @@ -247,7 +247,7 @@ has_lod(void)
>>  int
>>  generate_GLSL(enum shader_target test_stage)
>>  {
>> -	int vs, gs, fs;
>> +	int vs, gs = 0, fs;
>>  	int prog;
>>  
>>  	static char *vs_code;
>>
> 



More information about the Piglit mailing list