[Mesa-dev] [RFC 1/7] nir/glsl_to_nir: quell some uninit_member coverity errors

Rob Clark robdclark at gmail.com
Wed May 18 15:54:09 UTC 2016


From: Rob Clark <robclark at freedesktop.org>

---
 src/compiler/nir/glsl_to_nir.cpp | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/compiler/nir/glsl_to_nir.cpp b/src/compiler/nir/glsl_to_nir.cpp
index b25f065..3b487ff 100644
--- a/src/compiler/nir/glsl_to_nir.cpp
+++ b/src/compiler/nir/glsl_to_nir.cpp
@@ -213,6 +213,13 @@ nir_visitor::nir_visitor(nir_shader *shader)
                                              _mesa_key_pointer_equal);
    this->overload_table = _mesa_hash_table_create(NULL, _mesa_hash_pointer,
                                                   _mesa_key_pointer_equal);
+   /* initialize these to quell warnings: */
+   this->result = NULL;
+   this->impl = NULL;
+   this->var = NULL;
+   this->deref_head = NULL;
+   this->deref_tail = NULL;
+   memset(&this->b, 0, sizeof(this->b));
 }
 
 nir_visitor::~nir_visitor()
-- 
2.5.5



More information about the mesa-dev mailing list