summaryrefslogtreecommitdiff
path: root/servers/visual/shader_language.cpp
diff options
context:
space:
mode:
authorqarmin <mikrutrafal54@gmail.com>2019-07-23 09:14:31 +0200
committerqarmin <mikrutrafal54@gmail.com>2019-07-23 09:14:31 +0200
commitaab8da25ad2c3e6d2df03abbc8e35c1725938c40 (patch)
treea98f3ddd124571378b146209beb308eb2768f9bc /servers/visual/shader_language.cpp
parente466dc2daa8eee7e6fb5a7fce40bf9e988a927cb (diff)
Fix some code found by Coverity Scan and PVS Studio
Diffstat (limited to 'servers/visual/shader_language.cpp')
-rw-r--r--servers/visual/shader_language.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp
index 14fefbf195..25973aa295 100644
--- a/servers/visual/shader_language.cpp
+++ b/servers/visual/shader_language.cpp
@@ -967,7 +967,7 @@ bool ShaderLanguage::_find_identifier(const BlockNode *p_block, const Map<String
bool ShaderLanguage::_validate_operator(OperatorNode *p_op, DataType *r_ret_type) {
bool valid = false;
- DataType ret_type;
+ DataType ret_type = TYPE_VOID;
switch (p_op->op) {
case OP_EQUAL:
@@ -3059,7 +3059,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
String ident = identifier;
bool ok = true;
- DataType member_type;
+ DataType member_type = TYPE_VOID;
switch (dt) {
case TYPE_BVEC2:
case TYPE_IVEC2: