From: Vadim Zeitlin Date: Tue, 2 Oct 2007 11:36:35 +0000 (+0000) Subject: fix several mingw32 warnings (patch from Tim Stahlhut) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/f5851311d3cafff78097f8441d3dc5bf1fc1e6b0 fix several mingw32 warnings (patch from Tim Stahlhut) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49017 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/richtext/richtextsymboldlg.h b/include/wx/richtext/richtextsymboldlg.h index 19bd130005..9f8facaf69 100644 --- a/include/wx/richtext/richtextsymboldlg.h +++ b/include/wx/richtext/richtextsymboldlg.h @@ -28,7 +28,7 @@ ////@begin forward declarations class wxSymbolListCtrl; -class WXDLLIMPEXP_CORE wxTextCtrl; +class WXDLLIMPEXP_FWD_CORE wxTextCtrl; ////@end forward declarations diff --git a/include/wx/vector.h b/include/wx/vector.h index 8cb76a7ee6..6fc0be174a 100644 --- a/include/wx/vector.h +++ b/include/wx/vector.h @@ -59,9 +59,12 @@ public: // increase the size twice, unless we're already too big or unless // more is requested - const size_type increment = (m_size > 0) - ? wxMin(m_size, ALLOC_MAX_SIZE) - : ALLOC_INITIAL_SIZE; + // + // NB: casts to size_t are needed to suppress mingw32 warnings about + // mixing enums and ints in the same expression + const size_type increment = m_size > 0 + ? wxMin(m_size, (size_type)ALLOC_MAX_SIZE) + : (size_type)ALLOC_INITIAL_SIZE; if ( m_capacity + increment > n ) n = m_capacity + increment; diff --git a/src/common/wxcrt.cpp b/src/common/wxcrt.cpp index 4b3096aee5..9c85e471c3 100644 --- a/src/common/wxcrt.cpp +++ b/src/common/wxcrt.cpp @@ -936,9 +936,9 @@ wxCRT_StrtoullBase(const T* nptr, T** endptr, int base, T* sign) unsigned int n; T c = *i; - if ( c >= wxT('0') ) + if ( c >= '0' ) { - if ( c <= wxT('9') ) + if ( c <= '9' ) n = c - wxT('0'); else n = wxTolower(c) - wxT('a') + 10; diff --git a/src/msw/accel.cpp b/src/msw/accel.cpp index 5a13ad0fa4..2504eeafac 100644 --- a/src/msw/accel.cpp +++ b/src/msw/accel.cpp @@ -44,7 +44,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxAcceleratorTable, wxObject) class WXDLLEXPORT wxAcceleratorRefData: public wxObjectRefData { - friend class WXDLLEXPORT wxAcceleratorTable; + friend class WXDLLIMPEXP_FWD_CORE wxAcceleratorTable; public: wxAcceleratorRefData(); virtual ~wxAcceleratorRefData(); diff --git a/src/msw/checklst.cpp b/src/msw/checklst.cpp index 65325be752..933537bc1b 100644 --- a/src/msw/checklst.cpp +++ b/src/msw/checklst.cpp @@ -124,7 +124,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxCheckListBox, wxListBox) class wxCheckListBoxItem : public wxOwnerDrawn { -friend class WXDLLEXPORT wxCheckListBox; +friend class WXDLLIMPEXP_FWD_CORE wxCheckListBox; public: // ctor wxCheckListBoxItem(wxCheckListBox *pParent, size_t nIndex);