From 9df4bbf74cf0763c5c329a46a50c08eaecb3f41a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 16 Oct 2002 22:43:09 +0000 Subject: [PATCH] Mac compilation warning fixes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17542 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/fileconf.cpp | 10 +++++----- src/mac/carbon/dc.cpp | 3 ++- src/mac/carbon/filedlg.cpp | 8 +++++--- src/mac/dc.cpp | 3 ++- src/mac/filedlg.cpp | 8 +++++--- 5 files changed, 19 insertions(+), 13 deletions(-) diff --git a/src/common/fileconf.cpp b/src/common/fileconf.cpp index 199d111fee..8ced68d668 100644 --- a/src/common/fileconf.cpp +++ b/src/common/fileconf.cpp @@ -1525,9 +1525,9 @@ bool wxFileConfigGroup::DeleteSubgroup(wxFileConfigGroup *pGroup) size_t nCount = pGroup->m_aEntries.Count(); - wxLogTrace( _T("wxFileConfig"), - _T(" Removing %u Entries"), - nCount ); + wxLogTrace(_T("wxFileConfig"), + _T("Removing %lu Entries"), + (unsigned long)nCount ); for ( size_t nEntry = 0; nEntry < nCount; nEntry++ ) { @@ -1547,8 +1547,8 @@ bool wxFileConfigGroup::DeleteSubgroup(wxFileConfigGroup *pGroup) nCount = pGroup->m_aSubgroups.Count(); wxLogTrace( _T("wxFileConfig"), - _T(" Removing %u SubGroups"), - nCount ); + _T("Removing %lu SubGroups"), + (unsigned long)nCount ); for ( size_t nGroup = 0; nGroup < nCount; nGroup++ ) { diff --git a/src/mac/carbon/dc.cpp b/src/mac/carbon/dc.cpp index 14ced3443b..d9b5abecbd 100644 --- a/src/mac/carbon/dc.cpp +++ b/src/mac/carbon/dc.cpp @@ -2041,7 +2041,8 @@ void wxDC::MacInstallPen() const case wxUSER_DASH : { wxDash* dash ; - int number = m_pen.GetDashes(&dash) ; + m_pen.GetDashes(&dash) ; + // right now we don't allocate larger pixmaps // int number = m_pen.GetDashes(&dash) ; diff --git a/src/mac/carbon/filedlg.cpp b/src/mac/carbon/filedlg.cpp index 63ce8a76f9..d4e3df1fdc 100644 --- a/src/mac/carbon/filedlg.cpp +++ b/src/mac/carbon/filedlg.cpp @@ -156,7 +156,8 @@ void MakeUserDataRec(OpenUserDataRec *myData , const wxString& filter ) ++filterIndex ; - for ( int i = 0 ; i < myData->extensions.GetCount() ; i++ ) + const size_t extCount = myData->extensions.GetCount(); + for ( size_t i = 0 ; i < extCount; i++ ) { int j ; for ( j = 0 ; gfilters[j] ; j++ ) @@ -196,7 +197,7 @@ static Boolean CheckFile( ConstStr255Param name , OSType type , OpenUserDataRecP return true ; { - if ( type == data->filtermactypes[i] ) + if ( type == (OSType)data->filtermactypes[i] ) return true ; wxStringTokenizer tokenizer( data->extensions[i] , ";" ) ; @@ -428,7 +429,8 @@ int wxFileDialog::ShowModal() if ( myData.extensions.GetCount() > 0 ) { mNavOptions.popupExtension = (NavMenuItemSpecArrayHandle) NewHandle( sizeof( NavMenuItemSpec ) * myData.extensions.GetCount() ) ; - for ( int i = 0 ; i < myData.extensions.GetCount() ; ++i ) { + const size_t extCount = myData.extensions.GetCount(); + for ( size_t i = 0 ; i < extCount; ++i ) { (*mNavOptions.popupExtension)[i].version = kNavMenuItemSpecVersion ; (*mNavOptions.popupExtension)[i].menuCreator = 'WXNG' ; (*mNavOptions.popupExtension)[i].menuType = i ; diff --git a/src/mac/dc.cpp b/src/mac/dc.cpp index 14ced3443b..d9b5abecbd 100644 --- a/src/mac/dc.cpp +++ b/src/mac/dc.cpp @@ -2041,7 +2041,8 @@ void wxDC::MacInstallPen() const case wxUSER_DASH : { wxDash* dash ; - int number = m_pen.GetDashes(&dash) ; + m_pen.GetDashes(&dash) ; + // right now we don't allocate larger pixmaps // int number = m_pen.GetDashes(&dash) ; diff --git a/src/mac/filedlg.cpp b/src/mac/filedlg.cpp index 63ce8a76f9..d4e3df1fdc 100644 --- a/src/mac/filedlg.cpp +++ b/src/mac/filedlg.cpp @@ -156,7 +156,8 @@ void MakeUserDataRec(OpenUserDataRec *myData , const wxString& filter ) ++filterIndex ; - for ( int i = 0 ; i < myData->extensions.GetCount() ; i++ ) + const size_t extCount = myData->extensions.GetCount(); + for ( size_t i = 0 ; i < extCount; i++ ) { int j ; for ( j = 0 ; gfilters[j] ; j++ ) @@ -196,7 +197,7 @@ static Boolean CheckFile( ConstStr255Param name , OSType type , OpenUserDataRecP return true ; { - if ( type == data->filtermactypes[i] ) + if ( type == (OSType)data->filtermactypes[i] ) return true ; wxStringTokenizer tokenizer( data->extensions[i] , ";" ) ; @@ -428,7 +429,8 @@ int wxFileDialog::ShowModal() if ( myData.extensions.GetCount() > 0 ) { mNavOptions.popupExtension = (NavMenuItemSpecArrayHandle) NewHandle( sizeof( NavMenuItemSpec ) * myData.extensions.GetCount() ) ; - for ( int i = 0 ; i < myData.extensions.GetCount() ; ++i ) { + const size_t extCount = myData.extensions.GetCount(); + for ( size_t i = 0 ; i < extCount; ++i ) { (*mNavOptions.popupExtension)[i].version = kNavMenuItemSpecVersion ; (*mNavOptions.popupExtension)[i].menuCreator = 'WXNG' ; (*mNavOptions.popupExtension)[i].menuType = i ;