Work around incorrect GCC warning in debug builds

This commit is contained in:
Robbert van der Helm
2020-05-07 16:51:50 +02:00
parent 3202239a93
commit ff9f151639
+9 -9
View File
@@ -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) {