[Mesa-dev] [PATCH] r600g/sb: Initialize ra_constraint::cost.

Vinson Lee vlee at freedesktop.org
Fri Jul 12 19:21:41 PDT 2013


Fixes "Uninitialized scalar field" reported by Coverity.

Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
 src/gallium/drivers/r600/sb/sb_shader.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/r600/sb/sb_shader.h b/src/gallium/drivers/r600/sb/sb_shader.h
index ca9d29e..040dbf4 100644
--- a/src/gallium/drivers/r600/sb/sb_shader.h
+++ b/src/gallium/drivers/r600/sb/sb_shader.h
@@ -113,7 +113,7 @@ typedef std::vector<ra_chunk*> chunk_vector;
 
 class ra_constraint {
 public:
-	ra_constraint(constraint_kind kind) : kind(kind) {}
+	ra_constraint(constraint_kind kind) : kind(kind), cost(0) {}
 
 	constraint_kind kind;
 	vvec values;
-- 
1.8.3.1



More information about the mesa-dev mailing list