* [PATCH] um: Fix return value of start_idle_thread
@ 2018-03-29 20:45 Richard Weinberger
2018-04-12 6:40 ` Richard Weinberger
0 siblings, 1 reply; 2+ messages in thread
From: Richard Weinberger @ 2018-03-29 20:45 UTC (permalink / raw)
To: user-mode-linux-devel; +Cc: linux-kernel, richard, jdike
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] um: Fix return value of start_idle_thread
2018-03-29 20:45 [PATCH] um: Fix return value of start_idle_thread Richard Weinberger
@ 2018-04-12 6:40 ` Richard Weinberger
0 siblings, 0 replies; 2+ messages in thread
From: Richard Weinberger @ 2018-04-12 6:40 UTC (permalink / raw)
To: user-mode-linux-devel; +Cc: linux-kernel, jdike
Am Donnerstag, 29. März 2018, 22:45:59 CEST schrieb Richard Weinberger:
> 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>
Applied.
Thanks,
//richard
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-04-12 6:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-29 20:45 [PATCH] um: Fix return value of start_idle_thread Richard Weinberger
2018-04-12 6:40 ` Richard Weinberger
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).