From 7a16dd027f83d7ff8ff0e72bb6bb12fae046fcbf Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Wed, 18 Oct 2006 17:21:58 +0200 Subject: [PATCH] [PATCH] Make io engines -W clean Signed-off-by: Jens Axboe --- engines/Makefile | 2 +- engines/fio-engine-libaio.c | 5 +++-- engines/fio-engine-mmap.c | 3 ++- engines/fio-engine-posixaio.c | 9 ++++++--- engines/fio-engine-sg.c | 11 +++++------ engines/fio-engine-splice.c | 3 ++- engines/fio-engine-sync.c | 3 ++- 7 files changed, 21 insertions(+), 15 deletions(-) diff --git a/engines/Makefile b/engines/Makefile index bffaff44..ce55894d 100644 --- a/engines/Makefile +++ b/engines/Makefile @@ -1,5 +1,5 @@ CC = gcc -CFLAGS = -Wall -O2 -g -shared -rdynamic -fPIC +CFLAGS = -W -Wall -O2 -g -shared -rdynamic -fPIC ALL_CFLAGS = $(CFLAGS) -I.. -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 OBJS = fio-engine-sync.o fio-engine-splice.o fio-engine-mmap.o fio-engine-libaio.o fio-engine-posixaio.o fio-engine-sg.o fio-engine-cpu.o diff --git a/engines/fio-engine-libaio.c b/engines/fio-engine-libaio.c index 9197107c..c3fefdac 100644 --- a/engines/fio-engine-libaio.c +++ b/engines/fio-engine-libaio.c @@ -17,12 +17,13 @@ struct libaio_data { struct io_event *aio_events; }; -static int fio_libaio_sync(struct thread_data *td, struct fio_file *f) +static int fio_libaio_sync(struct thread_data fio_unused *td, + struct fio_file *f) { return fsync(f->fd); } -static int fio_libaio_prep(struct thread_data *td, struct io_u *io_u) +static int fio_libaio_prep(struct thread_data fio_unused *td, struct io_u *io_u) { struct fio_file *f = io_u->file; diff --git a/engines/fio-engine-mmap.c b/engines/fio-engine-mmap.c index 0c79752f..d203d6af 100644 --- a/engines/fio-engine-mmap.c +++ b/engines/fio-engine-mmap.c @@ -67,7 +67,8 @@ static int fio_mmapio_queue(struct thread_data *td, struct io_u *io_u) return io_u->error; } -static int fio_mmapio_sync(struct thread_data *td, struct fio_file *f) +static int fio_mmapio_sync(struct thread_data fio_unused *td, + struct fio_file *f) { return msync(f->mmap, f->file_size, MS_SYNC); } diff --git a/engines/fio-engine-posixaio.c b/engines/fio-engine-posixaio.c index 8cd3cf46..260551a4 100644 --- a/engines/fio-engine-posixaio.c +++ b/engines/fio-engine-posixaio.c @@ -45,12 +45,14 @@ static unsigned long long ts_utime_since_now(struct timespec *t) return sec + nsec; } -static int fio_posixaio_sync(struct thread_data *td, struct fio_file *f) +static int fio_posixaio_sync(struct thread_data fio_unused *td, + struct fio_file *f) { return fsync(f->fd); } -static int fio_posixaio_cancel(struct thread_data *td, struct io_u *io_u) +static int fio_posixaio_cancel(struct thread_data fio_unused *td, + struct io_u *io_u) { struct fio_file *f = io_u->file; int r = aio_cancel(f->fd, &io_u->aiocb); @@ -61,7 +63,8 @@ static int fio_posixaio_cancel(struct thread_data *td, struct io_u *io_u) return 1; } -static int fio_posixaio_prep(struct thread_data *td, struct io_u *io_u) +static int fio_posixaio_prep(struct thread_data fio_unused *td, + struct io_u *io_u) { struct aiocb *aiocb = &io_u->aiocb; struct fio_file *f = io_u->file; diff --git a/engines/fio-engine-sg.c b/engines/fio-engine-sg.c index 5337068b..01eba8d5 100644 --- a/engines/fio-engine-sg.c +++ b/engines/fio-engine-sg.c @@ -112,8 +112,8 @@ static int fio_sgio_getevents(struct thread_data *td, int min, int max, return r; } -static int fio_sgio_ioctl_doio(struct thread_data *td, struct fio_file *f, - struct io_u *io_u) +static int fio_sgio_ioctl_doio(struct thread_data *td, + struct fio_file *f, struct io_u *io_u) { struct sgio_data *sd = td->io_ops->data; struct sg_io_hdr *hdr = &io_u->hdr; @@ -123,8 +123,7 @@ static int fio_sgio_ioctl_doio(struct thread_data *td, struct fio_file *f, return ioctl(f->fd, SG_IO, hdr); } -static int fio_sgio_rw_doio(struct thread_data *td, struct fio_file *f, - struct io_u *io_u, int sync) +static int fio_sgio_rw_doio(struct fio_file *f, struct io_u *io_u, int sync) { struct sg_io_hdr *hdr = &io_u->hdr; int ret; @@ -149,10 +148,10 @@ static int fio_sgio_doio(struct thread_data *td, struct io_u *io_u, int sync) if (td->filetype == FIO_TYPE_BD) return fio_sgio_ioctl_doio(td, f, io_u); - return fio_sgio_rw_doio(td, f, io_u, sync); + return fio_sgio_rw_doio(f, io_u, sync); } -static int fio_sgio_sync(struct thread_data *td, struct fio_file *f) +static int fio_sgio_sync(struct thread_data *td, struct fio_file fio_unused *f) { struct sgio_data *sd = td->io_ops->data; struct sg_io_hdr *hdr; diff --git a/engines/fio-engine-splice.c b/engines/fio-engine-splice.c index 4f5b86cd..cb39b722 100644 --- a/engines/fio-engine-splice.c +++ b/engines/fio-engine-splice.c @@ -16,7 +16,8 @@ struct spliceio_data { int pipe[2]; }; -static int fio_spliceio_sync(struct thread_data *td, struct fio_file *f) +static int fio_spliceio_sync(struct thread_data fio_unused *td, + struct fio_file *f) { return fsync(f->fd); } diff --git a/engines/fio-engine-sync.c b/engines/fio-engine-sync.c index 1806d4df..d5be4c82 100644 --- a/engines/fio-engine-sync.c +++ b/engines/fio-engine-sync.c @@ -14,7 +14,8 @@ struct syncio_data { struct io_u *last_io_u; }; -static int fio_syncio_sync(struct thread_data *td, struct fio_file *f) +static int fio_syncio_sync(struct thread_data fio_unused *td, + struct fio_file *f) { return fsync(f->fd); } -- 2.25.1