summaryrefslogtreecommitdiffstats
path: root/src/intel/tools/aub_read.c
diff options
context:
space:
mode:
authorAndrii Simiklit <[email protected]>2018-11-13 14:19:28 +0200
committerEric Engestrom <[email protected]>2018-11-14 13:35:28 +0000
commit69ee49ac4678a60e2ae762b9f7752e61d27347c6 (patch)
treefb5c55748b2693d79701f5a4a0433133165fb395 /src/intel/tools/aub_read.c
parent25b48e3df93dee3aed4b7fbf5b542aa500555ee2 (diff)
intel/tools: avoid 'unused variable' warnings
1. tools/aub_read.c:271:31: warning: unused variable ‘end’ const uint32_t *p = data, *end = data + data_len, *next; 2. tools/aub_mem.c:292:13: warning: unused variable ‘res’ void *res = mmap((uint8_t *)bo.map + map_offset, 4096, PROT_READ, tools/aub_mem.c:357:13: warning: unused variable ‘res’ void *res = mmap((uint8_t *)bo.map + (page - bo.addr), 4096, PROT_READ, v2: The i965_disasm.c changes was moved into a separate patch The 'end' variable declared separately with MAYBE_UNUSED to avoid effect of it to other variables. ( Eric Engestrom <[email protected]> ) Signed-off-by: Andrii Simiklit <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src/intel/tools/aub_read.c')
-rw-r--r--src/intel/tools/aub_read.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/intel/tools/aub_read.c b/src/intel/tools/aub_read.c
index 20cb515376f..513da3bf847 100644
--- a/src/intel/tools/aub_read.c
+++ b/src/intel/tools/aub_read.c
@@ -288,7 +288,8 @@ handle_memtrace_mem_write(struct aub_read *read, const uint32_t *p)
int
aub_read_command(struct aub_read *read, const void *data, uint32_t data_len)
{
- const uint32_t *p = data, *end = data + data_len, *next;
+ const uint32_t *p = data, *next;
+ MAYBE_UNUSED const uint32_t *end = data + data_len;
uint32_t h, header_length, bias;
assert(data_len >= 4);