nir: Silence unused parameter warnings
authorIan Romanick <ian.d.romanick@intel.com>
Thu, 4 Jan 2018 23:28:30 +0000 (15:28 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 10 Jan 2018 15:21:11 +0000 (07:21 -0800)
In file included from src/compiler/nir/nir_opt_algebraic.c:4:0:
src/compiler/nir/nir_search_helpers.h: In function ‘is_not_const’:
src/compiler/nir/nir_search_helpers.h:118:59: warning: unused parameter
‘num_components’ [-Wunused-parameter]
 is_not_const(nir_alu_instr *instr, unsigned src, unsigned num_components,
                                                           ^~~~~~~~~~~~~~
src/compiler/nir/nir_search_helpers.h:119:29: warning: unused parameter
‘swizzle ’ [-Wunused-parameter]
              const uint8_t *swizzle)
                             ^~~~~~~

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
src/compiler/nir/nir_search_helpers.h

index 200f2471f849f88d91fb80f430c12d248f4826e2..2e3bd137d6d96c0174c77c561b6b842a2c4f917f 100644 (file)
@@ -115,8 +115,8 @@ is_zero_to_one(nir_alu_instr *instr, unsigned src, unsigned num_components,
 }
 
 static inline bool
-is_not_const(nir_alu_instr *instr, unsigned src, unsigned num_components,
-             const uint8_t *swizzle)
+is_not_const(nir_alu_instr *instr, unsigned src, UNUSED unsigned num_components,
+             UNUSED const uint8_t *swizzle)
 {
    nir_const_value *val = nir_src_as_const_value(instr->src[src].src);