diff --git a/cvpcb/class_footprints_listbox.cpp b/cvpcb/class_footprints_listbox.cpp index 605ed6f944..a80c69c115 100644 --- a/cvpcb/class_footprints_listbox.cpp +++ b/cvpcb/class_footprints_listbox.cpp @@ -119,7 +119,7 @@ void FOOTPRINTS_LISTBOX::SetFootprintFullList( FOOTPRINT_LIST& list ) for( unsigned ii = 0; ii < list.GetCount(); ii++ ) { FOOTPRINT_INFO & footprint = list.GetItem(ii); - msg.Printf( wxT( "%3d %s" ), (int) m_FullFootprintList.GetCount() + 1, + msg.Printf( wxT( "%3zu %s" ), m_FullFootprintList.GetCount() + 1, GetChars(footprint.m_Module) ); m_FullFootprintList.Add( msg ); } @@ -154,7 +154,7 @@ void FOOTPRINTS_LISTBOX::SetFootprintFilteredList( COMPONENT_INFO* Component, candidate = Component->m_FootprintFilter[jj].Upper(); if( !module.Matches( candidate ) ) continue; - msg.Printf( wxT( "%3d %s" ), m_FilteredFootprintList.GetCount() + 1, + msg.Printf( wxT( "%3zu %s" ), m_FilteredFootprintList.GetCount() + 1, footprint.m_Module.GetData() ); m_FilteredFootprintList.Add( msg ); hasItem = true; @@ -186,7 +186,7 @@ void FOOTPRINTS_LISTBOX::SetFootprintFilteredByPinCount( COMPONENT_INFO* Compone if( Component->m_pinCount == footprint.m_padCount ) { - msg.Printf( wxT( "%3d %s" ), m_FilteredFootprintList.GetCount() + 1, + msg.Printf( wxT( "%3zu %s" ), m_FilteredFootprintList.GetCount() + 1, footprint.m_Module.GetData() ); m_FilteredFootprintList.Add( msg ); hasItem = true; diff --git a/eeschema/netlist.cpp b/eeschema/netlist.cpp index 17437b1138..9ca38ee584 100644 --- a/eeschema/netlist.cpp +++ b/eeschema/netlist.cpp @@ -146,11 +146,10 @@ void SCH_EDIT_FRAME::BuildNetListBase() if( g_NetObjectslist.size() == 0 ) return; // no objects - /* Here wx gives its best... depending on the build option size can - be unsigned int or unsigned long (probably even size_t, but it doesn't - support the %z specifier). So the cast is for platform compability */ - activity += wxString::Format( _( " net count = %lu" ), - (unsigned long)( g_NetObjectslist.size() ) ); + /* The new %zu specification is needed to properly format a size_t + * value (returned by size(), here) */ + activity += wxString::Format( _( " net count = %zu" ), + g_NetObjectslist.size() ); SetStatusText( activity ); /* Sort objects by Sheet */