binject: don't use void* for pointer arithmetic (gcc)
authorTomohiro Kusumi <tkusumi@tuxera.com>
Mon, 12 Jun 2017 20:02:11 +0000 (23:02 +0300)
committerJens Axboe <axboe@fb.com>
Mon, 12 Jun 2017 20:51:01 +0000 (14:51 -0600)
I think gcc extension should be avoided when it can be done by
just changing a pointer type.

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
engines/binject.c

index 932534a03987eb85fbe1241f35944a4fc287dbed..792dbbdd2ee89da71dfb42b3382a3e4adddbc877 100644 (file)
@@ -59,11 +59,12 @@ static int pollin_events(struct pollfd *pfds, int fds)
        return 0;
 }
 
        return 0;
 }
 
-static unsigned int binject_read_commands(struct thread_data *td, void *p,
+static unsigned int binject_read_commands(struct thread_data *td, void *buf,
                                          int left, int *err)
 {
        struct fio_file *f;
        int i, ret, events;
                                          int left, int *err)
 {
        struct fio_file *f;
        int i, ret, events;
+       char *p = buf;
 
 one_more:
        events = 0;
 
 one_more:
        events = 0;