mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
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 <kai@dev.carbon-project.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
This commit is contained in:
parent
4228e052b3
commit
5fab32ddad
1 changed files with 2 additions and 1 deletions
|
|
@ -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++) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue