diff options
author | Kai Wasserbäch <[email protected]> | 2018-08-18 13:16:15 +0200 |
---|---|---|
committer | Lionel Landwerlin <[email protected]> | 2018-08-20 11:08:52 +0100 |
commit | 5fab32ddad8b32c4a05517c43623653f8634c4d9 (patch) | |
tree | db054e41320d1222a014e5acde2da33d0c4e4c8a | |
parent | 4228e052b32ed6d27df03abc817961b06f0b377f (diff) |
intel/decoder: mark total_length as MAYBE_UNUSED in gen_spec_load
Only used, when asserts are enabled.
Fixes an unused-variable warning with GCC 8:
../../../src/intel/common/gen_decoder.c: In function 'gen_spec_load':
../../../src/intel/common/gen_decoder.c:535:47: warning: variable 'total_length' set but not used [-Wunused-but-set-variable]
uint32_t text_offset = 0, text_length = 0, total_length;
^~~~~~~~~~~~
Signed-off-by: Kai Wasserbäch <[email protected]>
Reviewed-by: Lionel Landwerlin <[email protected]>
-rw-r--r-- | src/intel/common/gen_decoder.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/intel/common/gen_decoder.c b/src/intel/common/gen_decoder.c index ec0a486b101..c14c23aad1a 100644 --- a/src/intel/common/gen_decoder.c +++ b/src/intel/common/gen_decoder.c @@ -532,7 +532,8 @@ gen_spec_load(const struct gen_device_info *devinfo) struct parser_context ctx; void *buf; uint8_t *text_data = NULL; - uint32_t text_offset = 0, text_length = 0, total_length; + uint32_t text_offset = 0, text_length = 0; + MAYBE_UNUSED uint32_t total_length; uint32_t gen_10 = devinfo_to_gen(devinfo); for (int i = 0; i < ARRAY_SIZE(genxml_files_table); i++) { |