From 19becaacd6d167eebf34e6c6a13527482e1c78e6 Mon Sep 17 00:00:00 2001 From: Alex Elder Date: Fri, 4 Mar 2011 19:37:31 +0000 Subject: [PATCH] xfstests: fix a few build warnings This patch fixes a few build warnings. I have built the code using i386, x86_64, and ia64 architectures and each has ends up with complaints of one sort or anther. This gets rid of all of them *except* those reported by files under the "ltp" (Linux Test Project) sub-tree. Signed-off-by: Alex Elder Reviewed-by: Eric Sandeen --- lib/tlibio.c | 2 +- src/aio-dio-regress/aiodio_sparse2.c | 3 ++- src/pwrite_mmap_blocked.c | 3 ++- src/unwritten_sync.c | 4 +++- src/xfsctl.c | 2 ++ 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/tlibio.c b/lib/tlibio.c index 85d3bb6c..c509af38 100644 --- a/lib/tlibio.c +++ b/lib/tlibio.c @@ -453,7 +453,7 @@ int lio_random_methods(long curr_mask) { int mask=0; - long random_bit(); + long random_bit(long); /* remove random select, io type, and wait method bits from curr_mask */ mask = curr_mask & (~(LIO_IO_TYPES | LIO_WAIT_TYPES | LIO_RANDOM)); diff --git a/src/aio-dio-regress/aiodio_sparse2.c b/src/aio-dio-regress/aiodio_sparse2.c index 681a093b..79aa9241 100644 --- a/src/aio-dio-regress/aiodio_sparse2.c +++ b/src/aio-dio-regress/aiodio_sparse2.c @@ -227,7 +227,8 @@ void aiodio_sparse(char *filename, int align, int writesize, int startoffset, in unsigned char *badbuf; if (debug) - fprintf(stderr, "seek to %ld and read %d\n", offset, writesize); + fprintf(stderr, "seek to %lld and read %d\n", + (long long) offset, writesize); lseek(fd, offset, SEEK_SET); if (read(fd, bufptr, writesize) < writesize) { fprintf(stderr, "short read() at offset %lld\n", diff --git a/src/pwrite_mmap_blocked.c b/src/pwrite_mmap_blocked.c index f24f7189..26e2230d 100644 --- a/src/pwrite_mmap_blocked.c +++ b/src/pwrite_mmap_blocked.c @@ -59,7 +59,8 @@ int main(int argc, char *argv[]) perror("mmap"); exit(1); } - printf("pwrite %Ld bytes from %Ld to %Ld\n", amount, from, to); + printf("pwrite %Ld bytes from %Ld to %Ld\n", + (long long) amount, (long long) from, (long long) to); ret = pwrite(fd, (char *)mapped_mem + from, amount, to); if (ret != amount) { diff --git a/src/unwritten_sync.c b/src/unwritten_sync.c index 454eba06..6cdf7e8a 100644 --- a/src/unwritten_sync.c +++ b/src/unwritten_sync.c @@ -136,7 +136,9 @@ again: } if (bmapx[x].bmv_oflags & 1) { fprintf(stderr, "FOUND ONE %lld %lld %x\n", - bmapx[x].bmv_offset, bmapx[x].bmv_length,bmapx[x].bmv_oflags); + (long long) bmapx[x].bmv_offset, + (long long) bmapx[x].bmv_length, + bmapx[x].bmv_oflags); foundone = 1; foundany = 1; } diff --git a/src/xfsctl.c b/src/xfsctl.c index 8fa33488..3f82f4ad 100644 --- a/src/xfsctl.c +++ b/src/xfsctl.c @@ -16,6 +16,8 @@ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include + #include #include -- 2.30.2