glsl: Initialize ast_parameter_declarator member variables.
authorVinson Lee <vlee@freedesktop.org>
Sat, 2 Feb 2013 07:27:34 +0000 (23:27 -0800)
committerVinson Lee <vlee@freedesktop.org>
Wed, 6 Feb 2013 06:11:32 +0000 (22:11 -0800)
Fixes uninitialized pointer field defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/glsl/ast.h

index 1a28963c4376f20620760b74b66be25107d3b8c6..fcc6b4566cef15cc6cbddae12a64e4986889ee61 100644 (file)
@@ -547,11 +547,15 @@ public:
 
 class ast_parameter_declarator : public ast_node {
 public:
-   ast_parameter_declarator()
+   ast_parameter_declarator() :
+      type(NULL),
+      identifier(NULL),
+      is_array(false),
+      array_size(NULL),
+      formal_parameter(false),
+      is_void(false)
    {
-      this->identifier = NULL;
-      this->is_array = false;
-      this->array_size = 0;
+      /* empty */
    }
 
    virtual void print(void) const;