[Mesa-dev] [PATCH 12/12] intel/decoder: mark result as MAYBE_UNUSED in gen_field_iterator_next
Kai Wasserbäch
kai at dev.carbon-project.org
Sat Aug 18 11:16:16 UTC 2018
Only used, when asserts are enabled.
Fixes an unused-variable warning with GCC 8:
../../../src/intel/common/gen_decoder.c: In function 'gen_field_iterator_next':
../../../src/intel/common/gen_decoder.c:1008:12: warning: unused variable 'result' [-Wunused-variable]
bool result = iter_decode_field(iter);
^~~~~~
Signed-off-by: Kai Wasserbäch <kai at dev.carbon-project.org>
---
src/intel/common/gen_decoder.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/intel/common/gen_decoder.c b/src/intel/common/gen_decoder.c
index c14c23aad1..0600449db6 100644
--- a/src/intel/common/gen_decoder.c
+++ b/src/intel/common/gen_decoder.c
@@ -1006,7 +1006,7 @@ gen_field_iterator_next(struct gen_field_iterator *iter)
else
iter->field = iter->group->next->fields;
- bool result = iter_decode_field(iter);
+ MAYBE_UNUSED bool result = iter_decode_field(iter);
if (iter->p_end)
assert(result);
--
2.18.0
More information about the mesa-dev
mailing list