From: Vinson Lee Date: Sun, 14 Jul 2013 07:57:22 +0000 (-0700) Subject: glsl: Initialize ast_jump_statement::opt_return_value. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fa7829c36b78b8ecc42238cbc0a02d1059320c77;p=mesa.git glsl: Initialize ast_jump_statement::opt_return_value. opt_return_value was not initialized if mode != ast_return. Fixes "Uninitialized pointer field" defect reported by Coverity. Signed-off-by: Vinson Lee Reviewed-by: Chad Versace --- diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp index 055dfa9937c..84c477773ee 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);