[Mesa-dev] [PATCH] st/mesa: Fix uninitialized members in glsl_to_tgsi_visitor constructor.

Vinson Lee vlee at freedesktop.org
Wed Apr 18 23:05:21 PDT 2012


Fix uninitialized scalar field defects reported by Coverity.

NOTE: This is a candidate for the 8.0 branch.

Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
 src/mesa/state_tracker/st_glsl_to_tgsi.cpp |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 9e68deb..36d2f81 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -2812,8 +2812,12 @@ glsl_to_tgsi_visitor::glsl_to_tgsi_visitor()
    num_immediates = 0;
    current_function = NULL;
    num_address_regs = 0;
+   samplers_used = 0;
    indirect_addr_temps = false;
    indirect_addr_consts = false;
+   num_clip_distances = 0;
+   glsl_version = 0;
+   native_integers = false;
    mem_ctx = ralloc_context(NULL);
    ctx = NULL;
    prog = NULL;
-- 
1.7.9.4



More information about the mesa-dev mailing list