Pcbnew: fix -Wmaybe-uninitialized in legacy PCB plugin

In the failure case, the "makeType" is uninitialised. In a non-debug
build, wxFAIL will compile out and the uninitialised behaviour will
happen silently. In a debug build, it'll assert, and then do the
uninitialised behaviour anyway.

Continue explicity to avoid this.
This commit is contained in:
John Beard 2019-04-18 14:59:11 +01:00
parent f4ba3cd910
commit 02fca8e0df
1 changed files with 7 additions and 0 deletions

View File

@ -2308,11 +2308,18 @@ void LEGACY_PLUGIN::loadTrackList( int aStructType )
flags = static_cast<STATUS_FLAGS>( flags_int );
if( aStructType == PCB_TRACE_T )
{
makeType = ( type == 1 ) ? PCB_VIA_T : PCB_TRACE_T;
}
else if (aStructType == NOT_USED )
{
continue;
}
else
{
wxFAIL_MSG( "Segment type unknown" );
continue;
}
TRACK* newTrack;