From: Carlo Bramini Subject: [PATCH] Fix type mismatch warning when compiling on Windows Message-Id: <1299858630.169585.1573916073062@mail1.libero.it> Date: Sat, 16 Nov 2019 15:54:33 +0100 (CET) The function COMBO_SelectString() has parameter "start" declared as INT, but there is not a good reason to do so, since it is used only as parameter for SendMessage(). I suggest to change it from INT to WPARAM, for removing the cast to INT inside CB_SELECTSTRING and fixing the warning that I'm getting on Windows because INT to WPARAM type mismatch. Sincerely. Signed-off-by: Carlo Bramini diff --git a/dlls/user32/combo.c b/dlls/user32/combo.c index 4ddccd6c95..9b9c93d129 100644 --- a/dlls/user32/combo.c +++ b/dlls/user32/combo.c @@ -1619,7 +1619,7 @@ static LRESULT COMBO_SetItemHeight( LPHEADCOMBO lphc, INT index, INT height ) /*********************************************************************** * COMBO_SelectString */ -static LRESULT COMBO_SelectString( LPHEADCOMBO lphc, INT start, LPARAM pText, BOOL unicode ) +static LRESULT COMBO_SelectString( LPHEADCOMBO lphc, WPARAM start, LPARAM pText, BOOL unicode ) { INT index = unicode ? SendMessageW(lphc->hWndLBox, LB_SELECTSTRING, start, pText) : SendMessageA(lphc->hWndLBox, LB_SELECTSTRING, start, pText); @@ -2054,7 +2054,7 @@ LRESULT ComboWndProc_common( HWND hwnd, UINT message, WPARAM wParam, LPARAM lPar return unicode ? SendMessageW(lphc->hWndLBox, LB_DELETESTRING, wParam, 0) : SendMessageA(lphc->hWndLBox, LB_DELETESTRING, wParam, 0); case CB_SELECTSTRING: - return COMBO_SelectString(lphc, (INT)wParam, lParam, unicode); + return COMBO_SelectString(lphc, wParam, lParam, unicode); case CB_FINDSTRING: return unicode ? SendMessageW(lphc->hWndLBox, LB_FINDSTRING, wParam, lParam) : SendMessageA(lphc->hWndLBox, LB_FINDSTRING, wParam, lParam);