Mesa (master): glsl: Initialize ast_function member variables.

Vinson Lee vlee at kemper.freedesktop.org
Sun Jul 21 07:23:57 UTC 2013


Module: Mesa
Branch: master
Commit: cd90ebefd4f63d00eb65af6069fb078e454c43f1
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=cd90ebefd4f63d00eb65af6069fb078e454c43f1

Author: Vinson Lee <vlee at freedesktop.org>
Date:   Sun Feb 10 01:38:53 2013 +0100

glsl: Initialize ast_function member variables.

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 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp
index 84c4777..ec4e319 100644
--- a/src/glsl/glsl_parser_extras.cpp
+++ b/src/glsl/glsl_parser_extras.cpp
@@ -1115,7 +1115,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 */
 }




More information about the mesa-commit mailing list