All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] um: Fix return value of start_idle_thread
@ 2018-03-29 20:45 Richard Weinberger
  2018-04-12  6:40   ` [uml-devel] " Richard Weinberger
  0 siblings, 1 reply; 3+ 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] 3+ 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; 3+ 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] 3+ messages in thread

* Re: [uml-devel] [PATCH] um: Fix return value of start_idle_thread
@ 2018-04-12  6:40   ` Richard Weinberger
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Weinberger @ 2018-04-12  6:40 UTC (permalink / raw)
  To: user-mode-linux-devel; +Cc: jdike, linux-kernel

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

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-04-12  6:40 UTC | newest]

Thread overview: 3+ 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
2018-04-12  6:40   ` [uml-devel] " Richard Weinberger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.