Commit 34b645da authored by Michael Narigon's avatar Michael Narigon Committed by Dick Hollenbeck

warnings

parent 3aa390b5
...@@ -60,11 +60,13 @@ int FOOTPRINTS_LISTBOX::GetCount() ...@@ -60,11 +60,13 @@ int FOOTPRINTS_LISTBOX::GetCount()
void FOOTPRINTS_LISTBOX::SetString( unsigned linecount, const wxString& text ) void FOOTPRINTS_LISTBOX::SetString( unsigned linecount, const wxString& text )
{ {
if( linecount >= m_footprintList.Count() ) unsigned count = m_footprintList.Count();
linecount = m_footprintList.Count() - 1; if( count > 0 )
{
if( linecount >= 0 ) if( linecount >= count )
linecount = count - 1;
m_footprintList[linecount] = text; m_footprintList[linecount] = text;
}
} }
......
...@@ -60,11 +60,13 @@ int LIBRARY_LISTBOX::GetCount() ...@@ -60,11 +60,13 @@ int LIBRARY_LISTBOX::GetCount()
void LIBRARY_LISTBOX::SetString( unsigned linecount, const wxString& text ) void LIBRARY_LISTBOX::SetString( unsigned linecount, const wxString& text )
{ {
if( linecount >= m_libraryList.Count() ) unsigned count = m_libraryList.Count();
linecount = m_libraryList.Count() - 1; if( count > 0 )
{
if( linecount >= 0 ) if( linecount >= count )
linecount = count - 1;
m_libraryList[linecount] = text; m_libraryList[linecount] = text;
}
} }
......
#ifndef DATAFILE_READ_WRITE_H_ #ifndef DATAFILE_READ_WRITE_H_
#define PDATAFILE_READ_WRITE_H_ #define DATAFILE_READ_WRITE_H_
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
......
...@@ -713,8 +713,8 @@ void FOOTPRINT_VIEWER_FRAME::OnIterateFootprintList( wxCommandEvent& event ) ...@@ -713,8 +713,8 @@ void FOOTPRINT_VIEWER_FRAME::OnIterateFootprintList( wxCommandEvent& event )
break; break;
default: default:
wxFAIL_MSG( wxT( "FOOTPRINT_VIEWER_FRAME::OnIterateFootprintList error: id = " ) + wxString id = wxString::Format(wxT("%i"),event.GetId());
event.GetId() ); wxFAIL_MSG( wxT( "FOOTPRINT_VIEWER_FRAME::OnIterateFootprintList error: id = " ) + id );
} }
} }
......
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