aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_glsl_to_nir.cpp
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2017-04-05 14:07:45 -0600
committerBrian Paul <[email protected]>2017-04-07 13:46:44 -0600
commitee3f75f538beb8df448001a8038ba2ba732b5d8e (patch)
treebf4f7a61da084eb5fc4520486546df141083c3e1 /src/mesa/state_tracker/st_glsl_to_nir.cpp
parentc77c381fae21d26966d9072ce61fa3879eee8751 (diff)
st/mesa: silence unused/uninitialized var warnings
Signed-off-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_glsl_to_nir.cpp')
-rw-r--r--src/mesa/state_tracker/st_glsl_to_nir.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp
index 674ccd07a4c..72fd70b2155 100644
--- a/src/mesa/state_tracker/st_glsl_to_nir.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp
@@ -181,10 +181,11 @@ st_nir_assign_uniform_locations(struct gl_program *prog,
continue;
if (uniform->type->is_sampler()) {
- unsigned val;
+ unsigned val = 0;
bool found = shader_program->UniformHash->get(val, uniform->name);
loc = shaderidx++;
assert(found);
+ (void) found; /* silence unused var warning */
/* this ensure that nir_lower_samplers looks at the correct
* shader_program->UniformStorage[location]:
*/