[Mesa-dev] [PATCH] glsl: Initialize ast_function member variables.

Vinson Lee vlee at freedesktop.org
Wed Jul 3 22:39:12 PDT 2013


Fixes uninitialized pointer field defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
 src/glsl/glsl_parser_extras.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp
index f4087df..9690a6d 100644
--- a/src/glsl/glsl_parser_extras.cpp
+++ b/src/glsl/glsl_parser_extras.cpp
@@ -914,7 +914,8 @@ ast_function::print(void) const
 
 
 ast_function::ast_function(void)
-   : is_definition(false), signature(NULL)
+   : return_type(NULL), identifier(NULL), is_definition(false),
+     signature(NULL)
 {
    /* empty */
 }
-- 
1.8.2.1



More information about the mesa-dev mailing list