summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-07-16 08:22:57 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-07-16 09:15:43 +0200
commitda0cbef24bc53d5392eeb760142aa58cc925d3d2 (patch)
tree42c0ae57b5b0f4c89dafa71d399314451bd0a444
parentposix: Fix rwlock auto initialization (diff)
downloadrtems-da0cbef24bc53d5392eeb760142aa58cc925d3d2.tar.bz2
score: Avoid structurally dead code
This was spotted by Coverity Scan.
-rw-r--r--cpukit/include/rtems/score/threadimpl.h5
1 files changed, 2 insertions, 3 deletions
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
}
/**