Fix "C99 inline functions are not supported" warning on OpenBSD
authorTomohiro Kusumi <tkusumi@tuxera.com>
Sun, 30 Apr 2017 17:35:07 +0000 (20:35 +0300)
committerJens Axboe <axboe@fb.com>
Sun, 30 Apr 2017 22:51:21 +0000 (16:51 -0600)
OpenBSD has below compiler warning due to hist_sum() being inlined.
It should be fine with no inline (or move it to iolog.h with static
if we somehow want to keep it inlined).

iolog.c:702: warning: C99 inline functions are not supported; using GNU89
iolog.c:702: warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute

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

diff --git a/iolog.c b/iolog.c
index 2e8da139566c98320bb0d638445eec9a25ea363e..31d674c24dab7dc607bd7c43b120f524e7ae5ab9 100644 (file)
--- a/iolog.c
+++ b/iolog.c
@@ -696,7 +696,7 @@ void free_log(struct io_log *log)
        sfree(log);
 }
 
        sfree(log);
 }
 
-inline unsigned long hist_sum(int j, int stride, unsigned int *io_u_plat,
+unsigned long hist_sum(int j, int stride, unsigned int *io_u_plat,
                unsigned int *io_u_plat_last)
 {
        unsigned long sum;
                unsigned int *io_u_plat_last)
 {
        unsigned long sum;