mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 09:28:07 +02:00
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:
parent
64c2bca59f
commit
ccdefbb559
1 changed files with 1 additions and 1 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue