summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVinson Lee <vlee@freedesktop.org>2013-02-07 22:46:43 -0800
committerVinson Lee <vlee@freedesktop.org>2013-02-08 18:50:08 -0800
commit85a9a7f09c117cf09d7ab7034ad107365f17d4f2 (patch)
tree65ca30de96c75d1569b16481c4b69525eb2b1b0b
parent9a4768456434f8719e6168254224c9554877230d (diff)
glsl: Ensure glsl_type constructors initialize gl_type.
Fixes uninitialized scalar field defects reported by Coverity. Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
-rw-r--r--src/glsl/glsl_types.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/glsl/glsl_types.cpp b/src/glsl/glsl_types.cpp
index 4a2c8790790..3b066d0991e 100644
--- a/src/glsl/glsl_types.cpp
+++ b/src/glsl/glsl_types.cpp
@@ -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),