[Mesa-dev] [PATCH] glsl: Fix warning in ir_loop_jump constructor

Ian Romanick idr at freedesktop.org
Fri Jun 29 16:44:19 PDT 2012


From: Ian Romanick <ian.d.romanick at intel.com>

For some reason the spurious initializer "this->loop = loop;" was
added in 0c005bd7.  Since the constructor has no loop parameter, this
initializes the loop field to itself.  Instead, initialize it to NULL.

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=51574
Cc: Eric Anholt <eric at anholt.net>
Cc: thakis at chromium.org
---
 src/glsl/ir.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/glsl/ir.h b/src/glsl/ir.h
index 505d2e7..712dac1 100644
--- a/src/glsl/ir.h
+++ b/src/glsl/ir.h
@@ -1242,10 +1242,10 @@ public:
    };
 
    ir_loop_jump(jump_mode mode)
+      : loop(NULL)
    {
       this->ir_type = ir_type_loop_jump;
       this->mode = mode;
-      this->loop = loop;
    }
 
    virtual ir_loop_jump *clone(void *mem_ctx, struct hash_table *) const;
-- 
1.7.6.5



More information about the mesa-dev mailing list