From 3d6e19d48a8613da777788b061567e6e8ca0dea4 Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Mon, 3 Nov 2008 22:35:31 +0100 Subject: [PATCH] user32: Do not cast zero. --- dlls/user32/cursoricon.c | 2 +- dlls/user32/driver16.c | 2 +- dlls/user32/resource.c | 4 ++-- dlls/user32/scroll.c | 18 +++++++----------- dlls/user32/tests/listbox.c | 4 ++-- dlls/user32/win.c | 2 +- 6 files changed, 14 insertions(+), 18 deletions(-) diff --git a/dlls/user32/cursoricon.c b/dlls/user32/cursoricon.c index 2af3798cc61..7dfcffbd2c6 100644 --- a/dlls/user32/cursoricon.c +++ b/dlls/user32/cursoricon.c @@ -1667,7 +1667,7 @@ HGLOBAL16 WINAPI LoadCursorIconHandler16( HGLOBAL16 hResource, HMODULE16 hModule { FIXME_(cursor)("(%04x,%04x,%04x): old 2.x resources are not supported!\n", hResource, hModule, hRsrc); - return (HGLOBAL16)0; + return 0; } /********************************************************************** diff --git a/dlls/user32/driver16.c b/dlls/user32/driver16.c index 227742de492..439fd3c6b25 100644 --- a/dlls/user32/driver16.c +++ b/dlls/user32/driver16.c @@ -434,7 +434,7 @@ HDRVR16 WINAPI GetNextDriver16(HDRVR16 hDrvr, DWORD dwFlags) } } - hRetDrv = (lpDrv) ? lpDrv->hDriver16 : (HDRVR16)0; + hRetDrv = (lpDrv) ? lpDrv->hDriver16 : 0; TRACE("return %04x !\n", hRetDrv); return hRetDrv; } diff --git a/dlls/user32/resource.c b/dlls/user32/resource.c index ffcc35a1222..46625149455 100644 --- a/dlls/user32/resource.c +++ b/dlls/user32/resource.c @@ -396,10 +396,10 @@ INT WINAPI LoadStringW( HINSTANCE instance, UINT resource_id, i = min(buflen - 1, *p); if (i > 0) { memcpy(buffer, p + 1, i * sizeof (WCHAR)); - buffer[i] = (WCHAR) 0; + buffer[i] = 0; } else { if (buflen > 1) { - buffer[0] = (WCHAR) 0; + buffer[0] = 0; return 0; } } diff --git a/dlls/user32/scroll.c b/dlls/user32/scroll.c index 7b7818b14f4..b27eb12326d 100644 --- a/dlls/user32/scroll.c +++ b/dlls/user32/scroll.c @@ -918,8 +918,7 @@ static void SCROLL_HandleScrollEvent( HWND hwnd, INT nBar, UINT msg, POINT pt) } SetSystemTimer( hwnd, SCROLL_TIMER, (msg == WM_LBUTTONDOWN) ? - SCROLL_FIRST_DELAY : SCROLL_REPEAT_DELAY, - (TIMERPROC)0 ); + SCROLL_FIRST_DELAY : SCROLL_REPEAT_DELAY, NULL ); } else KillSystemTimer( hwnd, SCROLL_TIMER ); break; @@ -936,8 +935,7 @@ static void SCROLL_HandleScrollEvent( HWND hwnd, INT nBar, UINT msg, POINT pt) SB_PAGEUP, (LPARAM)hwndCtl ); } SetSystemTimer( hwnd, SCROLL_TIMER, (msg == WM_LBUTTONDOWN) ? - SCROLL_FIRST_DELAY : SCROLL_REPEAT_DELAY, - (TIMERPROC)0 ); + SCROLL_FIRST_DELAY : SCROLL_REPEAT_DELAY, NULL ); } else KillSystemTimer( hwnd, SCROLL_TIMER ); break; @@ -1005,8 +1003,7 @@ static void SCROLL_HandleScrollEvent( HWND hwnd, INT nBar, UINT msg, POINT pt) SB_PAGEDOWN, (LPARAM)hwndCtl ); } SetSystemTimer( hwnd, SCROLL_TIMER, (msg == WM_LBUTTONDOWN) ? - SCROLL_FIRST_DELAY : SCROLL_REPEAT_DELAY, - (TIMERPROC)0 ); + SCROLL_FIRST_DELAY : SCROLL_REPEAT_DELAY, NULL ); } else KillSystemTimer( hwnd, SCROLL_TIMER ); break; @@ -1023,8 +1020,7 @@ static void SCROLL_HandleScrollEvent( HWND hwnd, INT nBar, UINT msg, POINT pt) } SetSystemTimer( hwnd, SCROLL_TIMER, (msg == WM_LBUTTONDOWN) ? - SCROLL_FIRST_DELAY : SCROLL_REPEAT_DELAY, - (TIMERPROC)0 ); + SCROLL_FIRST_DELAY : SCROLL_REPEAT_DELAY, NULL ); } else KillSystemTimer( hwnd, SCROLL_TIMER ); break; @@ -1791,7 +1787,7 @@ BOOL WINAPI GetScrollInfo(HWND hwnd, INT nBar, LPSCROLLINFO info) /* Refer SB_CTL requests to the window */ if (nBar == SB_CTL) { - SendMessageW(hwnd, SBM_GETSCROLLINFO, (WPARAM)0, (LPARAM)info); + SendMessageW(hwnd, SBM_GETSCROLLINFO, 0, (LPARAM)info); return TRUE; } return SCROLL_GetScrollInfo(hwnd, nBar, info); @@ -1818,7 +1814,7 @@ BOOL WINAPI GetScrollBarInfo(HWND hwnd, LONG idObject, LPSCROLLBARINFO info) /* Refer OBJID_CLIENT requests to the window */ if (idObject == OBJID_CLIENT) - return SendMessageW(hwnd, SBM_GETSCROLLBARINFO, (WPARAM)0, (LPARAM)info); + return SendMessageW(hwnd, SBM_GETSCROLLBARINFO, 0, (LPARAM)info); else return SCROLL_GetScrollBarInfo(hwnd, idObject, info); } @@ -1882,7 +1878,7 @@ INT WINAPI GetScrollPos(HWND hwnd, INT nBar) /* Refer SB_CTL requests to the window */ if (nBar == SB_CTL) - return SendMessageW(hwnd, SBM_GETPOS, (WPARAM)0, (LPARAM)0); + return SendMessageW(hwnd, SBM_GETPOS, 0, 0); else return SCROLL_GetScrollPos(hwnd, nBar); } diff --git a/dlls/user32/tests/listbox.c b/dlls/user32/tests/listbox.c index 6d4050f2b79..06cb44acf76 100644 --- a/dlls/user32/tests/listbox.c +++ b/dlls/user32/tests/listbox.c @@ -103,8 +103,8 @@ buttonpress (HWND handle, WORD x, WORD y) LPARAM lp=x+(y<<16); WAIT; - SendMessage (handle, WM_LBUTTONDOWN, (WPARAM) MK_LBUTTON, lp); - SendMessage (handle, WM_LBUTTONUP , (WPARAM) 0 , lp); + SendMessage (handle, WM_LBUTTONDOWN, MK_LBUTTON, lp); + SendMessage (handle, WM_LBUTTONUP, 0, lp); REDRAW; } diff --git a/dlls/user32/win.c b/dlls/user32/win.c index 833e07d8d21..2fc00c4b7c1 100644 --- a/dlls/user32/win.c +++ b/dlls/user32/win.c @@ -3144,7 +3144,7 @@ BOOL WINAPI FlashWindow( HWND hWnd, BOOL bInvert ) else wparam = (hWnd == GetForegroundWindow()); WIN_ReleasePtr( wndPtr ); - SendMessageW( hWnd, WM_NCACTIVATE, wparam, (LPARAM)0 ); + SendMessageW( hWnd, WM_NCACTIVATE, wparam, 0 ); return wparam; } }