From: Guillermo Rodriguez Garcia Date: Mon, 26 Aug 2002 21:12:25 +0000 (+0000) Subject: Removed compilation warnings (mostly mismatches between the format string X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/9b601c243f14c7e8f3f1c784d962fed81d118e1a Removed compilation warnings (mostly mismatches between the format string for debug/trace printfs and the actual parameters, e.g. int vs long, etc) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16795 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/bitmap.cpp b/src/msw/bitmap.cpp index 3d725cfea2..038afaa721 100644 --- a/src/msw/bitmap.cpp +++ b/src/msw/bitmap.cpp @@ -966,7 +966,7 @@ bool wxBitmap::Create(void *data, long type, int width, int height, int depth) if ( !handler ) { - wxLogDebug(wxT("Failed to create bitmap: no bitmap handler for type %d defined."), type); + wxLogDebug(wxT("Failed to create bitmap: no bitmap handler for type %ld defined."), type); return FALSE; } diff --git a/src/msw/dcprint.cpp b/src/msw/dcprint.cpp index 76b0ff965a..e2b917ed82 100644 --- a/src/msw/dcprint.cpp +++ b/src/msw/dcprint.cpp @@ -194,7 +194,7 @@ bool wxPrinterDC::StartDoc(const wxString& message) if (ret <= 0) { DWORD lastError = GetLastError(); - wxLogDebug(wxT("wxDC::StartDoc failed with error: %d\n"), lastError); + wxLogDebug(wxT("wxDC::StartDoc failed with error: %ld\n"), lastError); } #endif diff --git a/src/msw/ole/dataobj.cpp b/src/msw/ole/dataobj.cpp index 927950ca11..5d9e131157 100644 --- a/src/msw/ole/dataobj.cpp +++ b/src/msw/ole/dataobj.cpp @@ -554,7 +554,7 @@ STDMETHODIMP wxIDataObject::QueryGetData(FORMATETC *pformatetc) // the only one allowed by current COM implementation if ( pformatetc->lindex != -1 ) { wxLogTrace(wxTRACE_OleCalls, - wxT("wxIDataObject::QueryGetData: bad lindex %d"), + wxT("wxIDataObject::QueryGetData: bad lindex %ld"), pformatetc->lindex); return DV_E_LINDEX; @@ -563,7 +563,7 @@ STDMETHODIMP wxIDataObject::QueryGetData(FORMATETC *pformatetc) // we don't support anything other (THUMBNAIL, ICON, DOCPRINT...) if ( pformatetc->dwAspect != DVASPECT_CONTENT ) { wxLogTrace(wxTRACE_OleCalls, - wxT("wxIDataObject::QueryGetData: bad dwAspect %d"), + wxT("wxIDataObject::QueryGetData: bad dwAspect %ld"), pformatetc->dwAspect); return DV_E_DVASPECT; diff --git a/src/msw/tbar95.cpp b/src/msw/tbar95.cpp index 3748168d9e..6f4b505b94 100644 --- a/src/msw/tbar95.cpp +++ b/src/msw/tbar95.cpp @@ -864,7 +864,7 @@ bool wxToolBar::MSWOnNotify(int WXUNUSED(idCtrl), // the tooltips control created by the toolbar is sometimes Unicode, even // in an ANSI application - this seems to be a bug in comctl32.dll v5 UINT code = hdr->code; - if ( (code != TTN_NEEDTEXTA) && (code != TTN_NEEDTEXTW) ) + if ( (code != (UINT) TTN_NEEDTEXTA) && (code != (UINT) TTN_NEEDTEXTW) ) return FALSE; HWND toolTipWnd = (HWND)::SendMessage((HWND)GetHWND(), TB_GETTOOLTIPS, 0, 0); diff --git a/src/msw/toplevel.cpp b/src/msw/toplevel.cpp index 1e6fc3de12..6d5605551f 100644 --- a/src/msw/toplevel.cpp +++ b/src/msw/toplevel.cpp @@ -735,7 +735,7 @@ void wxTopLevelWindowMSW::OnActivate(wxActivateEvent& event) if ( event.GetActive() ) { // restore focus to the child which was last focused - wxLogTrace(_T("focus"), _T("wxTLW %08x activated."), m_hWnd); + wxLogTrace(_T("focus"), _T("wxTLW %08x activated."), (int) m_hWnd); wxWindow *parent = m_winLastFocused ? m_winLastFocused->GetParent() : NULL; @@ -770,9 +770,9 @@ void wxTopLevelWindowMSW::OnActivate(wxActivateEvent& event) wxLogTrace(_T("focus"), _T("wxTLW %08x deactivated, last focused: %08x."), - m_hWnd, - m_winLastFocused ? GetHwndOf(m_winLastFocused) - : NULL); + (int) m_hWnd, + (int) (m_winLastFocused ? GetHwndOf(m_winLastFocused) + : NULL)); event.Skip(); } diff --git a/src/msw/window.cpp b/src/msw/window.cpp index b1b75973f6..d6c6ca249d 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -2249,7 +2249,7 @@ LRESULT WXDLLEXPORT APIENTRY _EXPORT wxWndProc(HWND hWnd, UINT message, WPARAM w // trace all messages - useful for the debugging #ifdef __WXDEBUG__ wxLogTrace(wxTraceMessages, wxT("Processing %s(wParam=%8lx, lParam=%8lx)"), - wxGetMessageName(message), wParam, lParam); + wxGetMessageName(message), (long) wParam, lParam); #endif // __WXDEBUG__ wxWindowMSW *wnd = wxFindWinFromHandle((WXHWND) hWnd); @@ -2852,7 +2852,7 @@ void wxAssociateWinWithHandle(HWND hWnd, wxWindowMSW *win) if ( oldWin && (oldWin != win) ) { wxLogDebug(wxT("HWND %X already associated with another window (%s)"), - hWnd, win->GetClassInfo()->GetClassName()); + (int) hWnd, win->GetClassInfo()->GetClassName()); } else #endif // __WXDEBUG__