[rtems commit] score: Fix set but not used warning

Sebastian Huber sebh at rtems.org
Wed Mar 30 06:14:19 UTC 2016


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

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

score: Fix set but not used warning

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

---

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

diff --git a/cpukit/rtems/src/msgmp.c b/cpukit/rtems/src/msgmp.c
index f3bab5a..74b240c 100644
--- a/cpukit/rtems/src/msgmp.c
+++ b/cpukit/rtems/src/msgmp.c
@@ -263,7 +263,6 @@ void _Message_queue_MP_Process_packet (
 {
   Message_queue_MP_Packet *the_packet;
   Thread_Control          *the_thread;
-  bool                     ignored;
 
   the_packet = (Message_queue_MP_Packet *) the_packet_prefix;
 
@@ -271,12 +270,12 @@ void _Message_queue_MP_Process_packet (
 
     case MESSAGE_QUEUE_MP_ANNOUNCE_CREATE:
 
-      ignored = _Objects_MP_Allocate_and_open(
-                  &_Message_queue_Information,
-                  the_packet->name,
-                  the_packet->Prefix.id,
-                  true
-                );
+      _Objects_MP_Allocate_and_open(
+        &_Message_queue_Information,
+        the_packet->name,
+        the_packet->Prefix.id,
+        true
+      );
 
       _MPCI_Return_packet( the_packet_prefix );
       break;
@@ -428,8 +427,6 @@ void _Message_queue_MP_Process_packet (
       break;
 
   }
-
-  ignored; /* avoid set but not used warning */
 }
 
 /*




More information about the vc mailing list