[Piglit] [PATCH] arb_texture_view-targets: Silence uninitialized variable warning.
Jon Ashburn
jon at lunarg.com
Mon Jan 27 10:08:01 PST 2014
Looks fine.
Reviewed-by: Jon Ashburn <jon at lunarg.com>
On 1/25/14, 12:32 AM, Vinson Lee wrote:
> This patch fixes this GCC maybe-uninitialized warning.
>
> targets.c: In function 'test_target_errors':
> targets.c:198:35: warning: 'numTargets' may be used uninitialized in this function [-Wmaybe-uninitialized]
> pass = pass && check_target_array(GL_NO_ERROR, numTargets, legalTargets,
> ^
>
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
> tests/spec/arb_texture_view/targets.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tests/spec/arb_texture_view/targets.c b/tests/spec/arb_texture_view/targets.c
> index 60bff5b..9dd0858 100644
> --- a/tests/spec/arb_texture_view/targets.c
> +++ b/tests/spec/arb_texture_view/targets.c
> @@ -184,6 +184,7 @@ test_target_errors(GLenum target)
> break;
> default:
> assert(0);
> + numTargets = 0;
> break;
> }
>
More information about the Piglit
mailing list