From: Richard Weinberger <richard@nod.at>
To: user-mode-linux-devel@lists.sourceforge.net
Cc: linux-kernel@vger.kernel.org, richard@nod.at, jdike@addtoit.com
Subject: [PATCH] um: Fix return value of start_idle_thread
Date: Thu, 29 Mar 2018 22:45:59 +0200 [thread overview]
Message-ID: <20180329204559.14113-1-richard@nod.at> (raw)
While the function will never returns, gcc will warns.
Add a return statement to make gcc happy.
Before f44f1e7da7c8 we never noticed because gcc knows that longjmp does
not return.
arch/um/os-Linux/skas/process.c: In function ‘start_idle_thread’:
arch/um/os-Linux/skas/process.c:613:1: warning: control reaches end of non-void function [-Wreturn-type]
Fixes: f44f1e7da7c8 ("um: Avoid longjmp/setjmp symbol clashes with libpthread.a")
Signed-off-by: Richard Weinberger <richard@nod.at>
---
arch/um/os-Linux/skas/process.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c
index c94c3bd70ccd..d41fdf686a5f 100644
--- a/arch/um/os-Linux/skas/process.c
+++ b/arch/um/os-Linux/skas/process.c
@@ -610,6 +610,10 @@ int start_idle_thread(void *stack, jmp_buf *switch_buf)
fatal_sigsegv();
}
longjmp(*switch_buf, 1);
+
+ /* unreachable */
+ fatal_sigsegv();
+ return 0;
}
void initial_thread_cb_skas(void (*proc)(void *), void *arg)
--
2.13.6
next reply other threads:[~2018-03-29 20:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-29 20:45 Richard Weinberger [this message]
2018-04-12 6:40 ` [uml-devel] [PATCH] um: Fix return value of start_idle_thread Richard Weinberger
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=20180329204559.14113-1-richard@nod.at \
--to=richard@nod.at \
--cc=jdike@addtoit.com \
--cc=linux-kernel@vger.kernel.org \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/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).