From 0eab78625662ec7d232bb9ef4253a8e8c5df5238 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 27 Jul 2015 03:59:42 +0200 Subject: [PATCH] Suppress a harmless warning with MinGW 3.4.5 in wxMSW wxTreeCtrl. Cast NM_DBLCLK to UINT explicitly as it's defined as int in the ancient version of the headers used with this compiler. --- src/msw/treectrl.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp index cf59c7bc03..3112e1eb93 100644 --- a/src/msw/treectrl.cpp +++ b/src/msw/treectrl.cpp @@ -3652,7 +3652,10 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) if ( MSWIsOnItem(tvhti.flags) ) { event.m_item = tvhti.hItem; - eventType = hdr->code == NM_DBLCLK + // Cast is needed for the very old (gcc 3.4.5) MinGW + // headers which didn't define NM_DBLCLK as unsigned, + // resulting in signed/unsigned comparison warning. + eventType = hdr->code == (UINT)NM_DBLCLK ? wxEVT_TREE_ITEM_ACTIVATED : wxEVT_TREE_ITEM_RIGHT_CLICK;