Andrew Talbot : user32: Remove unneeded casts.

Alexandre Julliard julliard at winehq.org
Tue Jan 22 06:01:46 CST 2008


Module: wine
Branch: master
Commit: ba596d30ce95502982aa35b573b4b0e6930b94df
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=ba596d30ce95502982aa35b573b4b0e6930b94df

Author: Andrew Talbot <andrew.talbot at talbotville.com>
Date:   Mon Jan 21 20:06:56 2008 +0000

user32: Remove unneeded casts.

---

 dlls/user32/button.c     |    2 +-
 dlls/user32/class.c      |    8 ++++----
 dlls/user32/combo.c      |    2 +-
 dlls/user32/cursoricon.c |    6 +++---
 dlls/user32/dde_client.c |    2 +-
 dlls/user32/dde_server.c |    4 ++--
 dlls/user32/ddeml16.c    |    2 +-
 7 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/dlls/user32/button.c b/dlls/user32/button.c
index 74720a0..27f10b7 100644
--- a/dlls/user32/button.c
+++ b/dlls/user32/button.c
@@ -672,7 +672,7 @@ static UINT BUTTON_CalcLabelRect(HWND hwnd, HDC hdc, RECT *rc)
       empty_rect:
          rc->right = r.left;
          rc->bottom = r.top;
-         return (UINT)(LONG)-1;
+         return (UINT)-1;
    }
 
    /* Position label inside bounding rectangle according to
diff --git a/dlls/user32/class.c b/dlls/user32/class.c
index 733dfa1..eee9c1d 100644
--- a/dlls/user32/class.c
+++ b/dlls/user32/class.c
@@ -1116,10 +1116,10 @@ BOOL WINAPI GetClassInfoExA( HINSTANCE hInstance, LPCSTR name, WNDCLASSEXA *wc )
     wc->cbClsExtra    = classPtr->cbClsExtra;
     wc->cbWndExtra    = classPtr->cbWndExtra;
     wc->hInstance     = (hInstance == user32_module) ? 0 : hInstance;
-    wc->hIcon         = (HICON)classPtr->hIcon;
-    wc->hIconSm       = (HICON)classPtr->hIconSm;
-    wc->hCursor       = (HCURSOR)classPtr->hCursor;
-    wc->hbrBackground = (HBRUSH)classPtr->hbrBackground;
+    wc->hIcon         = classPtr->hIcon;
+    wc->hIconSm       = classPtr->hIconSm;
+    wc->hCursor       = classPtr->hCursor;
+    wc->hbrBackground = classPtr->hbrBackground;
     wc->lpszMenuName  = CLASS_GetMenuNameA( classPtr );
     wc->lpszClassName = name;
     atom = classPtr->atomName;
diff --git a/dlls/user32/combo.c b/dlls/user32/combo.c
index 6f0fd84..c39d08b 100644
--- a/dlls/user32/combo.c
+++ b/dlls/user32/combo.c
@@ -1155,7 +1155,7 @@ static void CBRollUp( LPHEADCOMBO lphc, BOOL ok, BOOL bButton )
    HWND	hWnd = lphc->self;
 
    TRACE("[%p]: sel ok? [%i] dropped? [%i]\n",
-	 lphc->self, (INT)ok, (INT)(lphc->wState & CBF_DROPPED));
+	 lphc->self, ok, (INT)(lphc->wState & CBF_DROPPED));
 
    CB_NOTIFY( lphc, (ok) ? CBN_SELENDOK : CBN_SELENDCANCEL );
 
diff --git a/dlls/user32/cursoricon.c b/dlls/user32/cursoricon.c
index 7c197ed..88fdd65 100644
--- a/dlls/user32/cursoricon.c
+++ b/dlls/user32/cursoricon.c
@@ -687,7 +687,7 @@ HICON WINAPI CreateIconFromResourceEx( LPBYTE bits, UINT cbSize,
     hotspot.y = ICON_HOTSPOT;
 
     TRACE_(cursor)("%p (%u bytes), ver %08x, %ix%i %s %s\n",
-                   bits, cbSize, (unsigned)dwVersion, width, height,
+                   bits, cbSize, dwVersion, width, height,
                                   bIcon ? "icon" : "cursor", (cFlag & LR_MONOCHROME) ? "mono" : "" );
     if (dwVersion == 0x00020000)
     {
@@ -869,7 +869,7 @@ HICON WINAPI CreateIconFromResourceEx( LPBYTE bits, UINT cbSize,
 
     DeleteObject( hAndBits );
     DeleteObject( hXorBits );
-    return HICON_32((HICON16)hObj);
+    return HICON_32(hObj);
 }
 
 
@@ -1132,7 +1132,7 @@ static HICON CURSORICON_ExtCopy(HICON hIcon, UINT nType,
             }
             else
             {
-                pDirEntry = (CURSORICONDIRENTRY *)CURSORICON_FindBestCursorRes(
+                pDirEntry = CURSORICON_FindBestCursorRes(
                                 pDir, iDesiredCX, iDesiredCY, 1);
             }
 
diff --git a/dlls/user32/dde_client.c b/dlls/user32/dde_client.c
index 56e42fe..adec249 100644
--- a/dlls/user32/dde_client.c
+++ b/dlls/user32/dde_client.c
@@ -717,7 +717,7 @@ static WDML_XACT*	WDML_ClientQueuePoke(WDML_CONV* pConv, LPVOID pData, DWORD cbD
 
     if (cbData == (DWORD)-1)
     {
-        hglobal = (HGLOBAL)pData;
+        hglobal = pData;
         dh = (DDE_DATAHANDLE_HEAD *)GlobalLock(hglobal);
         cbData = GlobalSize(hglobal) - sizeof(DDE_DATAHANDLE_HEAD);
         pData = (LPVOID)(dh + 1);
diff --git a/dlls/user32/dde_server.c b/dlls/user32/dde_server.c
index cd32e4a..a1c2425 100644
--- a/dlls/user32/dde_server.c
+++ b/dlls/user32/dde_server.c
@@ -98,7 +98,7 @@ BOOL WINAPI DdePostAdvise(DWORD idInst, HSZ hszTopic, HSZ hszItem)
 	    hDdeData = WDML_InvokeCallback(pInstance, XTYP_ADVREQ, pLink->uFmt, pLink->hConv,
 					   hszTopic, hszItem, 0, --count, 0);
 
-	    if (hDdeData == (HDDEDATA)CBR_BLOCK)
+	    if (hDdeData == CBR_BLOCK)
 	    {
 		/* MS doc is not consistent here */
 		FIXME("CBR_BLOCK returned for ADVREQ\n");
