st/wgl: init a variable to silence MinGW warning
authorBrian Paul <brianp@vmware.com>
Sat, 2 Mar 2019 18:26:44 +0000 (11:26 -0700)
committerBrian Paul <brianp@vmware.com>
Mon, 4 Mar 2019 18:48:48 +0000 (11:48 -0700)
MinGW release build says 'value' may be used before being initialized.

Reviewed-by: Neha Bhende <bhenden@vmware.com>
src/gallium/state_trackers/wgl/stw_ext_pixelformat.c

index 6281d5d241d7d25f7bd4a5014bebe41729db417a..7abbb80d12d7c221d3b366e3d3c36806d3fa6c8a 100644 (file)
@@ -487,7 +487,7 @@ wglGetPixelFormatAttribfvARB(HDC hdc, int iPixelFormat, int iLayerPlane,
    (void) hdc;
 
    for (i = 0; i < nAttributes; i++) {
-      int value;
+      int value = 0;
 
       if (!stw_query_attrib(iPixelFormat, iLayerPlane,
                              piAttributes[i], &value))