nir: Silence unused parameter warnings in nir_constant_expression.c
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 25 Aug 2015 16:44:00 +0000 (17:44 +0100)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 19 Dec 2016 23:55:44 +0000 (15:55 -0800)
commit3c7066c1ed1b9f004813995d9a097a083a8bf4d0
treefbc50f2dff5e6e1a5011b58b419347db72316979
parent4300693a078ee29e2be3c05dc0c9383b571786d0
nir: Silence unused parameter warnings in nir_constant_expression.c

nir/nir_constant_expressions.c:290:25: warning: unused parameter 'num_components' [-Wunused-parameter]
 evaluate_ball3(unsigned num_components, nir_const_value *_src)
                         ^
nir/nir_constant_expressions.c: In function 'evaluate_fddx':
nir/nir_constant_expressions.c:1282:57: warning: unused parameter '_src' [-Wunused-parameter]
 evaluate_fddx(unsigned num_components, nir_const_value *_src)
                                                         ^

v2: Unconditionally mark the parameters as MAYBE_UNUSED instead of
conditionally adding (void) casts to keep the generator simple.
Suggested by Jason.

Number of total warnings in my build reduced from 1575 to 1485
(reduction of 89).

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/compiler/nir/nir_constant_expressions.py