From 963cbda1e06e0837193143c944704f0fa59f2092 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Mon, 13 Dec 2004 15:39:52 +0000 Subject: [PATCH] - Fix compilation errors with GCC 4.0-20041205. svn path=/trunk/; revision=12082 --- reactos/lib/user32/misc/dde.c | 2 +- reactos/lib/user32/misc/ddeclient.c | 2 +- reactos/lib/user32/misc/desktop.c | 4 ++-- reactos/lib/user32/windows/defwnd.c | 10 +++++----- reactos/lib/user32/windows/font.c | 6 +++--- reactos/lib/user32/windows/message.c | 6 +++--- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/reactos/lib/user32/misc/dde.c b/reactos/lib/user32/misc/dde.c index 766ab370ca0..71c6b5bbbf6 100644 --- a/reactos/lib/user32/misc/dde.c +++ b/reactos/lib/user32/misc/dde.c @@ -262,7 +262,7 @@ BOOL WINAPI DdeSetQualityOfService(HWND hwndClient, CONST SECURITY_QUALITY_OF_SE */ static void WDML_IncrementInstanceId(WDML_INSTANCE* pInstance) { - DWORD id = InterlockedIncrement(&WDML_MaxInstanceID); + DWORD id = InterlockedIncrement((PLONG)&WDML_MaxInstanceID); pInstance->instanceID = id; TRACE("New instance id %ld allocated\n", id); diff --git a/reactos/lib/user32/misc/ddeclient.c b/reactos/lib/user32/misc/ddeclient.c index 24b67237cd4..0274d5cf11f 100644 --- a/reactos/lib/user32/misc/ddeclient.c +++ b/reactos/lib/user32/misc/ddeclient.c @@ -597,7 +597,7 @@ static HGLOBAL WDML_BuildExecuteCommand(WDML_CONV* pConv, LPCVOID pData, DWORD c if (hMem) { - LPBYTE pDst; + PCHAR pDst; pDst = GlobalLock(hMem); if (pDst) diff --git a/reactos/lib/user32/misc/desktop.c b/reactos/lib/user32/misc/desktop.c index a5677d5bfe0..3f165850ff7 100644 --- a/reactos/lib/user32/misc/desktop.c +++ b/reactos/lib/user32/misc/desktop.c @@ -1,4 +1,4 @@ -/* $Id: desktop.c,v 1.35 2004/11/13 01:14:42 rcampbell Exp $ +/* $Id: desktop.c,v 1.36 2004/12/13 15:39:52 navaraf Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS user32.dll @@ -171,7 +171,7 @@ SystemParametersInfoA(UINT uiAction, L"Control Panel\\Desktop", 0, KEY_SET_VALUE, &hKey) == ERROR_SUCCESS) { - Ret = RegSetValueExA(hKey, "Wallpaper", 0, REG_SZ, (lpWallpaper != NULL ? lpWallpaper : ""), + Ret = RegSetValueExA(hKey, "Wallpaper", 0, REG_SZ, (LPBYTE)(lpWallpaper != NULL ? lpWallpaper : ""), (lpWallpaper != NULL ? (lstrlenA(lpWallpaper) + 1) * sizeof(CHAR) : sizeof(CHAR)) == ERROR_SUCCESS); RegCloseKey(hKey); } diff --git a/reactos/lib/user32/windows/defwnd.c b/reactos/lib/user32/windows/defwnd.c index e3d2231625d..0326b7452b5 100644 --- a/reactos/lib/user32/windows/defwnd.c +++ b/reactos/lib/user32/windows/defwnd.c @@ -1,4 +1,4 @@ -/* $Id: defwnd.c,v 1.148 2004/12/12 01:40:36 weiden Exp $ +/* $Id: defwnd.c,v 1.149 2004/12/13 15:39:52 navaraf Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS user32.dll @@ -41,9 +41,9 @@ void FASTCALL MenuInitSysMenuPopup(HMENU Menu, DWORD Style, DWORD ClsStyle, LONG /* GLOBALS *******************************************************************/ -static COLORREF SysColors[NUM_SYSCOLORS] = {0}; -static HPEN SysPens[NUM_SYSCOLORS] = {0}; -static HBRUSH SysBrushes[NUM_SYSCOLORS] = {0}; +COLORREF SysColors[NUM_SYSCOLORS] = {0}; +HPEN SysPens[NUM_SYSCOLORS] = {0}; +HBRUSH SysBrushes[NUM_SYSCOLORS] = {0}; /* Bits in the dwKeyData */ #define KEYDATA_ALT 0x2000 @@ -219,7 +219,7 @@ DefWndHandleSetCursor(HWND hWnd, WPARAM wParam, LPARAM lParam, ULONG Style) return(0); } - switch(LOWORD(lParam)) + switch((INT_PTR) LOWORD(lParam)) { case HTERROR: { diff --git a/reactos/lib/user32/windows/font.c b/reactos/lib/user32/windows/font.c index 449da90571a..c196bc0f5d9 100644 --- a/reactos/lib/user32/windows/font.c +++ b/reactos/lib/user32/windows/font.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: font.c,v 1.12 2004/11/29 16:51:10 navaraf Exp $ +/* $Id: font.c,v 1.13 2004/12/13 15:39:52 navaraf Exp $ * * PROJECT: ReactOS user32.dll * FILE: lib/user32/windows/input.c @@ -750,7 +750,7 @@ static const WCHAR *TEXT_NextLineW( HDC hdc, const WCHAR *str, int *count, int num_fit; int word_broken; int line_fits; - int j_in_seg; + unsigned int j_in_seg; int ellipsified; *pprefix_offset = -1; @@ -826,7 +826,7 @@ static const WCHAR *TEXT_NextLineW( HDC hdc, const WCHAR *str, int *count, if (!line_fits && (format & DT_WORDBREAK)) { const WCHAR *s; - int chars_used; + unsigned int chars_used; TEXT_WordBreak (hdc, dest+seg_j, maxl-seg_j, &j_in_seg, max_seg_width, format, num_fit, &chars_used, &size); line_fits = (size.cx <= max_seg_width); diff --git a/reactos/lib/user32/windows/message.c b/reactos/lib/user32/windows/message.c index 02e9fcd6f5b..f1cb86985e9 100644 --- a/reactos/lib/user32/windows/message.c +++ b/reactos/lib/user32/windows/message.c @@ -1,4 +1,4 @@ -/* $Id: message.c,v 1.44 2004/12/05 03:50:33 navaraf Exp $ +/* $Id: message.c,v 1.45 2004/12/13 15:39:52 navaraf Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS user32.dll @@ -1934,7 +1934,7 @@ BOOL WINAPI RegisterMessagePumpHook(MESSAGEPUMPHOOKPROC Hook) return FALSE; } if (!gcLoadMPH++) { - InterlockedExchange(&gfMessagePumpHook, 1); + InterlockedExchange((PLONG)&gfMessagePumpHook, 1); } LeaveCriticalSection(&gcsMPH); return TRUE; @@ -1947,7 +1947,7 @@ BOOL WINAPI UnregisterMessagePumpHook(VOID) if(NtUserCallNoParam(NOPARAM_ROUTINE_UNINIT_MESSAGE_PUMP)) { gcLoadMPH--; if(!gcLoadMPH) { - InterlockedExchange(&gfMessagePumpHook, 0); + InterlockedExchange((PLONG)&gfMessagePumpHook, 0); gpfnInitMPH(TRUE, NULL); ResetMessagePumpHook(&gmph); gpfnInitMPH = 0;