[Piglit] [PATCH] ext_framebuffer_multisample: Ensure type_param is initialized.

Neil Roberts neil at linux.intel.com
Sun Nov 15 04:32:16 PST 2015


Looks good to me, thanks.

Reviewed-by: Neil Roberts <neil at linux.intel.com>

Regards,
- Neil

Vinson Lee <vlee at freedesktop.org> writes:

> Fixes "uninitialized scalar variable" defect reported by Coverity.
>
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
>  tests/spec/ext_framebuffer_multisample/fast-clear.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/tests/spec/ext_framebuffer_multisample/fast-clear.c b/tests/spec/ext_framebuffer_multisample/fast-clear.c
> index 77c6d2a..ad9d170 100644
> --- a/tests/spec/ext_framebuffer_multisample/fast-clear.c
> +++ b/tests/spec/ext_framebuffer_multisample/fast-clear.c
> @@ -273,6 +273,10 @@ test_format(const struct format_desc *format)
>  		type_param = GL_TEXTURE_RED_TYPE;
>  	else if (a_size > 0)
>  		type_param = GL_TEXTURE_ALPHA_TYPE;
> +	else {
> +		assert(0);
> +		type_param = GL_NONE;
> +	}
>  	glGetTexLevelParameteriv(GL_TEXTURE_2D_MULTISAMPLE,
>  				 0, /* level */
>  				 type_param,
> -- 
> 2.4.9 (Apple Git-60)


More information about the Piglit mailing list