[Mesa-dev] [PATCH] glsl: Initialize ir_texture member variable.

Vinson Lee vlee at freedesktop.org
Mon Feb 11 22:46:05 PST 2013


Fixes uninitialized pointer field defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
 src/glsl/ir.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/glsl/ir.h b/src/glsl/ir.h
index efd80da..1e09988 100644
--- a/src/glsl/ir.h
+++ b/src/glsl/ir.h
@@ -1448,8 +1448,8 @@ enum ir_texture_opcode {
 class ir_texture : public ir_rvalue {
 public:
    ir_texture(enum ir_texture_opcode op)
-      : op(op), coordinate(NULL), projector(NULL), shadow_comparitor(NULL),
-        offset(NULL)
+      : op(op), sampler(NULL), coordinate(NULL), projector(NULL),
+        shadow_comparitor(NULL), offset(NULL)
    {
       this->ir_type = ir_type_texture;
    }
-- 
1.8.1.2



More information about the mesa-dev mailing list