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:
parent
f4ba3cd910
commit
02fca8e0df
|
@ -2308,11 +2308,18 @@ void LEGACY_PLUGIN::loadTrackList( int aStructType )
|
||||||
flags = static_cast<STATUS_FLAGS>( flags_int );
|
flags = static_cast<STATUS_FLAGS>( flags_int );
|
||||||
|
|
||||||
if( aStructType == PCB_TRACE_T )
|
if( aStructType == PCB_TRACE_T )
|
||||||
|
{
|
||||||
makeType = ( type == 1 ) ? PCB_VIA_T : PCB_TRACE_T;
|
makeType = ( type == 1 ) ? PCB_VIA_T : PCB_TRACE_T;
|
||||||
|
}
|
||||||
else if (aStructType == NOT_USED )
|
else if (aStructType == NOT_USED )
|
||||||
|
{
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
wxFAIL_MSG( "Segment type unknown" );
|
wxFAIL_MSG( "Segment type unknown" );
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
TRACK* newTrack;
|
TRACK* newTrack;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue