nir: fix unused variable warning in nir_lower_vars_to_explicit_types
authorKai Wasserbäch <kai@dev.carbon-project.org>
Sat, 28 Sep 2019 16:50:03 +0000 (18:50 +0200)
committerTimothy Arceri <tarceri@itsqueeze.com>
Thu, 7 Nov 2019 00:32:55 +0000 (11:32 +1100)
This commit fixes the following warning:
../src/compiler/nir/nir_lower_io.c: In function ‘nir_lower_vars_to_explicit_types’:
../src/compiler/nir/nir_lower_io.c:1435:22: warning: unused variable ‘supported’ [-Wunused-variable]
 1435 |    nir_variable_mode supported = nir_var_mem_shared | nir_var_shader_temp | nir_var_function_temp;
      |                      ^~~~~~~~~

Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/nir/nir_lower_io.c

index 745ef92ddf3316fb23e154154b2cac14a404fb62..1483ef208c3a6143318975e3b437aacd9d194f9e 100644 (file)
@@ -1432,7 +1432,8 @@ nir_lower_vars_to_explicit_types(nir_shader *shader,
     * - compact shader inputs/outputs
     * - interface types
     */
-   nir_variable_mode supported = nir_var_mem_shared | nir_var_shader_temp | nir_var_function_temp;
+   ASSERTED nir_variable_mode supported = nir_var_mem_shared |
+      nir_var_shader_temp | nir_var_function_temp;
    assert(!(modes & ~supported) && "unsupported");
 
    bool progress = false;