user32: warnings (around uninitialized variables).

Gerald Pfeifer gerald at pfeifer.com
Mon Jul 19 16:06:26 CDT 2010


Turns out that current development versions of GCC are able to look
into function invocations more deeply.

Gerald
---
 dlls/user32/cursoricon.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/dlls/user32/cursoricon.c b/dlls/user32/cursoricon.c
index 9a1810e..fcae444 100644
--- a/dlls/user32/cursoricon.c
+++ b/dlls/user32/cursoricon.c
@@ -366,7 +366,7 @@ static BOOL is_dib_monochrome( const BITMAPINFO* info )
  *           DIB_GetBitmapInfo
  *
  * Get the info from a bitmap header.
- * Return 1 for INFOHEADER, 0 for COREHEADER,
+ * Return 1 for INFOHEADER, 0 for COREHEADER, -1 in case of failure.
  */
 static int DIB_GetBitmapInfo( const BITMAPINFOHEADER *header, LONG *width,
                               LONG *height, WORD *bpp, DWORD *compr )
@@ -388,6 +388,8 @@ static int DIB_GetBitmapInfo( const BITMAPINFOHEADER *header, LONG *width,
         *compr  = header->biCompression;
         return 1;
     }
+
+    *width = *height = 0;
     ERR("(%d): unknown/wrong size for header\n", header->biSize );
     return -1;
 }
-- 
1.6.6.2



More information about the wine-patches mailing list