regedit: Remove some superfluous casts.
authorMichael Stefaniuc <mstefani@redhat.de>
Thu, 4 Dec 2008 04:32:06 +0000 (05:32 +0100)
committerAlexandre Julliard <julliard@winehq.org>
Thu, 4 Dec 2008 11:08:27 +0000 (12:08 +0100)
programs/regedit/framewnd.c
programs/regedit/main.c
programs/regedit/regproc.c
programs/regedit/treeview.c

index a8017033bb9f606d7fb379479184f1a8899452af..5b19899b504fb288eabe89ec668b6abc48856097 100644 (file)
@@ -89,7 +89,7 @@ static void OnEnterMenuLoop(HWND hWnd)
     nParts = -1;
     SendMessageW(hStatusBar, SB_SETPARTS, 1, (long)&nParts);
     bInMenuLoop = TRUE;
-    SendMessageW(hStatusBar, SB_SETTEXTW, (WPARAM)0, (LPARAM)&empty);
+    SendMessageW(hStatusBar, SB_SETTEXTW, 0, (LPARAM)&empty);
 }
 
 static void OnExitMenuLoop(HWND hWnd)
index 6fe129ac6f1fe906d2986abf6d8a832a5cefa1e7..27bc26f5a89c11dc2cc54f6fdb10e0a1a108ae6a 100644 (file)
@@ -92,7 +92,7 @@ static BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
                              0/*hbrBackground*/,
                              0/*lpszMenuName*/,
                              szFrameClass,
-                             (HICON)LoadImage(hInstance, MAKEINTRESOURCE(IDI_REGEDIT), IMAGE_ICON,
+                             LoadImage(hInstance, MAKEINTRESOURCE(IDI_REGEDIT), IMAGE_ICON,
                                               GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_SHARED)
                          };
     ATOM hFrameWndClass = RegisterClassEx(&wcFrame); /* register frame window class */
@@ -109,7 +109,7 @@ static BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
                              0/*hbrBackground*/,
                              0/*lpszMenuName*/,
                              szChildClass,
-                             (HICON)LoadImage(hInstance, MAKEINTRESOURCE(IDI_REGEDIT), IMAGE_ICON,
+                             LoadImage(hInstance, MAKEINTRESOURCE(IDI_REGEDIT), IMAGE_ICON,
                                               GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_SHARED)
 
                          };
index 028789a744e6bf0546aaf7cedf048445e6cbae8a..a4e893691b397607b1839afcf33d9ce089ffe0ae 100644 (file)
@@ -860,7 +860,7 @@ static void REGPROC_print_error(void)
         exit(1);
     }
     puts(lpMsgBuf);
-    LocalFree((HLOCAL)lpMsgBuf);
+    LocalFree(lpMsgBuf);
     exit(1);
 }
 
index f51ccfd25c1dcd60d96892a0ba0f805fa9ca9ad2..20d1b76b8990963c67c0712d337529e5a5d4fa26 100644 (file)
@@ -194,7 +194,7 @@ static HTREEITEM AddEntryToTree(HWND hwndTV, HTREEITEM hParent, LPWSTR label, HK
     tvins.u.item.iSelectedImage = Image_Open;
     tvins.u.item.cChildren = dwChildren;
     tvins.u.item.lParam = (LPARAM)hKey;
-    tvins.hInsertAfter = (HTREEITEM)(hKey ? TVI_LAST : TVI_SORT);
+    tvins.hInsertAfter = hKey ? TVI_LAST : TVI_SORT;
     tvins.hParent = hParent;
 
     return TreeView_InsertItemW(hwndTV, &tvins);
@@ -533,7 +533,7 @@ static BOOL InitTreeViewItems(HWND hwndTV, LPWSTR pHostName)
     tvins.u.item.cChildren = 5;
     /* Save the heading level in the item's application-defined data area.  */
     tvins.u.item.lParam = 0;
-    tvins.hInsertAfter = (HTREEITEM)TVI_FIRST;
+    tvins.hInsertAfter = TVI_FIRST;
     tvins.hParent = TVI_ROOT;
     /* Add the item to the tree view control.  */
     if (!(hRoot = TreeView_InsertItemW(hwndTV, &tvins))) return FALSE;