xfs
[Top] [All Lists]

Re: [PATCH] xfstests: fix a few build warnings

To: Alex Elder <aelder@xxxxxxx>
Subject: Re: [PATCH] xfstests: fix a few build warnings
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Wed, 09 Mar 2011 11:34:04 -0600
Cc: xfs@xxxxxxxxxxx
In-reply-to: <201103041937.p24JbVtP004804@xxxxxxxxxxxxxxxxxxxxxx>
References: <201103041937.p24JbVtP004804@xxxxxxxxxxxxxxxxxxxxxx>
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9
On 3/4/11 1:37 PM, Alex Elder wrote:
> 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.

Reviewed-by: Eric Sandeen <sandeen@xxxxxxxxxxx>

> Signed-off-by: Alex Elder <aelder@xxxxxxx>
> 
> ---
>  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(-)
> 
> Index: b/lib/tlibio.c
> ===================================================================
> --- 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));
> Index: b/src/aio-dio-regress/aiodio_sparse2.c
> ===================================================================
> --- 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 a
>               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",
> Index: b/src/pwrite_mmap_blocked.c
> ===================================================================
> --- 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) {
> Index: b/src/unwritten_sync.c
> ===================================================================
> --- 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;
>               }
> Index: b/src/xfsctl.c
> ===================================================================
> --- a/src/xfsctl.c
> +++ b/src/xfsctl.c
> @@ -16,6 +16,8 @@
>   * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
>   */
>  
> +#include <sys/stat.h>
> +
>  #include <xfs/xfs.h>
>  #include <xfs/jdm.h>
>  
> 
> _______________________________________________
> xfs mailing list
> xfs@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/xfs
> 

<Prev in Thread] Current Thread [Next in Thread>