From 59b9ddfc30c9ff38dfbd071eafe295d9ffdd5f25 Mon Sep 17 00:00:00 2001 From: gurudas pai Date: Mon, 22 Oct 2007 22:10:39 +0200 Subject: [PATCH 1/1] fio: build warning fix on gcc-3.4.6-3 On gcc-3.4.6-3 >make log.o gcc -W -Wwrite-strings -Wall -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -D_FORTIFY_SOURCE=2 -rdynamic -c -o log.o log.c log.c: In function `read_iolog': log.c:308: warning: int format, fio_ddir arg (arg 3) Which corresponds to enum fio_ddir rw; .. .. if (sscanf(p, "%d,%llu,%u", &rw, &offset, &bytes) != 3) { Following patch will fix the warning. This was added by commit 21bd2987dc5d82a18af485cd1e7841e94137fc0c Thanks, -Guru Signed-off-by: Jens Axboe --- log.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/log.c b/log.c index 66b8f5ba..039e74b2 100644 --- a/log.c +++ b/log.c @@ -294,7 +294,7 @@ static int read_iolog(struct thread_data *td, FILE *f) unsigned int bytes; char *str, *p; int reads, writes; - enum fio_ddir rw; + int rw; /* * Read in the read iolog and store it, reuse the infrastructure @@ -328,7 +328,7 @@ static int read_iolog(struct thread_data *td, FILE *f) INIT_LIST_HEAD(&ipo->list); ipo->offset = offset; ipo->len = bytes; - ipo->ddir = rw; + ipo->ddir = (enum fio_ddir) rw; if (bytes > td->o.max_bs[rw]) td->o.max_bs[rw] = bytes; list_add_tail(&ipo->list, &td->io_log_list); -- 2.25.1