[Piglit] [PATCH] arb_copy_image-formats: Initialize variable.

Jason Ekstrand jason at jlekstrand.net
Fri Nov 7 15:58:04 PST 2014


Sure, fine by me

Reviewed-by: Jason Ekstrand <jason.ekstrand at intel.com>

On Fri, Nov 7, 2014 at 3:11 PM, Vinson Lee <vlee at freedesktop.org> wrote:

> Fixes GCC maybe-uninitialized warning.
>
> formats.c:560:11: warning: 'gtype' may be used uninitialized in this
> function [-Wmaybe-uninitialized]
>    snprintf(fs_src, sizeof(ms_compare_fs_source),
>            ^
>
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
>  tests/spec/arb_copy_image/formats.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/tests/spec/arb_copy_image/formats.c
> b/tests/spec/arb_copy_image/formats.c
> index 92715ba..8a5faa7 100644
> --- a/tests/spec/arb_copy_image/formats.c
> +++ b/tests/spec/arb_copy_image/formats.c
> @@ -551,6 +551,7 @@ load_compare_program(struct texture_format *format)
>                         gtype = "i";
>                 } else {
>                         assert(!"Invalid comparison fucntion");
> +                       gtype = "";
>                 }
>
>                 /* The generated source will be shorter because we replace
> --
> 1.9.3
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20141107/e89c0eaa/attachment.html>


More information about the Piglit mailing list