[Mesa-dev] [PATCH] glsl: Initialize ast_jump_statement::opt_return_value.
Vinson Lee
vlee at freedesktop.org
Sun Jul 14 00:57:22 PDT 2013
opt_return_value was not initialized if mode != ast_return.
Fixes "Uninitialized pointer field" defect reported by Coverity.
Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
src/glsl/glsl_parser_extras.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp
index 055dfa9..84c4777 100644
--- a/src/glsl/glsl_parser_extras.cpp
+++ b/src/glsl/glsl_parser_extras.cpp
@@ -1225,6 +1225,7 @@ ast_jump_statement::print(void) const
ast_jump_statement::ast_jump_statement(int mode, ast_expression *return_value)
+ : opt_return_value(NULL)
{
this->mode = ast_jump_modes(mode);
--
1.8.2.1
More information about the mesa-dev
mailing list