linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nick Krause <xerofoiify@gmail.com>
To: Magnus Damm <magnus.damm@gmail.com>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Simon Horman <horms+renesas@verge.net.au>,
	"GitAuthor: Nick Krause" <xerofoiify@gmail.com>,
	"open list:SUPERH" <linux-sh@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>
Cc: josh@joshtriplett.org
Subject: [PATCH] sh: bug: add unreachable() to silence warnings
Date: Thu, 07 Aug 2014 01:42:20 +0000	[thread overview]
Message-ID: <1407375741-3209-1-git-send-email-xerofoiify@gmail.com> (raw)

SuperH BUG() have warnings like

kernel/sched/core.c:2692:1: warning: control reaches end of non-void function
[-Wreturn-type]
net/core/ethtool.c:236:1: warning: control reaches end of non-void function
[-Wreturn-type]

Other BUG() implementations
have added unreachable() at end becuase of which I guess
it does not showthese errors. We can silence them using unreachable().

Signed-off-by: Nick Krause <xerofoify@gmail.com>
---
 arch/sh/include/asm/bug.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/sh/include/asm/bug.h b/arch/sh/include/asm/bug.h
index dcf2780..1ae948f 100644
--- a/arch/sh/include/asm/bug.h
+++ b/arch/sh/include/asm/bug.h
@@ -48,6 +48,7 @@ do {							\
 		   "i" (__FILE__),			\
 		   "i" (__LINE__), "i" (0),		\
 		   "i" (sizeof(struct bug_entry)));	\
+	unreachable();					\
 } while (0)
 
 #define __WARN_TAINT(taint)				\
-- 
2.0.1


             reply	other threads:[~2014-08-07  1:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-07  1:42 Nick Krause [this message]
2014-08-07  5:10 ` [PATCH] sh: bug: add unreachable() to silence warnings Josh Triplett

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=1407375741-3209-1-git-send-email-xerofoiify@gmail.com \
    --to=xerofoiify@gmail.com \
    --cc=geert+renesas@glider.be \
    --cc=horms+renesas@verge.net.au \
    --cc=josh@joshtriplett.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=magnus.damm@gmail.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;
as well as URLs for NNTP newsgroup(s).