On 08/19/2013 01:35 AM, Vinson Lee wrote:
Fixes "Uninitialized pointer field" defect reported by Coverity.
Signed-off-by: Vinson Lee <v...@freedesktop.org>
---
src/gallium/drivers/r600/sb/sb_ir.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/r600/sb/sb_ir.h
b/src/gallium/drivers/r600/sb/sb_ir.h
index c838f62..b696e77 100644
--- a/src/gallium/drivers/r600/sb/sb_ir.h
+++ b/src/gallium/drivers/r600/sb/sb_ir.h
@@ -962,8 +962,8 @@ public:
class cf_node : public container_node {
protected:
- cf_node() : container_node(NT_OP, NST_CF_INST), jump_target(),
- jump_after_target() {};
+ cf_node() : container_node(NT_OP, NST_CF_INST), bc(),
+ jump_target(), jump_after_target() {};
Hi, Vinson,
IIRC I switched the initialization of bc struct from constructor
initializer list to explicit memset due to reported issues with older
gcc versions, it failed to initialize the struct properly. See commit
41005d.
Constructors of cf_node (as well as fetch_node, alu_node) are protected
and called only by helper functions (create_cf, create_fetch,
create_alu) in friend class r600_sb::shader that create nodes in pool,
memset for bc is called right after constructor in these functions, so
actually bc is always initialized. I don't remember why I didn't use
memset in constructor body though, maybe moving memset there would
silence Coverity?
Vadim
public:
bc_cf bc;
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev