@@ -392,7 +392,7 @@ stubGetDpiForSystem(void)
392392}
393393
394394 static int WINAPI
395- stubGetSystemMetricsForDpi (int nIndex , UINT dpi )
395+ stubGetSystemMetricsForDpi (int nIndex , UINT dpi UNUSED )
396396{
397397 return GetSystemMetrics (nIndex );
398398}
@@ -4149,7 +4149,7 @@ init_mouse_wheel(void)
41494149 * Mouse scroll event handler.
41504150 */
41514151 static void
4152- _OnMouseWheel (HWND hwnd , WPARAM wParam , LPARAM lParam , int horizontal )
4152+ _OnMouseWheel (HWND hwnd UNUSED , WPARAM wParam , LPARAM lParam , int horizontal )
41534153{
41544154 int button ;
41554155 win_T * wp ;
@@ -4336,9 +4336,10 @@ static HWND hwndTip = NULL;
43364336 static void
43374337show_sizing_tip (int cols , int rows )
43384338{
4339- TOOLINFOA ti = { sizeof ( ti )} ;
4339+ TOOLINFOA ti ;
43404340 char buf [32 ];
43414341
4342+ ti .cbSize = sizeof (ti );
43424343 ti .hwnd = s_hwnd ;
43434344 ti .uId = (UINT_PTR )s_hwnd ;
43444345 ti .uFlags = TTF_SUBCLASS | TTF_IDISHWND ;
@@ -4636,7 +4637,7 @@ _OnMenuSelect(HWND hwnd, WPARAM wParam, LPARAM lParam)
46364637#endif
46374638
46384639 static LRESULT
4639- _OnDpiChanged (HWND hwnd , UINT xdpi , UINT ydpi , RECT * rc )
4640+ _OnDpiChanged (HWND hwnd , UINT xdpi UNUSED , UINT ydpi , RECT * rc UNUSED )
46404641{
46414642 s_dpi = ydpi ;
46424643 s_in_dpichanged = TRUE;
@@ -5106,12 +5107,12 @@ load_dpi_func(void)
51065107 if (hUser32 == NULL )
51075108 goto fail ;
51085109
5109- pGetDpiForSystem = (void * )GetProcAddress (hUser32 , "GetDpiForSystem" );
5110- pGetDpiForWindow = (void * )GetProcAddress (hUser32 , "GetDpiForWindow" );
5111- pGetSystemMetricsForDpi = (void * )GetProcAddress (hUser32 , "GetSystemMetricsForDpi" );
5110+ pGetDpiForSystem = (UINT ( WINAPI * )( void ) )GetProcAddress (hUser32 , "GetDpiForSystem" );
5111+ pGetDpiForWindow = (UINT ( WINAPI * )( HWND ) )GetProcAddress (hUser32 , "GetDpiForWindow" );
5112+ pGetSystemMetricsForDpi = (int ( WINAPI * )( int , UINT ) )GetProcAddress (hUser32 , "GetSystemMetricsForDpi" );
51125113 //pGetWindowDpiAwarenessContext = (void*)GetProcAddress(hUser32, "GetWindowDpiAwarenessContext");
5113- pSetThreadDpiAwarenessContext = (void * )GetProcAddress (hUser32 , "SetThreadDpiAwarenessContext" );
5114- pGetAwarenessFromDpiAwarenessContext = (void * )GetProcAddress (hUser32 , "GetAwarenessFromDpiAwarenessContext" );
5114+ pSetThreadDpiAwarenessContext = (DPI_AWARENESS_CONTEXT ( WINAPI * )( DPI_AWARENESS_CONTEXT ) )GetProcAddress (hUser32 , "SetThreadDpiAwarenessContext" );
5115+ pGetAwarenessFromDpiAwarenessContext = (DPI_AWARENESS ( WINAPI * )( DPI_AWARENESS_CONTEXT ) )GetProcAddress (hUser32 , "GetAwarenessFromDpiAwarenessContext" );
51155116
51165117 if (pSetThreadDpiAwarenessContext != NULL )
51175118 {
@@ -7799,8 +7800,9 @@ initialise_toolbar(void)
77997800update_toolbar_size (void )
78007801{
78017802 int w , h ;
7802- TBMETRICS tbm = { sizeof ( TBMETRICS )} ;
7803+ TBMETRICS tbm ;
78037804
7805+ tbm .cbSize = sizeof (TBMETRICS );
78047806 tbm .dwMask = TBMF_PAD | TBMF_BUTTONSPACING ;
78057807 SendMessage (s_toolbarhwnd , TB_GETMETRICS , 0 , (LPARAM )& tbm );
78067808 //TRACE("Pad: %d, %d", tbm.cxPad, tbm.cyPad);
@@ -8043,27 +8045,27 @@ dyn_imm_load(void)
80438045 return ;
80448046
80458047 pImmGetCompositionStringW
8046- = (void * )GetProcAddress (hLibImm , "ImmGetCompositionStringW" );
8048+ = (LONG ( WINAPI * )( HIMC , DWORD , LPVOID , DWORD ) )GetProcAddress (hLibImm , "ImmGetCompositionStringW" );
80478049 pImmGetContext
8048- = (void * )GetProcAddress (hLibImm , "ImmGetContext" );
8050+ = (HIMC ( WINAPI * )( HWND ) )GetProcAddress (hLibImm , "ImmGetContext" );
80498051 pImmAssociateContext
8050- = (void * )GetProcAddress (hLibImm , "ImmAssociateContext" );
8052+ = (HIMC ( WINAPI * )( HWND , HIMC ) )GetProcAddress (hLibImm , "ImmAssociateContext" );
80518053 pImmReleaseContext
8052- = (void * )GetProcAddress (hLibImm , "ImmReleaseContext" );
8054+ = (BOOL ( WINAPI * )( HWND , HIMC ) )GetProcAddress (hLibImm , "ImmReleaseContext" );
80538055 pImmGetOpenStatus
8054- = (void * )GetProcAddress (hLibImm , "ImmGetOpenStatus" );
8056+ = (BOOL ( WINAPI * )( HIMC ) )GetProcAddress (hLibImm , "ImmGetOpenStatus" );
80558057 pImmSetOpenStatus
8056- = (void * )GetProcAddress (hLibImm , "ImmSetOpenStatus" );
8058+ = (BOOL ( WINAPI * )( HIMC , BOOL ) )GetProcAddress (hLibImm , "ImmSetOpenStatus" );
80578059 pImmGetCompositionFontW
8058- = (void * )GetProcAddress (hLibImm , "ImmGetCompositionFontW" );
8060+ = (BOOL ( WINAPI * )( HIMC , LPLOGFONTW ) )GetProcAddress (hLibImm , "ImmGetCompositionFontW" );
80598061 pImmSetCompositionFontW
8060- = (void * )GetProcAddress (hLibImm , "ImmSetCompositionFontW" );
8062+ = (BOOL ( WINAPI * )( HIMC , LPLOGFONTW ) )GetProcAddress (hLibImm , "ImmSetCompositionFontW" );
80618063 pImmSetCompositionWindow
8062- = (void * )GetProcAddress (hLibImm , "ImmSetCompositionWindow" );
8064+ = (BOOL ( WINAPI * )( HIMC , LPCOMPOSITIONFORM ) )GetProcAddress (hLibImm , "ImmSetCompositionWindow" );
80638065 pImmGetConversionStatus
8064- = (void * )GetProcAddress (hLibImm , "ImmGetConversionStatus" );
8066+ = (BOOL ( WINAPI * )( HIMC , LPDWORD , LPDWORD ) )GetProcAddress (hLibImm , "ImmGetConversionStatus" );
80658067 pImmSetConversionStatus
8066- = (void * )GetProcAddress (hLibImm , "ImmSetConversionStatus" );
8068+ = (BOOL ( WINAPI * )( HIMC , DWORD , DWORD ) )GetProcAddress (hLibImm , "ImmSetConversionStatus" );
80678069
80688070 if ( pImmGetCompositionStringW == NULL
80698071 || pImmGetContext == NULL
0 commit comments