[Top] [All Lists]

Re: [PATCH] xfs: fix xfs_debug warnings

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH] xfs: fix xfs_debug warnings
From: Alex Elder <aelder@xxxxxxx>
Date: Mon, 04 Apr 2011 13:13:23 -0500
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20110402181340.GA12639@xxxxxxxxxxxxx>
References: <20110402181340.GA12639@xxxxxxxxxxxxx>
Reply-to: aelder@xxxxxxx
On Sat, 2011-04-02 at 14:13 -0400, Christoph Hellwig wrote:
> For a CONFIG_XFS_DEBUG=n build gcc complains about statements with no
> effect in xfs_debug:
> fs/xfs/quota/xfs_qm_syscalls.c: In function 'xfs_qm_scall_trunc_qfiles':
> fs/xfs/quota/xfs_qm_syscalls.c:291:3: warning: statement with no effect
> The reason for that is that the various new xfs message functions have a
> return value which is never used, and in case of the non-debug build
> xfs_debug the macro evaluates to a plain 0 which produces the above
> warnings.  This can be fixed by turning xfs_debug into an inline function
> instead of a macro, but in addition to that I've also changed all the
> message helpers to return void as we never use their return values.
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>

Looks good.

Reviewed-by: Alex Elder <aelder@xxxxxxx>

. . .

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