intel: aubinator: mark ftruncate_res as MAYBE_UNUSED in ensure_phys_mem

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>
This commit is contained in:
Kai Wasserbäch 2018-08-18 13:16:11 +02:00 committed by Lionel Landwerlin
parent 64c2bca59f
commit ccdefbb559

View file

@ -206,7 +206,7 @@ ensure_phys_mem(uint64_t phys_addr)
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,