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 <jens.axboe@oracle.com>
unsigned int bytes;
char *str, *p;
int reads, writes;
unsigned int bytes;
char *str, *p;
int reads, writes;
/*
* Read in the read iolog and store it, reuse the infrastructure
/*
* Read in the read iolog and store it, reuse the infrastructure
INIT_LIST_HEAD(&ipo->list);
ipo->offset = offset;
ipo->len = bytes;
INIT_LIST_HEAD(&ipo->list);
ipo->offset = offset;
ipo->len = bytes;
+ 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);
if (bytes > td->o.max_bs[rw])
td->o.max_bs[rw] = bytes;
list_add_tail(&ipo->list, &td->io_log_list);