[Mesa-dev] [PATCH] st/xvmc/tests: Ensure colorkey is initialized.

Christian König deathsimple at vodafone.de
Fri Feb 22 01:58:56 PST 2013


Am 22.02.2013 07:18, schrieb Vinson Lee:
> Fixes uninitialized scalar variable defect reported by Coverity.
>
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
Reviewed-by: Christian König <christian.koenig at amd.com>
> ---
>   src/gallium/state_trackers/xvmc/tests/xvmc_bench.c | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/src/gallium/state_trackers/xvmc/tests/xvmc_bench.c b/src/gallium/state_trackers/xvmc/tests/xvmc_bench.c
> index 4c37b8d..fe85802 100644
> --- a/src/gallium/state_trackers/xvmc/tests/xvmc_bench.c
> +++ b/src/gallium/state_trackers/xvmc/tests/xvmc_bench.c
> @@ -222,6 +222,10 @@ int main(int argc, char **argv)
>   		Atom xv_colorkey = XInternAtom(display, "XV_COLORKEY", 0);
>   		XvGetPortAttribute(display, port_num, xv_colorkey, &colorkey);
>   	}
> +	else
> +	{
> +		colorkey = 0;
> +	}
>   
>   	root = XDefaultRootWindow(display);
>   	window = XCreateSimpleWindow(display, root, 0, 0, config.output_width, config.output_height, 0, 0, colorkey);



More information about the mesa-dev mailing list