From ba58db15e810934f308b658ac958c343ea819058 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 9 Nov 2013 13:31:16 +0000 Subject: [PATCH] Fix format specifiers used for event logging in the listctrl sample. Don't use "%ld" for int argument (this is harmless but unnecessary) and cast wxUIntPtr to long before using it with "%ld" as otherwise its size is greater than that of long in Win64 builds. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75145 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/listctrl/listtest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/listctrl/listtest.cpp b/samples/listctrl/listtest.cpp index d5a268e6cb..f4a0a5319c 100644 --- a/samples/listctrl/listtest.cpp +++ b/samples/listctrl/listtest.cpp @@ -1305,9 +1305,9 @@ void MyListCtrl::OnRightClick(wxMouseEvent& event) void MyListCtrl::LogEvent(const wxListEvent& event, const wxChar *eventName) { - wxLogMessage(wxT("Item %ld: %s (item text = %s, data = %ld)"), + wxLogMessage(wxT("Item %d: %s (item text = %s, data = %ld)"), event.GetIndex(), eventName, - event.GetText().c_str(), event.GetData()); + event.GetText(), static_cast(event.GetData())); } wxString MyListCtrl::OnGetItemText(long item, long column) const