glsl: Ensure glsl_type constructors initialize gl_type.
authorVinson Lee <vlee@freedesktop.org>
Fri, 8 Feb 2013 06:46:43 +0000 (22:46 -0800)
committerVinson Lee <vlee@freedesktop.org>
Sat, 9 Feb 2013 02:50:08 +0000 (18:50 -0800)
Fixes uninitialized scalar field defects reported by Coverity.

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

index 4a2c8790790ca65a6650c722aceb13270e8b4d35..3b066d0991e1be9671712ca8c466587d7cd985bf 100644 (file)
@@ -81,6 +81,7 @@ glsl_type::glsl_type(GLenum gl_type,
 
 glsl_type::glsl_type(const glsl_struct_field *fields, unsigned num_fields,
                     const char *name) :
+   gl_type(0),
    base_type(GLSL_TYPE_STRUCT),
    sampler_dimensionality(0), sampler_shadow(0), sampler_array(0),
    sampler_type(0), interface_packing(0),
@@ -103,6 +104,7 @@ glsl_type::glsl_type(const glsl_struct_field *fields, unsigned num_fields,
 
 glsl_type::glsl_type(const glsl_struct_field *fields, unsigned num_fields,
                     enum glsl_interface_packing packing, const char *name) :
+   gl_type(0),
    base_type(GLSL_TYPE_INTERFACE),
    sampler_dimensionality(0), sampler_shadow(0), sampler_array(0),
    sampler_type(0), interface_packing((unsigned) packing),