From eeeb963b9d2058fc6cbbfb2c868f1530928185d4 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Sun, 12 Dec 2004 23:08:13 +0000 Subject: [PATCH] - Fix compilation errors with GCC 4.0-20041205. svn path=/trunk/; revision=12065 --- reactos/subsys/win32k/eng/bitblt.c | 4 ++-- reactos/subsys/win32k/eng/xlate.c | 6 +++--- reactos/subsys/win32k/include/msgqueue.h | 4 ++-- reactos/subsys/win32k/include/window.h | 2 +- reactos/subsys/win32k/ntuser/misc.c | 4 ++-- reactos/subsys/win32k/ntuser/window.c | 6 +++--- reactos/subsys/win32k/ntuser/winpos.c | 6 +++--- reactos/subsys/win32k/objects/bitmaps.c | 4 ++-- reactos/subsys/win32k/objects/text.c | 4 ++-- 9 files changed, 20 insertions(+), 20 deletions(-) diff --git a/reactos/subsys/win32k/eng/bitblt.c b/reactos/subsys/win32k/eng/bitblt.c index 6293a3e0413..6d616ae35d7 100644 --- a/reactos/subsys/win32k/eng/bitblt.c +++ b/reactos/subsys/win32k/eng/bitblt.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: bitblt.c,v 1.60 2004/12/12 21:38:25 royce Exp $ +/* $Id: bitblt.c,v 1.61 2004/12/12 23:08:09 navaraf Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -89,7 +89,7 @@ BltMask(SURFOBJ* Dest, static BYTE maskbit[8] = { 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01 }; /* Pattern brushes */ PGDIBRUSHINST GdiBrush = NULL; - HBITMAP PatternSurface; + HBITMAP PatternSurface = NULL; SURFOBJ *PatternObj = NULL; PBITMAPOBJ PatternBitmap; ULONG PatternWidth = 0, PatternHeight = 0, PatternY = 0; diff --git a/reactos/subsys/win32k/eng/xlate.c b/reactos/subsys/win32k/eng/xlate.c index 6b955c6aeb5..d4f1a35b62b 100644 --- a/reactos/subsys/win32k/eng/xlate.c +++ b/reactos/subsys/win32k/eng/xlate.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: xlate.c,v 1.43 2004/12/12 01:40:36 weiden Exp $ +/* $Id: xlate.c,v 1.44 2004/12/12 23:08:09 navaraf Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -151,8 +151,8 @@ IntEngCreateXlate(USHORT DestPalType, USHORT SourcePalType, XLATEGDI *XlateGDI; PALGDI *SourcePalGDI = 0; PALGDI *DestPalGDI = 0; - ULONG SourceRedMask, SourceGreenMask, SourceBlueMask; - ULONG DestRedMask, DestGreenMask, DestBlueMask; + ULONG SourceRedMask = 0, SourceGreenMask = 0, SourceBlueMask = 0; + ULONG DestRedMask = 0, DestGreenMask = 0, DestBlueMask = 0; ULONG i; XlateGDI = EngAllocMem(0, sizeof(XLATEGDI), TAG_XLATEOBJ); diff --git a/reactos/subsys/win32k/include/msgqueue.h b/reactos/subsys/win32k/include/msgqueue.h index b6fd84087d9..b9aa1f59aec 100644 --- a/reactos/subsys/win32k/include/msgqueue.h +++ b/reactos/subsys/win32k/include/msgqueue.h @@ -194,8 +194,8 @@ MsqSetStateWindow(PUSER_MESSAGE_QUEUE MessageQueue, ULONG Type, HWND hWnd); inline BOOL MsqIsSignaled( PUSER_MESSAGE_QUEUE queue ); inline VOID MsqSetQueueBits( PUSER_MESSAGE_QUEUE queue, WORD bits ); inline VOID MsqClearQueueBits( PUSER_MESSAGE_QUEUE queue, WORD bits ); -BOOL IntInitMessagePumpHook(); -BOOL IntUninitMessagePumpHook(); +BOOL STDCALL IntInitMessagePumpHook(); +BOOL STDCALL IntUninitMessagePumpHook(); #define MAKE_LONG(x, y) ((((y) & 0xFFFF) << 16) | ((x) & 0xFFFF)) PHOOKTABLE FASTCALL MsqGetHooks(PUSER_MESSAGE_QUEUE Queue); diff --git a/reactos/subsys/win32k/include/window.h b/reactos/subsys/win32k/include/window.h index 616c199b65b..46055dfffce 100644 --- a/reactos/subsys/win32k/include/window.h +++ b/reactos/subsys/win32k/include/window.h @@ -212,7 +212,7 @@ BOOL FASTCALL IntGetWindowInfo(PWINDOW_OBJECT WindowObject, PWINDOWINFO pwi); VOID FASTCALL -IntGetWindowBorderMeasures(PWINDOW_OBJECT WindowObject, INT *cx, INT *cy); +IntGetWindowBorderMeasures(PWINDOW_OBJECT WindowObject, UINT *cx, UINT *cy); BOOL FASTCALL IntAnyPopup(VOID); diff --git a/reactos/subsys/win32k/ntuser/misc.c b/reactos/subsys/win32k/ntuser/misc.c index 7772a2c03b3..bb9c67cdcac 100644 --- a/reactos/subsys/win32k/ntuser/misc.c +++ b/reactos/subsys/win32k/ntuser/misc.c @@ -1,4 +1,4 @@ -/* $Id: misc.c,v 1.91 2004/12/12 01:40:37 weiden Exp $ +/* $Id: misc.c,v 1.92 2004/12/12 23:08:11 navaraf Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -563,7 +563,7 @@ NtUserCallTwoParam( case TWOPARAM_ROUTINE_GETSYSCOLORPENS: case TWOPARAM_ROUTINE_GETSYSCOLORS: { - DWORD Ret; + DWORD Ret = 0; union { PVOID Pointer; diff --git a/reactos/subsys/win32k/ntuser/window.c b/reactos/subsys/win32k/ntuser/window.c index c91363e82e1..d68c9f5903d 100644 --- a/reactos/subsys/win32k/ntuser/window.c +++ b/reactos/subsys/win32k/ntuser/window.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: window.c,v 1.254 2004/12/12 16:47:52 navaraf Exp $ +/* $Id: window.c,v 1.255 2004/12/12 23:08:11 navaraf Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -402,7 +402,7 @@ static LRESULT IntDestroyWindow(PWINDOW_OBJECT Window, } VOID FASTCALL -IntGetWindowBorderMeasures(PWINDOW_OBJECT WindowObject, INT *cx, INT *cy) +IntGetWindowBorderMeasures(PWINDOW_OBJECT WindowObject, UINT *cx, UINT *cy) { if(HAS_DLGFRAME(WindowObject->Style, WindowObject->ExStyle) && !(WindowObject->Style & WS_MINIMIZE)) { @@ -1327,7 +1327,7 @@ BOOL FASTCALL IntCalcDefPosSize(PWINDOW_OBJECT Parent, PWINDOW_OBJECT WindowObject, RECT *rc, BOOL IncPos) { SIZE Sz; - POINT Pos; + POINT Pos = {0, 0}; if(Parent != NULL) { diff --git a/reactos/subsys/win32k/ntuser/winpos.c b/reactos/subsys/win32k/ntuser/winpos.c index 5120de74d20..5f361247ec0 100644 --- a/reactos/subsys/win32k/ntuser/winpos.c +++ b/reactos/subsys/win32k/ntuser/winpos.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: winpos.c,v 1.126 2004/12/12 01:40:38 weiden Exp $ +/* $Id: winpos.c,v 1.127 2004/12/12 23:08:12 navaraf Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -175,7 +175,7 @@ PINTERNALPOS FASTCALL WinPosInitInternalPos(PWINDOW_OBJECT WindowObject, POINT *pt, PRECT RestoreRect) { PWINDOW_OBJECT Parent; - INT XInc, YInc; + UINT XInc, YInc; if (WindowObject->InternalPos == NULL) { @@ -331,7 +331,7 @@ WinPosMinMaximize(PWINDOW_OBJECT WindowObject, UINT ShowFlag, RECT* NewPos) VOID FASTCALL WinPosFillMinMaxInfoStruct(PWINDOW_OBJECT Window, MINMAXINFO *Info) { - INT XInc, YInc; + UINT XInc, YInc; RECT WorkArea; PDESKTOP_OBJECT Desktop = PsGetWin32Thread()->Desktop; /* Or rather get it from the window? */ diff --git a/reactos/subsys/win32k/objects/bitmaps.c b/reactos/subsys/win32k/objects/bitmaps.c index e7026bca173..5aca49e2a4c 100644 --- a/reactos/subsys/win32k/objects/bitmaps.c +++ b/reactos/subsys/win32k/objects/bitmaps.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: bitmaps.c,v 1.83 2004/12/12 20:58:09 royce Exp $ */ +/* $Id: bitmaps.c,v 1.84 2004/12/12 23:08:12 navaraf Exp $ */ #include #define IN_RECT(r,x,y) \ @@ -156,7 +156,7 @@ NtGdiBitBlt( SourcePalette = DCSrc->w.hPalette; /* KB41464 details how to convert between mono and color */ - if (DCDest->w.bitsPerPixel == DCSrc->w.bitsPerPixel == 1) + if (DCDest->w.bitsPerPixel == 1 && DCSrc->w.bitsPerPixel == 1) { XlateObj = NULL; } diff --git a/reactos/subsys/win32k/objects/text.c b/reactos/subsys/win32k/objects/text.c index f31b2669e0d..47a37da7a34 100644 --- a/reactos/subsys/win32k/objects/text.c +++ b/reactos/subsys/win32k/objects/text.c @@ -22,7 +22,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: text.c,v 1.114 2004/12/12 21:58:42 royce Exp $ */ +/* $Id: text.c,v 1.115 2004/12/12 23:08:13 navaraf Exp $ */ #include #include @@ -1497,7 +1497,7 @@ NtGdiExtTextOut( INT yoff; FONTOBJ *FontObj; PFONTGDI FontGDI; - PTEXTOBJ TextObj; + PTEXTOBJ TextObj = NULL; PPALGDI PalDestGDI; XLATEOBJ *XlateObj, *XlateObj2; ULONG Mode;