[PATCH] RESUBMIT: move code behind error return

Marcus Meissner marcus at jet.franken.de
Wed Apr 16 13:54:31 CDT 2008


Hi,

gcc 4.3 complains that tempHeight is used uninitialized.
Move the use behind the return value check to get rid of
it, we do not need it before.

Ciao, Marcus
---
 dlls/winex11.drv/dib.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/winex11.drv/dib.c b/dlls/winex11.drv/dib.c
index 3d7bebf..f23592c 100644
--- a/dlls/winex11.drv/dib.c
+++ b/dlls/winex11.drv/dib.c
@@ -4040,12 +4040,12 @@ INT X11DRV_GetDIBits( X11DRV_PDEVICE *physDev, HBITMAP hbitmap, UINT startscan,
   if (!(obj_size = GetObjectW( hbitmap, sizeof(dib), &dib ))) return 0;
 
   bitmap_type = DIB_GetBitmapInfo( (BITMAPINFOHEADER*)info, &width, &tempHeight, &descr.infoBpp, &descr.compression);
-  descr.lines = tempHeight;
   if (bitmap_type == -1)
   {
       ERR("Invalid bitmap\n");
       return 0;
   }
+  descr.lines = tempHeight;
   core_header = (bitmap_type == 0);
   colorPtr = (LPBYTE) info + (WORD) info->bmiHeader.biSize;
 
-- 
1.5.2.4



More information about the wine-patches mailing list