Only used, when asserts are enabled. Fixes an unused-variable warning with GCC 8: ../../../src/intel/tools/aubinator.c: In function 'get_ppgtt_batch_bo': ../../../src/intel/tools/aubinator.c:383:13: warning: unused variable 'res' [-Wunused-variable] void *res = mmap((uint8_t *)bo.map + (page - bo.addr), 4096, PROT_READ, ^~~
Signed-off-by: Kai Wasserbäch <k...@dev.carbon-project.org> --- src/intel/tools/aubinator.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/intel/tools/aubinator.c b/src/intel/tools/aubinator.c index 96ac39248d..abdebba53a 100644 --- a/src/intel/tools/aubinator.c +++ b/src/intel/tools/aubinator.c @@ -381,8 +381,9 @@ get_ppgtt_batch_bo(void *user_data, uint64_t address) for (uint64_t page = address; page < end; page += 4096) { struct phys_mem *phys_mem = ppgtt_walk(pml4, page); - void *res = mmap((uint8_t *)bo.map + (page - bo.addr), 4096, PROT_READ, - MAP_SHARED | MAP_FIXED, mem_fd, phys_mem->fd_offset); + MAYBE_UNUSED void *res = mmap((uint8_t *)bo.map + (page - bo.addr), 4096, + PROT_READ, MAP_SHARED | MAP_FIXED, mem_fd, + phys_mem->fd_offset); assert(res != MAP_FAILED); } -- 2.18.0 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev