From e202baabd5cea4fdb2fd850581e518888947ed41 Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Tue, 13 Jan 2009 10:55:46 +0100 Subject: [PATCH] user32/tests: Do not cast the (IDC|IDI|RT)_* defines to LPSTR. --- dlls/user32/tests/broadcast.c | 2 +- dlls/user32/tests/dce.c | 2 +- dlls/user32/tests/dialog.c | 2 +- dlls/user32/tests/edit.c | 2 +- dlls/user32/tests/input.c | 6 +++--- dlls/user32/tests/listbox.c | 2 +- dlls/user32/tests/menu.c | 12 ++++++------ dlls/user32/tests/msg.c | 6 +++--- dlls/user32/tests/sysparams.c | 6 +++--- dlls/user32/tests/win.c | 30 +++++++++++++++--------------- dlls/user32/tests/winstation.c | 2 +- 11 files changed, 36 insertions(+), 36 deletions(-) diff --git a/dlls/user32/tests/broadcast.c b/dlls/user32/tests/broadcast.c index b0990e37fa..41f94917d9 100644 --- a/dlls/user32/tests/broadcast.c +++ b/dlls/user32/tests/broadcast.c @@ -80,7 +80,7 @@ static BOOL init_procs(void) cls.cbWndExtra = 0; cls.hInstance = GetModuleHandleA(0); cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); + cls.hCursor = LoadCursorA(0, IDC_ARROW); cls.hbrBackground = GetStockObject(WHITE_BRUSH); cls.lpszMenuName = NULL; cls.lpszClassName = "MainWindowClass"; diff --git a/dlls/user32/tests/dce.c b/dlls/user32/tests/dce.c index fead3850a9..37b95464ef 100644 --- a/dlls/user32/tests/dce.c +++ b/dlls/user32/tests/dce.c @@ -402,7 +402,7 @@ START_TEST(dce) cls.cbWndExtra = 0; cls.hInstance = GetModuleHandleA(0); cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); + cls.hCursor = LoadCursorA(0, IDC_ARROW); cls.hbrBackground = GetStockObject(WHITE_BRUSH); cls.lpszMenuName = NULL; cls.lpszClassName = "cache_class"; diff --git a/dlls/user32/tests/dialog.c b/dlls/user32/tests/dialog.c index 3f07bd3efc..84929e35c1 100644 --- a/dlls/user32/tests/dialog.c +++ b/dlls/user32/tests/dialog.c @@ -872,7 +872,7 @@ static void InitialFocusTest (void) HANDLE hTemplate; DLGTEMPLATE* pTemplate; - hResource = FindResourceA(g_hinst,"FOCUS_TEST_DIALOG", (LPSTR)RT_DIALOG); + hResource = FindResourceA(g_hinst,"FOCUS_TEST_DIALOG", RT_DIALOG); hTemplate = LoadResource(g_hinst, hResource); pTemplate = LockResource(hTemplate); diff --git a/dlls/user32/tests/edit.c b/dlls/user32/tests/edit.c index 46cbb872c0..b1a982079f 100644 --- a/dlls/user32/tests/edit.c +++ b/dlls/user32/tests/edit.c @@ -1973,7 +1973,7 @@ static BOOL RegisterWindowClasses (void) test3.cbWndExtra = 0; test3.hInstance = hinst; test3.hIcon = 0; - test3.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); + test3.hCursor = LoadCursorA(0, IDC_ARROW); test3.hbrBackground = GetStockObject(WHITE_BRUSH); test3.lpszMenuName = NULL; test3.lpszClassName = szEditTest3Class; diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c index a242fbabb2..4a82200eab 100644 --- a/dlls/user32/tests/input.c +++ b/dlls/user32/tests/input.c @@ -339,9 +339,9 @@ static void test_Input_whitebox(void) wclass.style = CS_HREDRAW | CS_VREDRAW; wclass.lpfnWndProc = WndProc; wclass.hInstance = hInstance; - wclass.hIcon = LoadIconA( 0, (LPSTR)IDI_APPLICATION ); - wclass.hCursor = LoadCursorA( NULL, IDC_ARROW); - wclass.hbrBackground = (HBRUSH)( COLOR_WINDOW + 1); + wclass.hIcon = LoadIconA( 0, IDI_APPLICATION ); + wclass.hCursor = LoadCursorA( NULL, IDC_ARROW ); + wclass.hbrBackground = (HBRUSH)( COLOR_WINDOW + 1 ); wclass.lpszMenuName = 0; wclass.cbClsExtra = 0; wclass.cbWndExtra = 0; diff --git a/dlls/user32/tests/listbox.c b/dlls/user32/tests/listbox.c index 6c89f6278f..f05b1a4df0 100644 --- a/dlls/user32/tests/listbox.c +++ b/dlls/user32/tests/listbox.c @@ -287,7 +287,7 @@ static void test_ownerdraw(void) cls.cbWndExtra = 0; cls.hInstance = GetModuleHandle(0); cls.hIcon = 0; - cls.hCursor = LoadCursor(0, (LPSTR)IDC_ARROW); + cls.hCursor = LoadCursor(0, IDC_ARROW); cls.hbrBackground = GetStockObject(WHITE_BRUSH); cls.lpszMenuName = NULL; cls.lpszClassName = "main_window_class"; diff --git a/dlls/user32/tests/menu.c b/dlls/user32/tests/menu.c index a00678b85a..45b6c9f15f 100644 --- a/dlls/user32/tests/menu.c +++ b/dlls/user32/tests/menu.c @@ -1852,9 +1852,9 @@ static void test_menu_input(void) { wclass.style = CS_HREDRAW | CS_VREDRAW; wclass.lpfnWndProc = WndProc; wclass.hInstance = hInstance; - wclass.hIcon = LoadIconA( 0, (LPSTR)IDI_APPLICATION ); - wclass.hCursor = LoadCursorA( NULL, (LPSTR)IDC_ARROW); - wclass.hbrBackground = (HBRUSH)( COLOR_WINDOW + 1); + wclass.hIcon = LoadIconA( 0, IDI_APPLICATION ); + wclass.hCursor = LoadCursorA( NULL, IDC_ARROW ); + wclass.hbrBackground = (HBRUSH)( COLOR_WINDOW + 1 ); wclass.lpszMenuName = 0; wclass.cbClsExtra = 0; wclass.cbWndExtra = 0; @@ -1933,9 +1933,9 @@ static void test_menu_hilitemenuitem( void ) wclass.style = CS_HREDRAW | CS_VREDRAW; wclass.lpfnWndProc = WndProc; wclass.hInstance = GetModuleHandleA( NULL ); - wclass.hIcon = LoadIconA( 0, (LPSTR)IDI_APPLICATION ); - wclass.hCursor = LoadCursorA( NULL, (LPSTR)IDC_ARROW); - wclass.hbrBackground = (HBRUSH)( COLOR_WINDOW + 1); + wclass.hIcon = LoadIconA( 0, IDI_APPLICATION ); + wclass.hCursor = LoadCursorA( NULL, IDC_ARROW ); + wclass.hbrBackground = (HBRUSH)( COLOR_WINDOW + 1 ); wclass.lpszMenuName = 0; wclass.cbClsExtra = 0; wclass.cbWndExtra = 0; diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index d45481cd6a..834b687d3e 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -3211,7 +3211,7 @@ static BOOL mdi_RegisterWindowClasses(void) cls.cbWndExtra = 0; cls.hInstance = GetModuleHandleA(0); cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); + cls.hCursor = LoadCursorA(0, IDC_ARROW); cls.hbrBackground = GetStockObject(WHITE_BRUSH); cls.lpszMenuName = NULL; cls.lpszClassName = "MDI_frame_class"; @@ -7094,7 +7094,7 @@ static BOOL RegisterWindowClasses(void) cls.cbWndExtra = 0; cls.hInstance = GetModuleHandleA(0); cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); + cls.hCursor = LoadCursorA(0, IDC_ARROW); cls.hbrBackground = GetStockObject(WHITE_BRUSH); cls.lpszMenuName = NULL; cls.lpszClassName = "TestWindowClass"; @@ -11078,7 +11078,7 @@ static void test_menu_messages(void) cls.cbWndExtra = 0; cls.hInstance = GetModuleHandleA(0); cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); + cls.hCursor = LoadCursorA(0, IDC_ARROW); cls.hbrBackground = GetStockObject(WHITE_BRUSH); cls.lpszMenuName = NULL; cls.lpszClassName = "TestMenuClass"; diff --git a/dlls/user32/tests/sysparams.c b/dlls/user32/tests/sysparams.c index 0bd7d24056..cf228e0e50 100644 --- a/dlls/user32/tests/sysparams.c +++ b/dlls/user32/tests/sysparams.c @@ -2697,9 +2697,9 @@ START_TEST(sysparams) wc.lpfnWndProc = SysParamsTestWndProc; wc.style = CS_OWNDC | CS_VREDRAW | CS_HREDRAW; wc.hInstance = hInstance; - wc.hIcon = LoadIconA( 0, (LPSTR)IDI_APPLICATION ); - wc.hCursor = LoadCursorA( 0, (LPSTR)IDC_ARROW ); - wc.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1 ); + wc.hIcon = LoadIconA( 0, IDI_APPLICATION ); + wc.hCursor = LoadCursorA( 0, IDC_ARROW ); + wc.hbrBackground = (HBRUSH)( COLOR_WINDOW + 1 ); wc.lpszMenuName = 0; wc.cbClsExtra = 0; wc.cbWndExtra = 0; diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index 99b58c0132..7f6f88baea 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -696,7 +696,7 @@ static BOOL RegisterWindowClasses(void) cls.cbWndExtra = 0; cls.hInstance = GetModuleHandleA(0); cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); + cls.hCursor = LoadCursorA(0, IDC_ARROW); cls.hbrBackground = GetStockObject(WHITE_BRUSH); cls.lpszMenuName = NULL; cls.lpszClassName = "MainWindowClass"; @@ -709,7 +709,7 @@ static BOOL RegisterWindowClasses(void) cls.cbWndExtra = 0; cls.hInstance = GetModuleHandleA(0); cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); + cls.hCursor = LoadCursorA(0, IDC_ARROW); cls.hbrBackground = GetStockObject(WHITE_BRUSH); cls.lpszMenuName = NULL; cls.lpszClassName = "ToolWindowClass"; @@ -1692,7 +1692,7 @@ static BOOL mdi_RegisterWindowClasses(void) cls.cbWndExtra = 0; cls.hInstance = GetModuleHandleA(0); cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); + cls.hCursor = LoadCursorA(0, IDC_ARROW); cls.hbrBackground = GetStockObject(WHITE_BRUSH); cls.lpszMenuName = NULL; cls.lpszClassName = "MDI_parent_Class"; @@ -1737,9 +1737,9 @@ static void test_icons(void) { WNDCLASSEXA cls; HWND hwnd; - HICON icon = LoadIconA(0, (LPSTR)IDI_APPLICATION); - HICON icon2 = LoadIconA(0, (LPSTR)IDI_QUESTION); - HICON small_icon = LoadImageA(0, (LPSTR)IDI_APPLICATION, IMAGE_ICON, + HICON icon = LoadIconA(0, IDI_APPLICATION); + HICON icon2 = LoadIconA(0, IDI_QUESTION); + HICON small_icon = LoadImageA(0, IDI_APPLICATION, IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_SHARED ); HICON res; @@ -1749,9 +1749,9 @@ static void test_icons(void) cls.cbClsExtra = 0; cls.cbWndExtra = 0; cls.hInstance = 0; - cls.hIcon = LoadIconA(0, (LPSTR)IDI_HAND); + cls.hIcon = LoadIconA(0, IDI_HAND); cls.hIconSm = small_icon; - cls.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); + cls.hCursor = LoadCursorA(0, IDC_ARROW); cls.hbrBackground = GetStockObject(WHITE_BRUSH); cls.lpszMenuName = NULL; cls.lpszClassName = "IconWindowClass"; @@ -3567,7 +3567,7 @@ static void test_redrawnow(void) cls.cbWndExtra = 0; cls.hInstance = GetModuleHandleA(0); cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); + cls.hCursor = LoadCursorA(0, IDC_ARROW); cls.hbrBackground = GetStockObject(WHITE_BRUSH); cls.lpszMenuName = NULL; cls.lpszClassName = "RedrawWindowClass"; @@ -3736,7 +3736,7 @@ static void test_csparentdc(void) clsMain.cbWndExtra = 0; clsMain.hInstance = GetModuleHandleA(0); clsMain.hIcon = 0; - clsMain.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); + clsMain.hCursor = LoadCursorA(0, IDC_ARROW); clsMain.hbrBackground = GetStockObject(WHITE_BRUSH); clsMain.lpszMenuName = NULL; clsMain.lpszClassName = "ParentDcMainWindowClass"; @@ -3752,7 +3752,7 @@ static void test_csparentdc(void) cls.cbWndExtra = 0; cls.hInstance = GetModuleHandleA(0); cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); + cls.hCursor = LoadCursorA(0, IDC_ARROW); cls.hbrBackground = GetStockObject(WHITE_BRUSH); cls.lpszMenuName = NULL; cls.lpszClassName = "ParentDcWindowClass"; @@ -4249,7 +4249,7 @@ static void test_CreateWindow(void) cls.cbWndExtra = 0; cls.hInstance = GetModuleHandle(0); cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); + cls.hCursor = LoadCursorA(0, IDC_ARROW); cls.hbrBackground = GetStockObject(WHITE_BRUSH); cls.lpszMenuName = NULL; cls.lpszClassName = "MinMax_WndClass"; @@ -4660,7 +4660,7 @@ static void test_GetUpdateRect(void) cls.cbWndExtra = 0; cls.hInstance = GetModuleHandleA(0); cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); + cls.hCursor = LoadCursorA(0, IDC_ARROW); cls.hbrBackground = GetStockObject(WHITE_BRUSH); cls.lpszMenuName = NULL; cls.lpszClassName = classNameA; @@ -5083,7 +5083,7 @@ static void test_fullscreen(void) cls.cbWndExtra = 0; cls.hInstance = GetModuleHandle(0); cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); + cls.hCursor = LoadCursorA(0, IDC_ARROW); cls.hbrBackground = GetStockObject(WHITE_BRUSH); cls.lpszMenuName = NULL; cls.lpszClassName = "fullscreen_class"; @@ -5296,7 +5296,7 @@ static void test_thick_child_size(HWND parentWindow) cls.cbWndExtra = 0; cls.hInstance = GetModuleHandleA(0); cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); + cls.hCursor = LoadCursorA(0, IDC_ARROW); cls.hbrBackground = GetStockObject(WHITE_BRUSH); cls.lpszMenuName = NULL; cls.lpszClassName = className; diff --git a/dlls/user32/tests/winstation.c b/dlls/user32/tests/winstation.c index efc122a32d..596e9ffd8d 100644 --- a/dlls/user32/tests/winstation.c +++ b/dlls/user32/tests/winstation.c @@ -53,7 +53,7 @@ static void register_class(void) cls.cbWndExtra = 0; cls.hInstance = GetModuleHandleA(0); cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); + cls.hCursor = LoadCursorA(0, IDC_ARROW); cls.hbrBackground = GetStockObject(WHITE_BRUSH); cls.lpszMenuName = NULL; cls.lpszClassName = "WinStationClass";