diff --git a/src/plugin/plugin-bridge.cpp b/src/plugin/plugin-bridge.cpp index 740f34f5..3cb7b1a4 100644 --- a/src/plugin/plugin-bridge.cpp +++ b/src/plugin/plugin-bridge.cpp @@ -709,16 +709,16 @@ PluginArchitecture find_vst_architecture(fs::path plugin_path) { case 0x0000: // IMAGE_FILE_MACHINE_UNKNOWN return PluginArchitecture::vst_64; break; - default: { - std::ostringstream error_msg; - error_msg << "'" << plugin_path - << "' is neither a x86 nor a x86_64 PE32 file. Actual " - "architecture: 0x" - << std::hex << machine_type; - - throw std::runtime_error(error_msg.str()); - } break; } + + // When compiled without optimizations, GCC 9.3 will warn that the function + // does not return if we put this in a `default:` case instead. + std::ostringstream error_msg; + error_msg << "'" << plugin_path + << "' is neither a x86 nor a x86_64 PE32 file. Actual " + "architecture: 0x" + << std::hex << machine_type; + throw std::runtime_error(error_msg.str()); } fs::path find_vst_host(PluginArchitecture plugin_arch) {