From: Brian Paul Date: Wed, 5 Apr 2017 20:07:45 +0000 (-0600) Subject: st/mesa: silence unused/uninitialized var warnings X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ee3f75f538beb8df448001a8038ba2ba732b5d8e;p=mesa.git st/mesa: silence unused/uninitialized var warnings Signed-off-by: Brian Paul --- 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]: */