[rtems commit] score: Fix statement with no effect warning

Sebastian Huber sebh at rtems.org
Wed Mar 30 06:47:08 UTC 2016


Module:    rtems
Branch:    master
Commit:    863c07479c429c3fd1d1241f22f9d526dae60d9a
Changeset: http://git.rtems.org/rtems/commit/?id=863c07479c429c3fd1d1241f22f9d526dae60d9a

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Wed Mar 30 08:33:41 2016 +0200

score: Fix statement with no effect warning

No need to add an assert due to the fatal error parameter passed to
_Objects_MP_Allocate_and_open().

---

 cpukit/rtems/src/taskmp.c | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/cpukit/rtems/src/taskmp.c b/cpukit/rtems/src/taskmp.c
index ae81666..e20d1fe 100644
--- a/cpukit/rtems/src/taskmp.c
+++ b/cpukit/rtems/src/taskmp.c
@@ -173,7 +173,6 @@ void _RTEMS_tasks_MP_Process_packet (
 {
   RTEMS_tasks_MP_Packet *the_packet;
   Thread_Control   *the_thread;
-  bool           ignored;
 
   the_packet = (RTEMS_tasks_MP_Packet *) the_packet_prefix;
 
@@ -181,12 +180,12 @@ void _RTEMS_tasks_MP_Process_packet (
 
     case RTEMS_TASKS_MP_ANNOUNCE_CREATE:
 
-      ignored = _Objects_MP_Allocate_and_open(
-                  &_RTEMS_tasks_Information.Objects,
-                  the_packet->name,
-                  the_packet->Prefix.id,
-                  true
-                );
+      _Objects_MP_Allocate_and_open(
+        &_RTEMS_tasks_Information.Objects,
+        the_packet->name,
+        the_packet->Prefix.id,
+        true
+      );
 
       _MPCI_Return_packet( the_packet_prefix );
       break;
@@ -257,8 +256,6 @@ void _RTEMS_tasks_MP_Process_packet (
       _MPCI_Return_packet( the_packet_prefix );
       break;
   }
-
-  ignored; /* avoid set but not used warning */
 }
 
 /*




More information about the vc mailing list