From: Fengguang Wu <fengguang.wu@intel.com>
To: Zach Brown <zab@redhat.com>
Cc: Josef Bacik <jbacik@fusionio.com>,
kbuild-all@01.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [josef-btrfs:master 61/69] fs/btrfs/delayed-inode.c:393:1: warning: control reaches end of non-void function
Date: Thu, 13 Jun 2013 11:18:30 +0800 [thread overview]
Message-ID: <20130613031830.GC11199@localhost> (raw)
In-Reply-To: <20130612193211.GB8389@lenny.home.zabbo.net>
On Wed, Jun 12, 2013 at 12:32:11PM -0700, Zach Brown wrote:
> > fs/btrfs/delayed-inode.c: In function 'get_ins_del_root':
> > >> fs/btrfs/delayed-inode.c:393:1: warning: control reaches end of non-void function [-Wreturn-type]
> >
> > vim +393 fs/btrfs/delayed-inode.c
> >
> > 385 static struct rb_root *get_ins_del_root(struct btrfs_delayed_node *delayed_node,
> > 386 int ins_del)
> > 387 {
> > 388 if (ins_del == BTRFS_DELAYED_INSERTION_ITEM)
> > 389 return &delayed_node->ins_root;
> > 390 if (ins_del == BTRFS_DELAYED_DELETION_ITEM)
> > 391 return &delayed_node->del_root;
> > 392 BUG();
> > > 393 }
>
> Hrmph.
>
> Is this false positive worth working around? What version of gcc is
> this from?
gcc (Debian 4.7.1-6) 4.7.1
> I'd expect the unreachable() in BUG() to silence this
> warning on modern gcc.
Yeah it's strange why gcc still complain about that. Anyway I'll
detect and ignore this kind of false positive in my report scripts.
Thanks,
Fengguang
parent reply other threads:[~2013-06-13 3:18 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20130612193211.GB8389@lenny.home.zabbo.net>]
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=20130613031830.GC11199@localhost \
--to=fengguang.wu@intel.com \
--cc=jbacik@fusionio.com \
--cc=kbuild-all@01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=zab@redhat.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