Fix g++ warning about void* used in arithmetic
authorDaniel Gollub <daniel.gollub@t-online.de>
Wed, 12 Feb 2014 18:25:42 +0000 (19:25 +0100)
committerJens Axboe <axboe@fb.com>
Thu, 13 Feb 2014 04:21:39 +0000 (21:21 -0700)
../parse.h: In function ‘void* td_var(thread_options*, fio_option*, unsigned int)’:
../parse.h:110:10: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
../parse.h:112:9: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]

Signed-off-by: Daniel Gollub <d.gollub@telekom.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
parse.h

diff --git a/parse.h b/parse.h
index 5273d23f6907b41db030d0090ea555f87cf0ee61..1009252e4a254f80605416f14b05cc0587b72d72 100644 (file)
--- a/parse.h
+++ b/parse.h
@@ -100,7 +100,7 @@ typedef int (fio_opt_str_val_fn)(void *, long long *);
 typedef int (fio_opt_int_fn)(void *, int *);
 typedef int (fio_opt_str_set_fn)(void *);
 
 typedef int (fio_opt_int_fn)(void *, int *);
 typedef int (fio_opt_str_set_fn)(void *);
 
-#define __td_var(start, offset)        ((void *) start + (offset))
+#define __td_var(start, offset)        ((char *) start + (offset))
 
 struct thread_options;
 static inline void *td_var(struct thread_options *to, struct fio_option *o,
 
 struct thread_options;
 static inline void *td_var(struct thread_options *to, struct fio_option *o,