From: Dave Chinner <david@fromorbit.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] xfs: fix xfs_debug warnings
Date: Sun, 3 Apr 2011 10:16:48 +1000 [thread overview]
Message-ID: <20110403001648.GH6957@dastard> (raw)
In-Reply-To: <20110402220905.GA1861@infradead.org>
On Sat, Apr 02, 2011 at 06:09:05PM -0400, Christoph Hellwig wrote:
> Err, the subject should have been:
>
> [PATCH] xfs: fix xfs_debug warnings
>
> On Sat, Apr 02, 2011 at 02:13:40PM -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@lst.de>
Looks good, though I don't get those warnings using gcc-4.4.4. I
guess it's gcc-4.6 issuing the warnings?
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2011-04-03 0:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-02 18:13 f Christoph Hellwig
2011-04-02 22:09 ` [PATCH] xfs: fix xfs_debug warnings Christoph Hellwig
2011-04-03 0:16 ` Dave Chinner [this message]
2011-04-03 10:58 ` Christoph Hellwig
2011-04-04 0:21 ` Dave Chinner
2011-04-04 18:13 ` Alex Elder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110403001648.GH6957@dastard \
--to=david@fromorbit.com \
--cc=hch@infradead.org \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox