continue;
uint32_t map_offset = i->virt_addr - address;
- void *res = mmap((uint8_t *)bo.map + map_offset, 4096, PROT_READ,
- MAP_SHARED | MAP_FIXED, mem->mem_fd, phys_mem->fd_offset);
+ MAYBE_UNUSED void *res =
+ mmap((uint8_t *)bo.map + map_offset, 4096, PROT_READ,
+ MAP_SHARED | MAP_FIXED, mem->mem_fd, phys_mem->fd_offset);
assert(res != MAP_FAILED);
}
for (uint64_t page = address; page < end; page += 4096) {
struct phys_mem *phys_mem = ppgtt_walk(mem, mem->pml4, page);
- void *res = mmap((uint8_t *)bo.map + (page - bo.addr), 4096, PROT_READ,
- MAP_SHARED | MAP_FIXED, mem->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->mem_fd, phys_mem->fd_offset);
assert(res != MAP_FAILED);
}
int
aub_read_command(struct aub_read *read, const void *data, uint32_t data_len)
{
- const uint32_t *p = data, *end = data + data_len, *next;
+ const uint32_t *p = data, *next;
+ MAYBE_UNUSED const uint32_t *end = data + data_len;
uint32_t h, header_length, bias;
assert(data_len >= 4);