st/xvmc/tests: Ensure colorkey is initialized.

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>
This commit is contained in:
Vinson Lee 2013-02-21 22:00:44 -08:00
parent 54afbce934
commit 2fa9e4c97c

View 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);