Commit 70dc51d1 authored by Lorenzo Marcantonio's avatar Lorenzo Marcantonio

Changed format specifiers of some printf involved with size_t values to %zu to...

Changed format specifiers of some printf involved with size_t values to %zu to avoid runtime assertions.
parent 2cad7a52
...@@ -119,7 +119,7 @@ void FOOTPRINTS_LISTBOX::SetFootprintFullList( FOOTPRINT_LIST& list ) ...@@ -119,7 +119,7 @@ void FOOTPRINTS_LISTBOX::SetFootprintFullList( FOOTPRINT_LIST& list )
for( unsigned ii = 0; ii < list.GetCount(); ii++ ) for( unsigned ii = 0; ii < list.GetCount(); ii++ )
{ {
FOOTPRINT_INFO & footprint = list.GetItem(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) ); GetChars(footprint.m_Module) );
m_FullFootprintList.Add( msg ); m_FullFootprintList.Add( msg );
} }
...@@ -154,7 +154,7 @@ void FOOTPRINTS_LISTBOX::SetFootprintFilteredList( COMPONENT_INFO* Component, ...@@ -154,7 +154,7 @@ void FOOTPRINTS_LISTBOX::SetFootprintFilteredList( COMPONENT_INFO* Component,
candidate = Component->m_FootprintFilter[jj].Upper(); candidate = Component->m_FootprintFilter[jj].Upper();
if( !module.Matches( candidate ) ) if( !module.Matches( candidate ) )
continue; continue;
msg.Printf( wxT( "%3d %s" ), m_FilteredFootprintList.GetCount() + 1, msg.Printf( wxT( "%3zu %s" ), m_FilteredFootprintList.GetCount() + 1,
footprint.m_Module.GetData() ); footprint.m_Module.GetData() );
m_FilteredFootprintList.Add( msg ); m_FilteredFootprintList.Add( msg );
hasItem = true; hasItem = true;
...@@ -186,7 +186,7 @@ void FOOTPRINTS_LISTBOX::SetFootprintFilteredByPinCount( COMPONENT_INFO* Compone ...@@ -186,7 +186,7 @@ void FOOTPRINTS_LISTBOX::SetFootprintFilteredByPinCount( COMPONENT_INFO* Compone
if( Component->m_pinCount == footprint.m_padCount ) 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() ); footprint.m_Module.GetData() );
m_FilteredFootprintList.Add( msg ); m_FilteredFootprintList.Add( msg );
hasItem = true; hasItem = true;
......
...@@ -146,11 +146,10 @@ void SCH_EDIT_FRAME::BuildNetListBase() ...@@ -146,11 +146,10 @@ void SCH_EDIT_FRAME::BuildNetListBase()
if( g_NetObjectslist.size() == 0 ) if( g_NetObjectslist.size() == 0 )
return; // no objects return; // no objects
/* Here wx gives its best... depending on the build option size can /* The new %zu specification is needed to properly format a size_t
be unsigned int or unsigned long (probably even size_t, but it doesn't * value (returned by size(), here) */
support the %z specifier). So the cast is for platform compability */ activity += wxString::Format( _( " net count = %zu" ),
activity += wxString::Format( _( " net count = %lu" ), g_NetObjectslist.size() );
(unsigned long)( g_NetObjectslist.size() ) );
SetStatusText( activity ); SetStatusText( activity );
/* Sort objects by Sheet */ /* Sort objects by Sheet */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment