Mesa (master): graw-gdi: Silence gcc missing initialization warning.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Sun Mar 6 09:19:01 UTC 2011


Module: Mesa
Branch: master
Commit: 5e1b31066b44713971e2770b3c8fe9e5eea286bf
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5e1b31066b44713971e2770b3c8fe9e5eea286bf

Author: José Fonseca <jose.r.fonseca at gmail.com>
Date:   Sun Mar  6 09:10:03 2011 +0000

graw-gdi: Silence gcc missing initialization warning.

---

 src/gallium/targets/graw-gdi/graw_gdi.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/gallium/targets/graw-gdi/graw_gdi.c b/src/gallium/targets/graw-gdi/graw_gdi.c
index 17ca2a7..99d8641 100644
--- a/src/gallium/targets/graw-gdi/graw_gdi.c
+++ b/src/gallium/targets/graw-gdi/graw_gdi.c
@@ -66,7 +66,7 @@ graw_create_window_and_screen(int x,
 {
    struct sw_winsys *winsys = NULL;
    struct pipe_screen *screen = NULL;
-   WNDCLASSEX wc = {sizeof(wc)};
+   WNDCLASSEX wc;
    UINT style = WS_VISIBLE | WS_TILEDWINDOW;
    RECT rect;
    HWND hWnd = NULL;
@@ -83,6 +83,8 @@ graw_create_window_and_screen(int x,
    if (screen == NULL)
       goto fail;
 
+   memset(&wc, 0, sizeof wc);
+   wc.cbSize = sizeof wc;
    wc.style = CS_OWNDC | CS_HREDRAW | CS_VREDRAW;
    wc.lpfnWndProc = window_proc;
    wc.lpszClassName = "graw-gdi";




More information about the mesa-commit mailing list