Fix return value for new plugin

Even when we throw, we still need to provide a default return value that
will never be reached for MSVC

Fixes #3982 | https://gitlab.com/kicad/code/kicad/issues/3982
This commit is contained in:
Seth Hillbrand 2020-03-03 14:01:51 -08:00
parent d4cbc348de
commit 2cff50d7a8
1 changed files with 12 additions and 5 deletions

View File

@ -3178,13 +3178,20 @@ void SCH_LEGACY_PLUGIN_CACHE::loadDrawEntries( std::unique_ptr<LIB_PART>& aPart,
FILL_T SCH_LEGACY_PLUGIN_CACHE::parseFillMode( LINE_READER& aReader, const char* aLine, FILL_T SCH_LEGACY_PLUGIN_CACHE::parseFillMode( LINE_READER& aReader, const char* aLine,
const char** aOutput ) const char** aOutput )
{ {
switch( parseChar( aReader, aLine, aOutput ) ) switch ( parseChar( aReader, aLine, aOutput ) )
{ {
case 'F': return FILLED_SHAPE; case 'F':
case 'f': return FILLED_WITH_BG_BODYCOLOR; return FILLED_SHAPE;
case 'N': return NO_FILL; case 'f':
default: SCH_PARSE_ERROR( "invalid fill type, expected f, F, or N", aReader, aLine ); return FILLED_WITH_BG_BODYCOLOR;
case 'N':
return NO_FILL;
default:
SCH_PARSE_ERROR( "invalid fill type, expected f, F, or N", aReader, aLine );
} }
// This will never be reached but quiets the compiler warnings
return NO_FILL;
} }