From b0f0eda8ce631577cf4176d2d17785daddc9b5bc Mon Sep 17 00:00:00 2001 From: Jaakko Salli Date: Sat, 1 Nov 2008 16:49:32 +0000 Subject: [PATCH] Fix various warnings that only appear for release builds git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56628 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/propgrid/advprops.cpp | 2 +- src/propgrid/property.cpp | 4 +--- src/propgrid/propgrid.cpp | 6 ++---- src/propgrid/props.cpp | 1 + 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/propgrid/advprops.cpp b/src/propgrid/advprops.cpp index 158a45d680..c93ca5fdcf 100644 --- a/src/propgrid/advprops.cpp +++ b/src/propgrid/advprops.cpp @@ -929,7 +929,7 @@ void wxSystemColourProperty::OnSetValue() m_value = TranslateVal(val); } - int ind; + int ind = wxNOT_FOUND; if ( m_value.GetType() == wxS("wxColourPropertyValue") ) { diff --git a/src/propgrid/property.cpp b/src/propgrid/property.cpp index 31f6f9dd9a..3280846875 100644 --- a/src/propgrid/property.cpp +++ b/src/propgrid/property.cpp @@ -544,10 +544,8 @@ void wxPGProperty::InitAfterAdded( wxPropertyGridPageState* pageState, // Has initial children if ( GetChildCount() ) { - FlagType parentalFlags = m_flags & wxPG_PROP_PARENTAL_FLAGS; - // Check parental flags - wxASSERT_MSG( parentalFlags, + wxASSERT_MSG( (m_flags & wxPG_PROP_PARENTAL_FLAGS), "Call SetFlag(wxPG_PROP_MISC_PARENT) or" "SetFlag(wxPG_PROP_AGGREGATE) before calling" "wxPGProperty::AddChild()." ); diff --git a/src/propgrid/propgrid.cpp b/src/propgrid/propgrid.cpp index fa2baef34a..2e4b1a5fa9 100644 --- a/src/propgrid/propgrid.cpp +++ b/src/propgrid/propgrid.cpp @@ -3311,8 +3311,6 @@ void wxPropertyGrid::FreeEditors() // Call with NULL to de-select property bool wxPropertyGrid::DoSelectProperty( wxPGProperty* p, unsigned int flags ) { - wxPanel* canvas = GetPanel(); - /* if (p) wxLogDebug(wxT("SelectProperty( %s (%s[%i]) )"),p->m_label.c_str(), @@ -3490,7 +3488,7 @@ bool wxPropertyGrid::DoSelectProperty( wxPGProperty* p, unsigned int flags ) if ( m_wndEditor ) { - wxASSERT_MSG( m_wndEditor->GetParent() == canvas, + wxASSERT_MSG( m_wndEditor->GetParent() == GetPanel(), wxT("CreateControls must use result of wxPropertyGrid::GetPanel() as parent of controls.") ); // Set validator, if any @@ -3554,7 +3552,7 @@ bool wxPropertyGrid::DoSelectProperty( wxPGProperty* p, unsigned int flags ) if ( m_wndEditor2 ) { - wxASSERT_MSG( m_wndEditor2->GetParent() == canvas, + wxASSERT_MSG( m_wndEditor2->GetParent() == GetPanel(), wxT("CreateControls must use result of wxPropertyGrid::GetPanel() as parent of controls.") ); // Get proper id for wndSecondary diff --git a/src/propgrid/props.cpp b/src/propgrid/props.cpp index 566572ff87..bb9d18a7a0 100644 --- a/src/propgrid/props.cpp +++ b/src/propgrid/props.cpp @@ -2054,6 +2054,7 @@ bool wxArrayEditorDialog::Create( wxWindow *parent, // On wxMAC the dialog shows incorrectly if style is not exactly wxCAPTION // FIXME: This should be only a temporary fix. #ifdef __WXMAC__ + wxUnusedVar(style); int useStyle = wxCAPTION; #else int useStyle = style; -- 2.45.2