xfs
[Top] [All Lists]

Re: [PATCH] xfs: fix variable set but not used warnings

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH] xfs: fix variable set but not used warnings
From: Alex Elder <aelder@xxxxxxx>
Date: Mon, 04 Apr 2011 13:21:20 -0500
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20110404125544.GA726@xxxxxxxxxxxxx>
References: <20110404125544.GA726@xxxxxxxxxxxxx>
Reply-to: aelder@xxxxxxx
On Mon, 2011-04-04 at 08:55 -0400, Christoph Hellwig wrote:
> GCC 4.6 now warnings about variables set but not used.  Fix the trivially
> fixable warnings of this sort.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>

Looks good.  I have an unrelated question though.

Reviewed-by: Alex Elder <aelder@xxxxxxx>

> Index: linux-2.6/fs/xfs/quota/xfs_qm_syscalls.c
> ===================================================================
> --- linux-2.6.orig/fs/xfs/quota/xfs_qm_syscalls.c     2011-04-03 
> 06:40:45.399789765 -0700
> +++ linux-2.6/fs/xfs/quota/xfs_qm_syscalls.c  2011-04-03 06:43:00.219782939 
> -0700
> @@ -313,14 +313,12 @@ xfs_qm_scall_quotaon(
>  {
>       int             error;
>       uint            qf;
> -     uint            accflags;
>       __int64_t       sbflags;
>  
>       flags &= (XFS_ALL_QUOTA_ACCT | XFS_ALL_QUOTA_ENFD);
>       /*
>        * Switching on quota accounting must be done at mount time.
>        */
> -     accflags = flags & XFS_ALL_QUOTA_ACCT;
>       flags &= ~(XFS_ALL_QUOTA_ACCT);

Unrelated, but isn't the effect of this line plus the one a few
lines up the same as this?

        flags &= XFS_ALL_QUOTA_ENFD;

>  
>       sbflags = 0;

. . .

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