From 4f8cc032b71630e3a92b3e5de875e2126cc93fab Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kai=20Wasserb=C3=A4ch?= Date: Sat, 28 Sep 2019 18:55:32 +0200 Subject: [PATCH] nir: fix unused variable warning in find_and_update_previous_uniform_storage MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This commit fixes the following warning: ../src/compiler/glsl/gl_nir_link_uniforms.c: In function ‘find_and_update_previous_uniform_storage’: ../src/compiler/glsl/gl_nir_link_uniforms.c:166:16: warning: unused variable ‘num_blks’ [-Wunused-variable] 166 | unsigned num_blks = nir_variable_is_in_ubo(var) ? | ^~~~~~~~ Signed-off-by: Kai Wasserbäch Reviewed-by: Jason Ekstrand --- src/compiler/glsl/gl_nir_link_uniforms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/glsl/gl_nir_link_uniforms.c b/src/compiler/glsl/gl_nir_link_uniforms.c index 7aebe0dd7e2..ffddeb20b44 100644 --- a/src/compiler/glsl/gl_nir_link_uniforms.c +++ b/src/compiler/glsl/gl_nir_link_uniforms.c @@ -163,7 +163,7 @@ find_and_update_previous_uniform_storage(struct gl_shader_program *prog, if (nir_variable_is_in_block(var)) { struct gl_uniform_storage *uniform = NULL; - unsigned num_blks = nir_variable_is_in_ubo(var) ? + ASSERTED unsigned num_blks = nir_variable_is_in_ubo(var) ? prog->data->NumUniformBlocks : prog->data->NumShaderStorageBlocks; -- 2.30.2