glsl: Initialize ast_jump_statement::opt_return_value.
authorVinson Lee <vlee@freedesktop.org>
Sun, 14 Jul 2013 07:57:22 +0000 (00:57 -0700)
committerChad Versace <chad.versace@linux.intel.com>
Tue, 16 Jul 2013 16:03:02 +0000 (09:03 -0700)
opt_return_value was not initialized if mode != ast_return.

Fixes "Uninitialized pointer field" defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
src/glsl/glsl_parser_extras.cpp

index 055dfa9937c0ddf02ee666079e32656fb98cf85b..84c477773ee8d0a739bac4bbb3bd59a2b0fd71e3 100644 (file)
@@ -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);