From 2fa9e4c97cd7580010a8aa2eb3026e8f2bdb0035 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Thu, 21 Feb 2013 22:00:44 -0800 Subject: [PATCH] st/xvmc/tests: Ensure colorkey is initialized. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes uninitialized scalar variable defect reported by Coverity. Signed-off-by: Vinson Lee Reviewed-by: Christian König --- 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 4c37b8dade7..fe858021936 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); -- 2.30.2