From b3d12ada2b2c45829820a9bb1a9b81d0654a90e2 Mon Sep 17 00:00:00 2001 From: Dariusz Stojaczyk Date: Sun, 24 Jun 2018 22:04:03 +0200 Subject: [PATCH] ioat/verify: do not use void* arithmetics void* arithmetics are gcc extension. We'll be doing more complex arithmetics on those pointers soon and gcc will explode on us. Let's just keep it all compliant to the C standard. Change-Id: I9a236fc4d91ff72af1b7ac69b0ccf6b4631a6775 Signed-off-by: Dariusz Stojaczyk Reviewed-on: https://review.gerrithub.io/416656 Tested-by: SPDK Automated Test System Reviewed-by: Daniel Verkamp Reviewed-by: Shuhei Matsumoto Reviewed-by: Ben Walker --- examples/ioat/verify/verify.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/ioat/verify/verify.c b/examples/ioat/verify/verify.c index 66c9b8c778..cf32c0e3b1 100644 --- a/examples/ioat/verify/verify.c +++ b/examples/ioat/verify/verify.c @@ -125,8 +125,8 @@ ioat_exit(void) static void prepare_ioat_task(struct thread_entry *thread_entry, struct ioat_task *ioat_task) { int len; - int src_offset; - int dst_offset; + uintptr_t src_offset; + uintptr_t dst_offset; int num_ddwords; uint64_t fill_pattern; @@ -148,10 +148,10 @@ static void prepare_ioat_task(struct thread_entry *thread_entry, struct ioat_tas dst_offset = rand_r(&seed) % (SRC_BUFFER_SIZE - len); memset(ioat_task->buffer, 0, SRC_BUFFER_SIZE); - ioat_task->src = g_src + src_offset; + ioat_task->src = (void *)((uintptr_t)g_src + src_offset); } ioat_task->len = len; - ioat_task->dst = ioat_task->buffer + dst_offset; + ioat_task->dst = (void *)((uintptr_t)ioat_task->buffer + dst_offset); ioat_task->thread_entry = thread_entry; }