st/xvmc/tests: Ensure colorkey is initialized.
authorVinson Lee <vlee@freedesktop.org>
Fri, 22 Feb 2013 06:00:44 +0000 (22:00 -0800)
committerVinson Lee <vlee@freedesktop.org>
Sat, 23 Feb 2013 03:32:00 +0000 (19:32 -0800)
Fixes uninitialized scalar variable defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Christian König <christian.koenig@amd.com>
src/gallium/state_trackers/xvmc/tests/xvmc_bench.c

index 4c37b8dade72d99d7aa2529cc73070df50b2a095..fe8580219363501b94f3b5e7bdf44264f2152c3b 100644 (file)
@@ -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);