summaryrefslogtreecommitdiff
path: root/servers/rendering
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-09-28 17:05:34 +0200
committerRémi Verschelde <rverschelde@gmail.com>2022-09-28 17:05:34 +0200
commit85fe6ecc32ace7fcf119d9b492e37cd627ae7e4d (patch)
treef6f386733d5ecc86364fffeef7402dc2af0227dd /servers/rendering
parent14e1f36e614686f3fea0c74fac3624d1027dd5cc (diff)
Fix MSVC warnings C4701 and C4703: Potentially uninitialized variable used
Diffstat (limited to 'servers/rendering')
-rw-r--r--servers/rendering/shader_language.cpp4
-rw-r--r--servers/rendering/shader_language.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/servers/rendering/shader_language.cpp b/servers/rendering/shader_language.cpp
index 6754d84cd4..cc944a403e 100644
--- a/servers/rendering/shader_language.cpp
+++ b/servers/rendering/shader_language.cpp
@@ -5344,8 +5344,8 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
last_type = IDENTIFIER_MAX;
_set_tkpos(pos);
- DataType data_type;
- IdentifierType ident_type;
+ DataType data_type = TYPE_MAX;
+ IdentifierType ident_type = IDENTIFIER_MAX;
int array_size = 0;
StringName struct_name;
bool is_local = false;
diff --git a/servers/rendering/shader_language.h b/servers/rendering/shader_language.h
index e9f8c3b289..1e302f5805 100644
--- a/servers/rendering/shader_language.h
+++ b/servers/rendering/shader_language.h
@@ -483,7 +483,7 @@ public:
int array_size = 0;
union Value {
- bool boolean;
+ bool boolean = false;
float real;
int32_t sint;
uint32_t uint;