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

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
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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;
+4 −5
Original line number Diff line number Diff line
@@ -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 */