On Tue, Jan 6, 2015 at 4:50 PM, Vinson Lee <[email protected]> wrote:
> vertexattribpointer.c: In function 'piglit_display':
> vertexattribpointer.c:180:4: warning: 'data' may be used uninitialized in 
> this function [-Wmaybe-uninitialized]
>     memcpy(attr_buffer + i * sz, data, sz);
>     ^
> vertexattribpointer.c:90:14: note: 'data' was declared here
>   const void *data;
>               ^
>
> Signed-off-by: Vinson Lee <[email protected]>
> ---
>  tests/spec/gl-2.0/vertexattribpointer.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/tests/spec/gl-2.0/vertexattribpointer.c 
> b/tests/spec/gl-2.0/vertexattribpointer.c
> index 872447b..46fabcc 100644
> --- a/tests/spec/gl-2.0/vertexattribpointer.c
> +++ b/tests/spec/gl-2.0/vertexattribpointer.c
> @@ -153,6 +153,7 @@ test_array(GLenum type, GLuint size, GLboolean normalized)
>                 assert(0);
>                 maxVal = 1.0;
>                 typeSize = sizeof(GLfloat);
> +               data = NULL;
>         }
>
>         if (normalized) {
> --
> 2.2.0
>
> _______________________________________________
> Piglit mailing list
> [email protected]
> http://lists.freedesktop.org/mailman/listinfo/piglit

Reviewed-by: Anuj Phogat <[email protected]>
_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to