[Intel-gfx] [PATCH i-g-t 2/3] gem_syslatency: Avoid arithmetic on void * warning

Tvrtko Ursulin tursulin at ursulin.net
Fri Nov 3 11:47:55 UTC 2017


From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
---
 benchmarks/gem_syslatency.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/benchmarks/gem_syslatency.c b/benchmarks/gem_syslatency.c
index e2b1f74a43f4..580edc5f5c72 100644
--- a/benchmarks/gem_syslatency.c
+++ b/benchmarks/gem_syslatency.c
@@ -206,7 +206,7 @@ static void *sys_thp_alloc(void *arg)
 		assert(ptr != MAP_FAILED);
 		madvise(ptr, sz, MADV_HUGEPAGE);
 		for (size_t page = 0; page < sz; page += PAGE_SIZE)
-			*(volatile uint32_t *)(ptr + page) = 0;
+			*(volatile uint32_t *)((unsigned char *)ptr + page) = 0;
 		munmap(ptr, sz);
 
 		clock_gettime(CLOCK_MONOTONIC, &now);
-- 
2.9.5



More information about the Intel-gfx mailing list