summaryrefslogtreecommitdiffstats
path: root/core/os/os.cpp
diff options
context:
space:
mode:
authorHein-Pieter van Braam <hp@tmm.cx>2017-09-01 22:33:39 +0200
committerHein-Pieter van Braam <hp@tmm.cx>2017-09-02 01:59:26 +0200
commit9c63ab99f0a505b0f60079bb30cc453b4415fddc (patch)
tree7014cb6e8c2e71a0583656f76d3d37d719a74fb0 /core/os/os.cpp
parentdac150108ab3c1f41d5fd86cc6853f883064caaf (diff)
downloadredot-engine-9c63ab99f0a505b0f60079bb30cc453b4415fddc.tar.gz
Fix use of unitialized variables
The second in my quest to make Godot 3.x compile with -Werror on GCC7
Diffstat (limited to 'core/os/os.cpp')
-rw-r--r--core/os/os.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/os/os.cpp b/core/os/os.cpp
index 1292b7eeed..764f7fe6e6 100644
--- a/core/os/os.cpp
+++ b/core/os/os.cpp
@@ -64,12 +64,13 @@ void OS::debug_break(){
void OS::print_error(const char *p_function, const char *p_file, int p_line, const char *p_code, const char *p_rationale, ErrorType p_type) {
- const char *err_type;
+ const char *err_type = "**ERROR**";
switch (p_type) {
case ERR_ERROR: err_type = "**ERROR**"; break;
case ERR_WARNING: err_type = "**WARNING**"; break;
case ERR_SCRIPT: err_type = "**SCRIPT ERROR**"; break;
case ERR_SHADER: err_type = "**SHADER ERROR**"; break;
+ default: ERR_PRINT("Unknown error type"); break;
}
if (p_rationale && *p_rationale)