[Piglit] [PATCH] getteximage-formats: Fix uninitialized variable.

Brian Paul brianp at vmware.com
Sat Dec 3 09:08:54 PST 2011


On 12/03/2011 12:21 AM, Vinson Lee wrote:
> Fixes Coverity uninitialized scalar variable defect.
>
> Signed-off-by: Vinson Lee<vlee at vmware.com>
> ---
>   tests/texturing/getteximage-formats.c |    4 ++++
>   1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/tests/texturing/getteximage-formats.c b/tests/texturing/getteximage-formats.c
> index c891835..f6bdd56 100644
> --- a/tests/texturing/getteximage-formats.c
> +++ b/tests/texturing/getteximage-formats.c
> @@ -239,6 +239,10 @@ compute_expected_color(const struct format_desc *fmt,
>   			}
>   			else {
>   				baseFormat = 0;  /* ??? */
> +				texel[0] = 0.0;
> +				texel[1] = 0.0;
> +				texel[2] = 0.0;
> +				texel[3] = 0.0;
>   			}
>   		}
>   		else if (l>  0) {

Reviewed-by: Brian Paul <brianp at vmware.com>


More information about the Piglit mailing list