lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20130613031830.GC11199@localhost>
Date:	Thu, 13 Jun 2013 11:18:30 +0800
From:	Fengguang Wu <fengguang.wu@...el.com>
To:	Zach Brown <zab@...hat.com>
Cc:	Josef Bacik <jbacik@...ionio.com>, kbuild-all@...org,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [josef-btrfs:master 61/69] fs/btrfs/delayed-inode.c:393:1:
 warning: control reaches end of non-void function

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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