From 77fb8cb8c17105a7d308c4837a13e1558a93bfb2 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 14 Jun 2015 20:37:33 +0200 Subject: [PATCH] Fix TDM-GCC warning about int to pointer cast. Use wxUIntToPtr() to suppress the warning, we know that the cast here is safe because Windows uses only pointers fitting in the UINT range for the menu (and other) handles. --- src/msw/menuitem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/msw/menuitem.cpp b/src/msw/menuitem.cpp index e9ae4e95de..8c2e7c1c9c 100644 --- a/src/msw/menuitem.cpp +++ b/src/msw/menuitem.cpp @@ -1272,7 +1272,7 @@ int wxMenuItem::MSGetMenuItemPos() const if ( state & MF_POPUP ) { - if ( ::GetSubMenu(hMenu, i) == (HMENU)id ) + if ( ::GetSubMenu(hMenu, i) == (HMENU)wxUIntToPtr(id) ) return i; } else if ( !(state & MF_SEPARATOR) )