xfs
[Top] [All Lists]

Re: [PATCH 5/8] xfstests: fix compile warnings in iopat.c

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 5/8] xfstests: fix compile warnings in iopat.c
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Wed, 20 Jan 2010 03:31:40 -0500
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1263958688-435-6-git-send-email-david@xxxxxxxxxxxxx>
References: <1263958688-435-1-git-send-email-david@xxxxxxxxxxxxx> <1263958688-435-6-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.19 (2009-01-05)
On Wed, Jan 20, 2010 at 02:38:05PM +1100, Dave Chinner wrote:
> Printf format warnings and return value warnings need fixing.
> 
> Signed-off-by: Dave Chinner <david@xxxxxxxxxxxxx>
> ---
>  src/iopat.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/src/iopat.c b/src/iopat.c
> index c06071f..f34de19 100644
> --- a/src/iopat.c
> +++ b/src/iopat.c
> @@ -47,12 +47,13 @@ int main(int argc, char **argv)
>     read(fd, &x, 1048576);
>     for (i = 0; i < 131072; i++) {
>        if (x[i] != i) {
> -         printf("error: %d %d %d\n",i,8*i,x[i]);
> +         printf("error: %d %d %lld\n", i ,8 * i, (long long)x[i]);
>        exit(1);

Instead of the casting we could also use the C99 macro for the uin64_t
format.  But either way good enough for the tests,


Reviewed-by: Christoph Hellwig <hch@xxxxxx>

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