diff --git a/eeschema/class_libentry.cpp b/eeschema/class_libentry.cpp index e6a2127989..72d452ca04 100644 --- a/eeschema/class_libentry.cpp +++ b/eeschema/class_libentry.cpp @@ -1099,7 +1099,7 @@ bool LIB_PART::LoadField( LINE_READER& aLineReader, wxString& aErrorMsg ) return false; } - if( field->GetId() < MANDATORY_FIELDS ) + if( (unsigned) field->GetId() < MANDATORY_FIELDS ) { LIB_FIELD* fixedField = GetField( field->GetId() ); diff --git a/eeschema/lib_field.cpp b/eeschema/lib_field.cpp index 2864206349..219db866b1 100644 --- a/eeschema/lib_field.cpp +++ b/eeschema/lib_field.cpp @@ -264,7 +264,7 @@ bool LIB_FIELD::Load( LINE_READER& aLineReader, wxString& errorMsg ) } // fields in RAM must always have names. - if( m_id < MANDATORY_FIELDS ) + if( (unsigned) m_id < MANDATORY_FIELDS ) { // Fields in RAM must always have names, because we are trying to get // less dependent on field ids and more dependent on names. diff --git a/eeschema/sch_component.cpp b/eeschema/sch_component.cpp index 482c91f1ce..7bc3955e42 100644 --- a/eeschema/sch_component.cpp +++ b/eeschema/sch_component.cpp @@ -895,7 +895,7 @@ void SCH_COMPONENT::UpdateFields( bool aResetStyle, bool aResetRef ) if( idx == REFERENCE && !aResetRef ) continue; - if( idx < MANDATORY_FIELDS ) + if( (unsigned) idx < MANDATORY_FIELDS ) schField = GetField( idx ); else schField = FindField( field.GetName() ); diff --git a/eeschema/sch_legacy_plugin.cpp b/eeschema/sch_legacy_plugin.cpp index 59c595d34a..e581272a14 100644 --- a/eeschema/sch_legacy_plugin.cpp +++ b/eeschema/sch_legacy_plugin.cpp @@ -2747,7 +2747,7 @@ void SCH_LEGACY_PLUGIN_CACHE::loadField( std::unique_ptr< LIB_PART >& aPart, } // Fields in RAM must always have names. - if( id < MANDATORY_FIELDS ) + if( (unsigned) id < MANDATORY_FIELDS ) { // Fields in RAM must always have names, because we are trying to get // less dependent on field ids and more dependent on names.