[PATCH 3/5] libstdthreads/thrd.c: Mark path as unreachable on GCC to resolve warning

Joel Sherrill joel at rtems.org
Sun Mar 20 20:40:51 UTC 2016


---
 cpukit/libstdthreads/thrd.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/cpukit/libstdthreads/thrd.c b/cpukit/libstdthreads/thrd.c
index c2e439f..cc2d20f 100644
--- a/cpukit/libstdthreads/thrd.c
+++ b/cpukit/libstdthreads/thrd.c
@@ -96,6 +96,9 @@ thrd_exit(int res)
 {
 
 	pthread_exit((void *)(intptr_t)res);
+	#if defined(__GNUC__)
+		__builtin_unreachable();
+	#endif
 }
 
 int
-- 
1.8.3.1



More information about the devel mailing list