From 5b5dfd0e196c53331fde8a21e942619ab5237a9a Mon Sep 17 00:00:00 2001 From: "Xiang, Haihao" Date: Fri, 24 Jun 2011 09:20:32 +0800 Subject: [PATCH] =?utf8?q?va/test/putsurface=5Fx11:=20avoid=20warning=20'w?= =?utf8?q?arning:=20=E2=80=98win=E2=80=99=20is=20used=20uninitialized=20in?= =?utf8?q?=20this=20function'?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This fixes broken putsurface on X11 Signed-off-by: Xiang, Haihao --- test/putsurface/putsurface_x11.c | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.7.4