summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiang, Haihao <haihao.xiang@intel.com>2011-06-24 09:20:32 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2011-06-24 09:20:32 +0800
commit5b5dfd0e196c53331fde8a21e942619ab5237a9a (patch)
tree33b27526a87b0a81aab9f52882430a234ae9220f
parentf56de7ea7bfb93f17482a8755186ea0c7c6be7cd (diff)
va/test/putsurface_x11: avoid warning 'warning: ‘win’ is used uninitialized in this function'
This fixes broken putsurface on X11 Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
-rw-r--r--test/putsurface/putsurface_x11.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/putsurface/putsurface_x11.c b/test/putsurface/putsurface_x11.c
index db503b4..0c659f7 100644
--- a/test/putsurface/putsurface_x11.c
+++ b/test/putsurface/putsurface_x11.c
@@ -79,6 +79,8 @@ static int create_window(void *win_display, int width, int height)
printf("Create window0 for thread0\n");
drawable_thread0 = (void *)XCreateSimpleWindow(x11_display, root, 0, 0, width, height,
0, 0, WhitePixel(x11_display, 0));
+
+ win = (Window)drawable_thread0;
if (drawable_thread0) {
XSizeHints sizehints;
sizehints.width = width;
@@ -106,6 +108,7 @@ static int create_window(void *win_display, int width, int height)
drawable_thread1 = (void *)XCreateSimpleWindow(x11_display, root, width, 0, width, height,
0, 0, WhitePixel(x11_display, 0));
+ win = (Window)drawable_thread1;
if (drawable_thread1) {
XSizeHints sizehints;
sizehints.width = width;