From 02a48e3b0ab51e355129b1550b6028bb963153a1 Mon Sep 17 00:00:00 2001 From: Mattia Barbon Date: Mon, 7 Apr 2003 17:32:19 +0000 Subject: [PATCH] Fix some GCC 3.2 -O2 warnings. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20057 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/vector.h | 9 +++------ src/common/textcmn.cpp | 2 +- src/motif/filedlg.cpp | 2 ++ src/motif/spinbutt.cpp | 2 +- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/include/wx/vector.h b/include/wx/vector.h index 39f2fbd145..36bb252b17 100644 --- a/include/wx/vector.h +++ b/include/wx/vector.h @@ -126,8 +126,7 @@ public: wxVectorBase& operator = (const wxVectorBase& vb) { - bool rc = copy(vb); - wxASSERT(rc); + wxCHECK(copy(vb), *this); return *this; } }; @@ -146,8 +145,7 @@ public:\ cls() {}\ cls(const cls& c)\ {\ - bool rc = copy(c);\ - wxASSERT(rc);\ + wxCHECK2(copy(c), return);\ }\ ~cls()\ {\ @@ -161,8 +159,7 @@ class exp cls : public wxVectorBase\ public:\ void push_back(const obj& o)\ {\ - bool rc = Alloc(size() + 1);\ - wxASSERT(rc);\ + wxCHECK2(Alloc(size() + 1), return);\ Append(new obj(o));\ };\ void pop_back()\ diff --git a/src/common/textcmn.cpp b/src/common/textcmn.cpp index 0e194c6ba3..6709d10e0b 100644 --- a/src/common/textcmn.cpp +++ b/src/common/textcmn.cpp @@ -285,7 +285,7 @@ bool wxTextCtrlBase::EmulateKeyPress(const wxKeyEvent& event) { // the generic version is unused in wxMSW #ifndef __WIN32__ - wxChar ch; + wxChar ch = 0; int keycode = event.GetKeyCode(); switch ( keycode ) { diff --git a/src/motif/filedlg.cpp b/src/motif/filedlg.cpp index 988efef176..c4ea2a4f4e 100644 --- a/src/motif/filedlg.cpp +++ b/src/motif/filedlg.cpp @@ -151,9 +151,11 @@ void wxFileSelOk(Widget WXUNUSED(fs), XtPointer WXUNUSED(client_data), XmFileSel static wxString ParseWildCard( const wxString& wild ) { +#ifdef __WXDEBUG__ static const wxChar* msg = _T("Motif file dialog does not understand this ") _T("wildcard syntax"); +#endif wxStringTokenizer tok( wild, _T("|") ); diff --git a/src/motif/spinbutt.cpp b/src/motif/spinbutt.cpp index 2ad0e3b774..4263105156 100644 --- a/src/motif/spinbutt.cpp +++ b/src/motif/spinbutt.cpp @@ -183,7 +183,7 @@ bool wxArrowButton::Create( wxSpinButton* parent, wxWindowID id, ArrowDirection d, const wxPoint& pos, const wxSize& size ) { - int arrow_dir; + int arrow_dir = XmARROW_UP; switch( d ) { -- 2.45.2