diff options
author | Thomas Wood <thomas.wood@intel.com> | 2015-09-08 17:13:43 +0100 |
---|---|---|
committer | Thomas Wood <thomas.wood@intel.com> | 2015-09-11 14:39:43 +0100 |
commit | fdecc1b5afbdcdb20fa98c642cea7fa1dc1a8944 (patch) | |
tree | a018e70f53b3597050cedf054309337618d4b890 /tools/aubdump.c | |
parent | 2155d1eb546f1b4082374266323cbb709f1e6659 (diff) |
tools/aubdump: remove void pointer arithmetic
A gcc extension allows void pointer arithmetic by treating the size of
void as 1, but this generates a warning when -Wpointer-arith is used.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Diffstat (limited to 'tools/aubdump.c')
-rw-r--r-- | tools/aubdump.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/aubdump.c b/tools/aubdump.c index d52515b4..a17dc10f 100644 --- a/tools/aubdump.c +++ b/tools/aubdump.c @@ -191,7 +191,7 @@ aub_write_trace_block(uint32_t type, void *virtual, uint32_t size, uint64_t gtt_ dword_out((gtt_offset + offset) >> 32); if (virtual) - data_out(GET_PTR(virtual) + offset, block_size); + data_out(((char *) GET_PTR(virtual)) + offset, block_size); else data_out(null_block, block_size); @@ -261,7 +261,7 @@ relocate_bo(struct bo *bo, const struct drm_i915_gem_execbuffer2 *execbuffer2, else handle = relocs[i].target_handle; - dw = relocated + relocs[i].offset; + dw = (uint32_t*)(((char *) relocated) + relocs[i].offset); *dw = bos[handle].offset + relocs[i].delta; } |