From: Tomohiro Kusumi Date: Fri, 23 Jun 2017 22:07:58 +0000 (+0300) Subject: init: don't use void* for pointer arithmetic (gcc) X-Git-Tag: fio-2.99~61 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=5cf985e5fa4ef90aa1011388aaf5e852ac6ee66c init: don't use void* for pointer arithmetic (gcc) I think gcc extension should be avoided when it can be done by just changing a pointer type. (threads is a pointer to struct thread_data) Signed-off-by: Tomohiro Kusumi Signed-off-by: Jens Axboe --- diff --git a/init.c b/init.c index 2b7768ab..6efa5c1c 100644 --- a/init.c +++ b/init.c @@ -361,7 +361,7 @@ static int setup_thread_area(void) #endif memset(threads, 0, max_jobs * sizeof(struct thread_data)); - fio_debug_jobp = (void *) threads + max_jobs * sizeof(struct thread_data); + fio_debug_jobp = (unsigned int *)(threads + max_jobs); *fio_debug_jobp = -1; flow_init();