[PATCH 07/14] sp13/task1.c: Remove warning

Joel Sherrill joel at rtems.org
Tue Mar 22 14:40:35 UTC 2016


---
 testsuites/sptests/sp13/task1.c | 56 +++++++++++++++++++++++++----------------
 1 file changed, 35 insertions(+), 21 deletions(-)

diff --git a/testsuites/sptests/sp13/task1.c b/testsuites/sptests/sp13/task1.c
index 58859c0..dcc3b9e 100644
--- a/testsuites/sptests/sp13/task1.c
+++ b/testsuites/sptests/sp13/task1.c
@@ -339,29 +339,43 @@ rtems_test_pause();
       RTEMS_DEFAULT_OPTIONS,
       1 * rtems_clock_get_ticks_per_second()
     );
-   directive_failed(status, "rtems_message_queue_receive exact size");
-   if (size != queue_size) {
-     puts("TA1 - exact size size match failed");
-     rtems_test_exit(1);
-   }
-
-   if (memcmp(big_send_buffer, big_receive_buffer, size) != 0) {
-     puts("TA1 - exact size data match failed");
-     rtems_test_exit(1);
-   }
-
-   for (cp = (big_receive_buffer + size);
-        cp < (big_receive_buffer + sizeof(big_receive_buffer));
-        cp++) {
-      if (*cp != 'Z') {
-        puts("TA1 - exact size overrun match failed");
-        rtems_test_exit(1);
-      }
+    directive_failed(status, "rtems_message_queue_receive exact size");
+    if (size != queue_size) {
+      puts("TA1 - exact size size match failed");
+      rtems_test_exit(1);
     }
 
-    /* all done with this one; delete it */
-    status = rtems_message_queue_delete( Queue_id[ 1 ] );
-    directive_failed( status, "rtems_message_queue_delete" );
+    if (memcmp(big_send_buffer, big_receive_buffer, size) != 0) {
+      puts("TA1 - exact size data match failed");
+      rtems_test_exit(1);
+    }
+
+    for (cp = (big_receive_buffer + size);
+         cp < (big_receive_buffer + sizeof(big_receive_buffer));
+         cp++) {
+       if (*cp != 'Z') {
+         puts("TA1 - exact size overrun match failed");
+         rtems_test_exit(1);
+       }
+     }
+
+     if (memcmp(big_send_buffer, big_receive_buffer, size) != 0) {
+       puts("TA1 - exact size data match failed");
+       rtems_test_exit(1);
+     }
+
+     for (cp = (big_receive_buffer + size);
+          cp < (big_receive_buffer + sizeof(big_receive_buffer));
+          cp++) {
+       if (*cp != 'Z') {
+         puts("TA1 - exact size overrun match failed");
+         rtems_test_exit(1);
+       }
+     }
+
+     /* all done with this one; delete it */
+     status = rtems_message_queue_delete( Queue_id[ 1 ] );
+     directive_failed( status, "rtems_message_queue_delete" );
   }
 
   TEST_END();
-- 
1.8.3.1




More information about the devel mailing list