[Piglit] [PATCH] arb_es2_compatibility: Check piglit_link_check_status result.

Vinson Lee vlee at freedesktop.org
Tue Dec 1 14:23:49 PST 2015


On Tue, Dec 1, 2015 at 7:20 AM, Brian Paul <brianp at vmware.com> wrote:
> On 11/30/2015 10:37 PM, Vinson Lee wrote:
>>
>> Fixes Coverity "unchecked return value" defect.
>>
>> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
>> ---
>>   .../arb_es2_compatibility/arb_es2_compatibility-releaseshadercompiler.c
>> | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git
>> a/tests/spec/arb_es2_compatibility/arb_es2_compatibility-releaseshadercompiler.c
>> b/tests/spec/arb_es2_compatibility/arb_es2_compatibility-releaseshadercompiler.c
>> index b5c476e..ae5830d 100644
>> ---
>> a/tests/spec/arb_es2_compatibility/arb_es2_compatibility-releaseshadercompiler.c
>> +++
>> b/tests/spec/arb_es2_compatibility/arb_es2_compatibility-releaseshadercompiler.c
>> @@ -70,7 +70,7 @@ draw(const float *color, float x_offset)
>>
>>         glBindAttribLocation(prog, 0, "vertex");
>>         glLinkProgram(prog);
>> -       piglit_link_check_status(prog);
>> +       assert(piglit_link_check_status(prog));
>
>
> I'd probably do:
>
> (void) piglit_link_check_status(prog);
>
> so the call is made even in non-debug builds.
>
> -Brian
>
>

piglit_link_check_status doesn't fail the test on a link failure if we
do not use the result. Wouldn't this call be a no-op for both debug
and non-debug builds?

>>
>>         glUseProgram(prog);
>>         color_location = glGetUniformLocation(prog, "color");
>>
>


More information about the Piglit mailing list