Mesa (master): nir: Silence unused parameter warnings in generated nir_constant_expressions code
Ian Romanick
idr at kemper.freedesktop.org
Sat Mar 3 00:11:12 UTC 2018
Module: Mesa
Branch: master
Commit: 3a944316c44621ad824c812907d9d1e0d3ddda46
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3a944316c44621ad824c812907d9d1e0d3ddda46
Author: Ian Romanick <ian.d.romanick at intel.com>
Date: Fri Feb 16 17:48:57 2018 -0800
nir: Silence unused parameter warnings in generated nir_constant_expressions code
Reduces my build from 2075 warnings to 2023 warnings by silencing 52
instances of things like
src/compiler/nir/nir_constant_expressions.c: In function ‘evaluate_bfi’:
src/compiler/nir/nir_constant_expressions.c:1812:61: warning: unused parameter ‘bit_size’ [-Wunused-parameter]
evaluate_bfi(MAYBE_UNUSED unsigned num_components, unsigned bit_size,
^~~~~~~~
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias at igalia.com>
---
src/compiler/nir/nir_constant_expressions.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/compiler/nir/nir_constant_expressions.py b/src/compiler/nir/nir_constant_expressions.py
index 6571d3b98b..ee92be51db 100644
--- a/src/compiler/nir/nir_constant_expressions.py
+++ b/src/compiler/nir/nir_constant_expressions.py
@@ -389,7 +389,8 @@ struct bool32_vec {
% for name, op in sorted(opcodes.iteritems()):
static nir_const_value
-evaluate_${name}(MAYBE_UNUSED unsigned num_components, unsigned bit_size,
+evaluate_${name}(MAYBE_UNUSED unsigned num_components,
+ ${"UNUSED" if op_bit_sizes(op) is None else ""} unsigned bit_size,
MAYBE_UNUSED nir_const_value *_src)
{
nir_const_value _dst_val = { {0, } };
More information about the mesa-commit
mailing list