diff options
author | Ian Romanick <[email protected]> | 2015-08-25 17:44:00 +0100 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2016-12-19 15:55:44 -0800 |
commit | 3c7066c1ed1b9f004813995d9a097a083a8bf4d0 (patch) | |
tree | fbc50f2dff5e6e1a5011b58b419347db72316979 /src/compiler/nir/nir_constant_expressions.py | |
parent | 4300693a078ee29e2be3c05dc0c9383b571786d0 (diff) |
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 <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_constant_expressions.py')
-rw-r--r-- | src/compiler/nir/nir_constant_expressions.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/nir/nir_constant_expressions.py b/src/compiler/nir/nir_constant_expressions.py index 6b4d071236c..2cc106db794 100644 --- a/src/compiler/nir/nir_constant_expressions.py +++ b/src/compiler/nir/nir_constant_expressions.py @@ -267,8 +267,8 @@ struct bool32_vec { % for name, op in sorted(opcodes.iteritems()): static nir_const_value -evaluate_${name}(unsigned num_components, unsigned bit_size, - nir_const_value *_src) +evaluate_${name}(MAYBE_UNUSED unsigned num_components, unsigned bit_size, + MAYBE_UNUSED nir_const_value *_src) { nir_const_value _dst_val = { {0, } }; |