@@ -463,7 +463,7 @@ static LRESULT CALLBACK WDML_ServerNameProc(HWND hwndServer, UINT iMsg, WPARAM w
 		hDdeData = WDML_InvokeCallback(pInstance, XTYP_WILDCONNECT,
 					       0, 0, hszTop, hszApp, 0, (ULONG_PTR)pcc, self);
 
-		if (hDdeData == (HDDEDATA)CBR_BLOCK)
+		if (hDdeData == CBR_BLOCK)
 		{
 		    /* MS doc is not consistent here */
 		    FIXME("CBR_BLOCK returned for WILDCONNECT\n");
diff --git a/dlls/user32/ddeml16.c b/dlls/user32/ddeml16.c
index 82648f2..4d14e03 100644
--- a/dlls/user32/ddeml16.c
+++ b/dlls/user32/ddeml16.c
@@ -281,7 +281,7 @@ BOOL16 WINAPI DdeFreeDataHandle16(HDDEDATA hData)
  */
 BOOL16 WINAPI DdeKeepStringHandle16(DWORD idInst, HSZ hsz)
 {
-    return (BOOL)DdeKeepStringHandle(idInst, hsz);
+    return DdeKeepStringHandle(idInst, hsz);
 }
 
 /*****************************************************************




More information about the wine-cvs mailing list