public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [josef-btrfs:master 61/69] fs/btrfs/delayed-inode.c:393:1: warning: control reaches end of non-void function
       [not found] ` <20130612193211.GB8389@lenny.home.zabbo.net>
@ 2013-06-13  3:18   ` Fengguang Wu
  0 siblings, 0 replies; only message in thread
From: Fengguang Wu @ 2013-06-13  3:18 UTC (permalink / raw)
  To: Zach Brown; +Cc: Josef Bacik, kbuild-all, LKML

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-06-13  3:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <51b8c057.Wb46meK/SKAvZppd%fengguang.wu@intel.com>
     [not found] ` <20130612193211.GB8389@lenny.home.zabbo.net>
2013-06-13  3:18   ` [josef-btrfs:master 61/69] fs/btrfs/delayed-inode.c:393:1: warning: control reaches end of non-void function Fengguang Wu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox