From: DRC Date: Wed, 12 Oct 2011 19:38:48 +0000 (+0000) Subject: Newer versions of GCC (specifically, the one in MinGW64) don't like casting directly... X-Git-Tag: v1.1.90~88 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e8b16be85646641d80ee4cd7c5a9bda90bbbc0a4;p=tigervnc.git Newer versions of GCC (specifically, the one in MinGW64) don't like casting directly from a 64-bit pointer to a 32-bit integer, so we need to first cast to a 64-bit integer (remember that Windows is LLP64) git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4722 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- diff --git a/win/winvnc/ControlPanel.cxx b/win/winvnc/ControlPanel.cxx index 59bb511a..9c850d38 100644 --- a/win/winvnc/ControlPanel.cxx +++ b/win/winvnc/ControlPanel.cxx @@ -147,11 +147,11 @@ void ControlPanel::SendCommand(DWORD command, int data) ListConnStatus.Copy(&ListSelConn); ListConnStatus.setAllStatus(data); ListConnStatus.setDisable(isItemChecked(IDC_DISABLE_CLIENTS)); - copyData.cbData = (DWORD)&ListConnStatus; + copyData.cbData = (DWORD)((long long)&ListConnStatus); } else { ListConnStatus.Clear(); } - copyData.cbData = (DWORD)&ListConnStatus; + copyData.cbData = (DWORD)((long long)&ListConnStatus); SendMessage(m_hSTIcon, WM_COPYDATA, 0, (LPARAM)©Data); }