Only used, when asserts are enabled.
Fixes an unused-variable warning with GCC 8:
../../../src/intel/tools/aubinator.c: In function 'ensure_phys_mem':
../../../src/intel/tools/aubinator.c:209:11: warning: unused variable 'ftruncate_res' [-Wunused-variable]
int ftruncate_res = ftruncate(mem_fd, mem_fd_len += 4096);
^~~~~~~~~~~~~
Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
new_mem->phys_addr = phys_addr;
new_mem->fd_offset = mem_fd_len;
- int ftruncate_res = ftruncate(mem_fd, mem_fd_len += 4096);
+ MAYBE_UNUSED int ftruncate_res = ftruncate(mem_fd, mem_fd_len += 4096);
assert(ftruncate_res == 0);
new_mem->data = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED,