[PATCH 0/2] MR10872: comctl32, localui: Avoid unused global variables.
Fixes -Wunused-but-set-global warnings. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10872
From: Jacek Caban <jacek@codeweavers.com> Fixes -Wunused-but-set-global warnings. --- dlls/comctl32/tests/animate.c | 3 +-- dlls/comctl32/tests/button.c | 13 ------------- dlls/comctl32/tests/pager.c | 3 --- 3 files changed, 1 insertion(+), 18 deletions(-) diff --git a/dlls/comctl32/tests/animate.c b/dlls/comctl32/tests/animate.c index ea89a9b994b..1a870ba1804 100644 --- a/dlls/comctl32/tests/animate.c +++ b/dlls/comctl32/tests/animate.c @@ -32,7 +32,6 @@ static HWND hAnimateParentWnd, hAnimateWnd; static const char animateTestClass[] = "AnimateTestClass"; -static WNDPROC animate_wndproc; static HANDLE shell32; /* try to make sure pending X events have been processed before continuing */ @@ -100,7 +99,7 @@ static void create_animate(DWORD parent_style, DWORD animate_style) hAnimateWnd = CreateWindowExA(0, ANIMATE_CLASSA, NULL, WS_CHILD | WS_VISIBLE | animate_style, 0, 0, rect.right, rect.bottom, hAnimateParentWnd, NULL, shell32, 0); ok(hAnimateWnd != NULL, "failed to create parent wnd\n"); - animate_wndproc = (WNDPROC)SetWindowLongPtrA(hAnimateWnd, GWLP_WNDPROC, 0); + SetWindowLongPtrA(hAnimateWnd, GWLP_WNDPROC, 0); ShowWindow(hAnimateParentWnd, SW_SHOWNORMAL); ok(GetUpdateRect(hAnimateParentWnd, NULL, FALSE), "GetUpdateRect: There should be a region that needs to be updated\n"); diff --git a/dlls/comctl32/tests/button.c b/dlls/comctl32/tests/button.c index ff5d1ba388f..cb54c193f00 100644 --- a/dlls/comctl32/tests/button.c +++ b/dlls/comctl32/tests/button.c @@ -30,8 +30,6 @@ #define IS_WNDPROC_HANDLE(x) (((ULONG_PTR)(x) >> 16) == (~0u >> 16)) -static BOOL is_theme_active; - static BOOL (WINAPI *pSetWindowSubclass)(HWND, SUBCLASSPROC, UINT_PTR, DWORD_PTR); static BOOL (WINAPI *pRemoveWindowSubclass)(HWND, SUBCLASSPROC, UINT_PTR); static LRESULT (WINAPI *pDefSubclassProc)(HWND, UINT, WPARAM, LPARAM); @@ -2566,23 +2564,12 @@ static void test_radiobutton_focus(void) START_TEST(button) { - BOOL (WINAPI * pIsThemeActive)(VOID); ULONG_PTR ctx_cookie; - HMODULE uxtheme; HANDLE hCtx; if (!load_v6_module(&ctx_cookie, &hCtx)) return; - uxtheme = LoadLibraryA("uxtheme.dll"); - if (uxtheme) - { - pIsThemeActive = (void*)GetProcAddress(uxtheme, "IsThemeActive"); - if (pIsThemeActive) - is_theme_active = pIsThemeActive(); - FreeLibrary(uxtheme); - } - register_parent_class(); init_functions(); diff --git a/dlls/comctl32/tests/pager.c b/dlls/comctl32/tests/pager.c index b935caed340..7f670440dd8 100644 --- a/dlls/comctl32/tests/pager.c +++ b/dlls/comctl32/tests/pager.c @@ -202,7 +202,6 @@ static const struct notify_test_datetime_format #define CHILD2_ID 2 static BOOL (WINAPI *pInitCommonControlsEx)(const INITCOMMONCONTROLSEX*); -static BOOL (WINAPI *pSetWindowSubclass)(HWND, SUBCLASSPROC, UINT_PTR, DWORD_PTR); static struct msg_sequence *sequences[NUM_MSG_SEQUENCES]; @@ -1294,8 +1293,6 @@ static void init_functions(void) #define X(f) p##f = (void*)GetProcAddress(mod, #f); X(InitCommonControlsEx); #undef X - - pSetWindowSubclass = (void*)GetProcAddress(mod, (LPSTR)410); } START_TEST(pager) -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10872
From: Jacek Caban <jacek@codeweavers.com> Fixes -Wunused-but-set-global warnings. --- dlls/localui/tests/localui.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/dlls/localui/tests/localui.c b/dlls/localui/tests/localui.c index b504bd870f7..3f6e81ee199 100644 --- a/dlls/localui/tests/localui.c +++ b/dlls/localui/tests/localui.c @@ -42,7 +42,6 @@ static PMONITORUI (WINAPI *pInitializePrintMonitorUI)(VOID); static PMONITORUI pui; static BOOL (WINAPI *pAddPortUI)(PCWSTR, HWND, PCWSTR, PWSTR *); static BOOL (WINAPI *pConfigurePortUI)(PCWSTR, HWND, PCWSTR); -static BOOL (WINAPI *pDeletePortUI)(PCWSTR, HWND, PCWSTR); static LPBYTE pi_buffer; static DWORD pi_numports; @@ -270,7 +269,6 @@ START_TEST(localui) if (numentries > 2) { pAddPortUI = pui->pfnAddPortUI; pConfigurePortUI = pui->pfnConfigurePortUI; - pDeletePortUI = pui->pfnDeletePortUI; } } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10872
This merge request was approved by Zhiyi Zhang. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10872
This merge request was approved by Nikolay Sivov. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10872
participants (4)
-
Jacek Caban -
Jacek Caban (@jacek) -
Nikolay Sivov (@nsivov) -
Zhiyi Zhang (@zhiyi)