You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Fix warnings about unhandled enum value in switch [-Wswitch]
Fixes GCC 5 warnings of the form: core/io/http_client.cpp:288:9: warning: enumeration value 'STATUS_SSL_HANDSHAKE_ERROR' not handled in switch [-Wswitch] core/io/marshalls.cpp:806:9: warning: enumeration value 'AABB' not handled in switch [-Wswitch] Those can be trivial cases where adding a default fallback is the solution, or more complex issues/hidden bugs where missed values are actually meant to be handled.
This commit is contained in:
@@ -1981,6 +1981,7 @@ String GDScriptWarning::get_message() const {
|
||||
CHECK_SYMBOLS(2);
|
||||
return "The '" + symbols[0] + "' keyword is deprecated and will be removed in a future release, please replace its uses by '" + symbols[1] + "'.";
|
||||
} break;
|
||||
case WARNING_MAX: break; // Can't happen, but silences warning
|
||||
}
|
||||
ERR_EXPLAIN("Invalid GDScript warning code: " + get_name_from_code(code));
|
||||
ERR_FAIL_V(String());
|
||||
|
||||
Reference in New Issue
Block a user