From 803bff584c1c6861e33a91f5075ba68a089a8c8e Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 1 Dec 2015 10:40:45 +0100 Subject: -Werror,-Wint-to-pointer-cast Appart from the by-design type-punned use in CreateWindowEx, m_uID is (only) used in a call to MAKEWPARAM (to create a WPARAM to pass into a SendMessage call), so the most realistic type to use seems to be WORD. And CHatchWindow::Init is only called with a value of 2000 (from docholder.cxx), anyway. Change-Id: I4b6554d1ca9bb3926378c9e25a5473609f5951c5 --- embedserv/source/embed/syswinwrapper.cxx | 8 ++++---- embedserv/source/inc/syswinwrapper.hxx | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'embedserv') diff --git a/embedserv/source/embed/syswinwrapper.cxx b/embedserv/source/embed/syswinwrapper.cxx index 303f49a8f347..a71b9ef2249d 100644 --- a/embedserv/source/embed/syswinwrapper.cxx +++ b/embedserv/source/embed/syswinwrapper.cxx @@ -186,7 +186,7 @@ CHatchWin::~CHatchWin() * * Parameters: * hWndParent HWND of the parent of this window - * uID UINT identifier for this window (send in + * uID WORD identifier for this window (send in * notifications to associate window). * hWndAssoc HWND of the initial associate. * @@ -194,14 +194,14 @@ CHatchWin::~CHatchWin() * BOOL TRUE if the function succeeded, FALSE otherwise. */ -BOOL CHatchWin::Init(HWND hWndParent, UINT uID, HWND hWndAssoc) +BOOL CHatchWin::Init(HWND hWndParent, WORD uID, HWND hWndAssoc) { m_hWndParent = hWndParent; m_hWnd=CreateWindowEx( WS_EX_NOPARENTNOTIFY, SZCLASSHATCHWIN , SZCLASSHATCHWIN, WS_CHILD | WS_CLIPSIBLINGS - | WS_CLIPCHILDREN, 0, 0, 100, 100, hWndParent, (HMENU)uID - , m_hInst, this); + | WS_CLIPCHILDREN, 0, 0, 100, 100, hWndParent + , reinterpret_cast(UINT_PTR(uID)), m_hInst, this); m_uID=uID; m_hWndAssociate=hWndAssoc; diff --git a/embedserv/source/inc/syswinwrapper.hxx b/embedserv/source/inc/syswinwrapper.hxx index 422dff9c3a4a..9814248e5d55 100644 --- a/embedserv/source/inc/syswinwrapper.hxx +++ b/embedserv/source/inc/syswinwrapper.hxx @@ -146,7 +146,7 @@ protected: int m_dBorder; int m_dBorderOrg; - UINT m_uID; + WORD m_uID; HWND m_hWndParent; HWND m_hWndKid; HWND m_hWndAssociate; @@ -157,7 +157,7 @@ protected: CHatchWin(HINSTANCE,const DocumentHolder*); ~CHatchWin(); - BOOL Init(HWND, UINT, HWND); + BOOL Init(HWND, WORD, HWND); HWND HwndAssociateSet(HWND); HWND HwndAssociateGet(); -- cgit