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

Vinson Lee vlee at freedesktop.org
Sat Feb 9 16:38:53 PST 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 7d826e3..6fb0739 100644
--- a/src/glsl/glsl_parser_extras.cpp
+++ b/src/glsl/glsl_parser_extras.cpp
@@ -857,7 +857,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.1.2



More information about the mesa-dev mailing list