From da0cbef24bc53d5392eeb760142aa58cc925d3d2 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 16 Jul 2018 08:22:57 +0200 Subject: score: Avoid structurally dead code This was spotted by Coverity Scan. --- cpukit/include/rtems/score/threadimpl.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'cpukit') diff --git a/cpukit/include/rtems/score/threadimpl.h b/cpukit/include/rtems/score/threadimpl.h index 777158b77a..7966e891d1 100644 --- a/cpukit/include/rtems/score/threadimpl.h +++ b/cpukit/include/rtems/score/threadimpl.h @@ -1788,7 +1788,6 @@ RTEMS_INLINE_ROUTINE bool _Thread_Wait_flags_try_change_acquire( Thread_Wait_flags desired_flags ) { - bool success; #if defined(RTEMS_SMP) return _Atomic_Compare_exchange_uint( &the_thread->Wait.flags, @@ -1798,6 +1797,7 @@ RTEMS_INLINE_ROUTINE bool _Thread_Wait_flags_try_change_acquire( ATOMIC_ORDER_ACQUIRE ); #else + bool success; ISR_Level level; _ISR_Local_disable( level ); @@ -1809,9 +1809,8 @@ RTEMS_INLINE_ROUTINE bool _Thread_Wait_flags_try_change_acquire( ); _ISR_Local_enable( level ); -#endif - return success; +#endif } /** -- cgit v1.2.3