nir: Silence unused "options" warning in algebraic passes.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 7 Apr 2016 22:03:39 +0000 (15:03 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 12 Apr 2016 01:44:08 +0000 (18:44 -0700)
Some passes may not refer to options->..., at which point the compiler
will warn about an unused variable.  Just cast to void unconditionally
to shut it up.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/compiler/nir/nir_algebraic.py

index d05564f779c8c6a3991dceea269c707c52c7ed6f..53a79073a447db02bb464b9496fe1535ef46bd57 100644 (file)
@@ -291,6 +291,7 @@ ${pass_name}(nir_shader *shader)
    bool progress = false;
    bool condition_flags[${len(condition_list)}];
    const nir_shader_compiler_options *options = shader->options;
+   (void) options;
 
    % for index, condition in enumerate(condition_list):
    condition_flags[${index}] = ${condition};