summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKai Wasserbäch <[email protected]>2018-08-18 13:16:11 +0200
committerLionel Landwerlin <[email protected]>2018-08-20 11:08:52 +0100
commitccdefbb559a60c2560118d253a9eaeffd1e94eb6 (patch)
tree79bbc0a19f16254df17a2be17de319d98980181b /src
parent64c2bca59f903142b8e4807ed7577f84a385e335 (diff)
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 <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/intel/tools/aubinator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/intel/tools/aubinator.c b/src/intel/tools/aubinator.c
index 9a3b1d1ef1d..66a7db1043b 100644
--- a/src/intel/tools/aubinator.c
+++ b/src/intel/tools/aubinator.c
@@ -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,