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

Vinson Lee vlee at freedesktop.org
Mon Sep 23 22:06:47 PDT 2013


Fixes "Uninitialized pointer field" defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
 src/glsl/lower_variable_index_to_cond_assign.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/glsl/lower_variable_index_to_cond_assign.cpp b/src/glsl/lower_variable_index_to_cond_assign.cpp
index 21674b5..8086c03 100644
--- a/src/glsl/lower_variable_index_to_cond_assign.cpp
+++ b/src/glsl/lower_variable_index_to_cond_assign.cpp
@@ -192,6 +192,12 @@ struct assignment_generator
    ir_variable* var;
 
    assignment_generator()
+     : base_ir(NULL),
+       rvalue(NULL),
+       old_index(NULL),
+       is_write(false),
+       write_mask(0),
+       var(NULL)
    {
    }
 
-- 
1.8.3.1



More information about the mesa-dev mailing list