diff options
author | Ian Romanick <[email protected]> | 2015-08-25 17:21:47 +0100 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2016-12-19 15:55:44 -0800 |
commit | 4300693a078ee29e2be3c05dc0c9383b571786d0 (patch) | |
tree | 5c097e247fd01c88d09e813283ae5eb501b218e0 /src/compiler | |
parent | 8bfe397974b26ab16ca835dd83340b454e6f2f1f (diff) |
nir: Silence missing field initializer warnings for vectors in nir_constant_expressions
nir/nir_constant_expressions.c: In function 'evaluate_ball2':
nir/nir_constant_expressions.c:279:7: warning: missing initializer for field 'z' of 'struct bool_vec' [-Wmissing-field-initializers]
};
^
nir/nir_constant_expressions.c:234:10: note: 'z' declared here
bool z;
^
Number of total warnings in my build reduced from 2532 to 2304
(reduction of 228).
v2: Initialize bool vectors with 0 instead of false to keep the
generator simpler. Suggested by Ken.
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/nir/nir_constant_expressions.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_constant_expressions.py b/src/compiler/nir/nir_constant_expressions.py index 96d52557bd7..6b4d071236c 100644 --- a/src/compiler/nir/nir_constant_expressions.py +++ b/src/compiler/nir/nir_constant_expressions.py @@ -299,6 +299,9 @@ evaluate_${name}(unsigned num_components, unsigned bit_size, _src[${j}].${get_const_field(input_types[j])}[${k}], % endif % endfor + % for k in range(op.input_sizes[j], 4): + 0, + % endfor }; % endfor |