[Piglit] [PATCH] tex3d-maxsize: Silence uninitialized variable warnings.
Brian Paul
brianp at vmware.com
Fri Jan 17 18:07:24 PST 2014
On 01/17/2014 05:11 PM, Vinson Lee wrote:
> This patch fixes these GCC maybe-uninitialized warnings.
>
> tex3d-maxsize.c: In function 'piglit_display':
> tex3d-maxsize.c:123:15: warning: 'depth' may be used uninitialized in this function [-Wmaybe-uninitialized]
> glTexImage3D(GL_TEXTURE_3D, 0, GL_RGBA8, width, height, depth, 0,
> ^
> tex3d-maxsize.c:123:15: warning: 'height' may be used uninitialized in this function [-Wmaybe-uninitialized]
> tex3d-maxsize.c:123:15: warning: 'width' may be used uninitialized in this function [-Wmaybe-uninitialized]
>
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
> tests/texturing/tex3d-maxsize.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tests/texturing/tex3d-maxsize.c b/tests/texturing/tex3d-maxsize.c
> index ae3aa10..9edc6ed 100644
> --- a/tests/texturing/tex3d-maxsize.c
> +++ b/tests/texturing/tex3d-maxsize.c
> @@ -118,6 +118,7 @@ piglit_display(void)
> if (err == GL_OUT_OF_MEMORY) {
>
> /* use proxy texture to find working max texture size */
> + width = height = depth = 0;
> find_max_tex3d_size(maxsize, &width, &height, &depth);
>
> glTexImage3D(GL_TEXTURE_3D, 0, GL_RGBA8, width, height, depth, 0,
>
For both: Reviewed-by: Brian Paul <brianp at vmware.com>
More information about the Piglit
mailing list