Index: testsuites/sptests/ChangeLog
===================================================================
--- testsuites/sptests/ChangeLog	(revision ff7ff62a0f1598e5db1ccd76b9efac49e0959689)
+++ testsuites/sptests/ChangeLog	(revision c0d7e23ce943acd34f20fca96540769ab1927ec9)
@@ -1,2 +1,9 @@
+2011-05-05	Joel Sherrill <joel.sherrill@oarcorp.com>
+
+	* sp09/screen12.c, sp09/sp09.scn, sp21/Makefile.am, sp35/priinv.c,
+	sp39/init.c, sp50/init.c, sp57/init.c, sp72/init.c, sp73/init.c,
+	spintrcritical01/init.c, spprivenv01/init.c, spsimplesched01/init.c,
+	spsimplesched02/init.c: Remove warnings.
+
 2011-04-15	Sebastian Huber <sebastian.huber@embedded-brains.de>
 
Index: testsuites/sptests/sp09/screen12.c
===================================================================
--- testsuites/sptests/sp09/screen12.c	(revision ff7ff62a0f1598e5db1ccd76b9efac49e0959689)
+++ testsuites/sptests/sp09/screen12.c	(revision c0d7e23ce943acd34f20fca96540769ab1927ec9)
@@ -7,5 +7,5 @@
  *  Output parameters:  NONE
  *
- *  COPYRIGHT (c) 1989-2009.
+ *  COPYRIGHT (c) 1989-2011.
  *  On-Line Applications Research Corporation (OAR).
  *
@@ -28,7 +28,4 @@
   void                   *segment_address_2;
   void                   *segment_address_3;
-  uint32_t                good_back_flag;
-  uint32_t                good_front_flag;
-  uint32_t                offset;
   uintptr_t               segment_size;
   rtems_status_code       status;
@@ -401,46 +398,4 @@
   rtems_debug_disable( RTEMS_DEBUG_REGION );
 
-#if 0
-
-  offset = (segment_address_1 - (void *)Region_good_area) / 4;
-
-/* bad FRONT_FLAG error */
-
-  good_front_flag = Region_good_area[ offset - 1 ];
-  Region_good_area[ offset - 1 ] = good_front_flag + 2;
-
-  status = rtems_region_return_segment( Region_id[ 1 ], segment_address_1 );
-  fatal_directive_status(
-    status,
-    RTEMS_INVALID_ADDRESS,
-    "rtems_region_return_segment with back_flag != front_flag"
-  );
-  puts( "TA1 - rtems_region_return_segment - RTEMS_INVALID_ADDRESS" );
-
-  Region_good_area[ offset - 1 ] = good_front_flag;
-
-/* bad FRONT_FLAG error */
-
-  good_back_flag = Region_good_area[ offset - 2 ];
-  Region_good_area[ offset - 2 ] = 1024;
-
-  status = rtems_region_return_segment( Region_id[ 1 ], segment_address_1 );
-  fatal_directive_status(
-    status,
-    RTEMS_INVALID_ADDRESS,
-    "rtems_region_return_segment with back_flag != front_flag"
-  );
-  puts( "TA1 - rtems_region_return_segment - RTEMS_INVALID_ADDRESS" );
-
-  Region_good_area[ offset - 2 ] = good_back_flag;
-
-#else
-  offset = 0;
-  good_front_flag = 0;
-  good_back_flag = 0;
-  puts( "TA1 - rtems_region_return_segment - RTEMS_INVALID_ADDRESS - SKIPPED" );
-  puts( "TA1 - rtems_region_return_segment - RTEMS_INVALID_ADDRESS - SKIPPED" );
-#endif
-
   puts( "TA1 - rtems_debug_enable - RTEMS_DEBUG_REGION" );
   rtems_debug_enable( RTEMS_DEBUG_REGION );
Index: testsuites/sptests/sp09/sp09.scn
===================================================================
--- testsuites/sptests/sp09/sp09.scn	(revision ff7ff62a0f1598e5db1ccd76b9efac49e0959689)
+++ testsuites/sptests/sp09/sp09.scn	(revision c0d7e23ce943acd34f20fca96540769ab1927ec9)
@@ -274,6 +274,4 @@
 TA1 - rtems_region_return_segment - RTEMS_INVALID_ADDRESS
 TA1 - rtems_debug_disable - RTEMS_DEBUG_REGION
-TA1 - rtems_region_return_segment - RTEMS_INVALID_ADDRESS - SKIPPED
-TA1 - rtems_region_return_segment - RTEMS_INVALID_ADDRESS - SKIPPED
 TA1 - rtems_debug_enable - RTEMS_DEBUG_REGION
 TA1 - rtems_region_extend - RTEMS_INVALID_ID
Index: testsuites/sptests/sp21/Makefile.am
===================================================================
--- testsuites/sptests/sp21/Makefile.am	(revision ff7ff62a0f1598e5db1ccd76b9efac49e0959689)
+++ testsuites/sptests/sp21/Makefile.am	(revision c0d7e23ce943acd34f20fca96540769ab1927ec9)
@@ -14,4 +14,5 @@
 
 AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+AM_CPPFLAGS += -Wno-deprecated-declarations
 
 LINK_OBJS = $(sp21_OBJECTS) $(sp21_LDADD)
Index: testsuites/sptests/sp35/priinv.c
===================================================================
--- testsuites/sptests/sp35/priinv.c	(revision ff7ff62a0f1598e5db1ccd76b9efac49e0959689)
+++ testsuites/sptests/sp35/priinv.c	(revision c0d7e23ce943acd34f20fca96540769ab1927ec9)
@@ -244,15 +244,18 @@
   rtems_status_code     Sts;
 
+#if defined(TEST_PRINT_STATISTICS)
+  rtems_task_priority   AccessPrio;  /*      :         */
+  uint32_t              AccessCnt;   /*      :         */
   rtems_task_priority   EnterPrio;   /* Statistics log */
-  rtems_task_priority   AccessPrio;  /*      :         */
+  uint32_t              EnterCnt;    /*      :         */
   rtems_task_priority   LeavePrio;   /*      :         */
-  uint32_t              EnterCnt;    /*      :         */
-  uint32_t              AccessCnt;   /*      :         */
   uint32_t              LeaveCnt;    /*      :         */
-
+#endif
+
+#if defined(TEST_PRINT_STATISTICS)
   /* Store information about the current situation */
   EnterPrio = _Thread_Executing->current_priority;
   EnterCnt  = _Thread_Executing->resource_count;
-
+#endif
 
   printf("  AccessLocalHw called by %s\n", CallerName());
@@ -270,16 +273,18 @@
   directive_failed( Sts, "rtems_semaphore_obtain(LocalHwAccess_R...)" );
 
+#if defined(TEST_PRINT_STATISTICS)
   /* Store information about the current situation */
   AccessPrio = _Thread_Executing->current_priority;
   AccessCnt  = _Thread_Executing->resource_count;
+#endif
 
   Sts = rtems_semaphore_release(LocalHwAccess_R);
   directive_failed( Sts, "rtems_semaphore_release(LocalHwAccess_R)" );
 
+#if defined(TEST_PRINT_STATISTICS)
   /* Store information about the current situation */
   LeavePrio = _Thread_Executing->current_priority;
   LeaveCnt  = _Thread_Executing->resource_count;
 
-#if defined(TEST_PRINT_STATISTICS)
   printf(
     "  AccessLocalHw from %s statistics:\n"
@@ -305,4 +310,5 @@
   rtems_status_code     Sts;
 
+#if defined(TEST_PRINT_STATISTICS)
   rtems_task_priority   EnterPrio;   /* Statistics log */
   rtems_task_priority   AccessPrio;  /*      :         */
@@ -311,9 +317,11 @@
   uint32_t              AccessCnt;   /*      :         */
   uint32_t              LeaveCnt;    /*      :         */
-
+#endif
+
+#if defined(TEST_PRINT_STATISTICS)
   /* Store information about the current situation */
   EnterPrio = _Thread_Executing->current_priority;
   EnterCnt  = _Thread_Executing->resource_count;
-
+#endif
 
   printf("AccessRemoteHw called by %s\n", CallerName());
@@ -330,16 +338,18 @@
   AccessLocalHw();
 
+#if defined(TEST_PRINT_STATISTICS)
   /* Store information about the current situation */
   AccessPrio = _Thread_Executing->current_priority;
   AccessCnt  = _Thread_Executing->resource_count;
+#endif
 
   Sts = rtems_semaphore_release(RemoteHwAccess_R);
   directive_failed( Sts, "rtems_semaphore_release(RemoreHwAccess_R" );
 
+#if defined(TEST_PRINT_STATISTICS)
   /* Store information about the current situation */
   LeavePrio = _Thread_Executing->current_priority;
   LeaveCnt  = _Thread_Executing->resource_count;
 
-#if defined(TEST_PRINT_STATISTICS)
   printf(
     "\nAccessRemoteHw from %s statistics:\n"
Index: testsuites/sptests/sp39/init.c
===================================================================
--- testsuites/sptests/sp39/init.c	(revision ff7ff62a0f1598e5db1ccd76b9efac49e0959689)
+++ testsuites/sptests/sp39/init.c	(revision c0d7e23ce943acd34f20fca96540769ab1927ec9)
@@ -2,5 +2,5 @@
  *  Classic API Signal to Task from ISR
  *
- *  COPYRIGHT (c) 1989-2009.
+ *  COPYRIGHT (c) 1989-2011.
  *  On-Line Applications Research Corporation (OAR).
  *
@@ -45,5 +45,6 @@
      *  another task so doesn't impact this critical section.
      */
-    rtems_event_send( other_task, 0x02 );
+    status = rtems_event_send( other_task, 0x02 );
+    directive_failed( status, "event send" );
 
     /*
@@ -51,9 +52,11 @@
      *  it's blocking condition so it will still block
      */
-    rtems_event_send( main_task, 0x02 );
+    status = rtems_event_send( main_task, 0x02 );
+    directive_failed( status, "event send" );
 
     case_hit = TRUE;
   }
   status = rtems_event_send( main_task, 0x01 );
+  directive_failed( status, "event send" );
 }
 
@@ -73,4 +76,5 @@
   }
   status = rtems_event_send( main_task, 0x01 );
+  directive_failed( status, "event send" );
 }
 
Index: testsuites/sptests/sp50/init.c
===================================================================
--- testsuites/sptests/sp50/init.c	(revision ff7ff62a0f1598e5db1ccd76b9efac49e0959689)
+++ testsuites/sptests/sp50/init.c	(revision c0d7e23ce943acd34f20fca96540769ab1927ec9)
@@ -1,4 +1,4 @@
 /*
- *  COPYRIGHT (c) 1989-2009.
+ *  COPYRIGHT (c) 1989-2011.
  *  On-Line Applications Research Corporation (OAR).
  *
@@ -21,10 +21,10 @@
 rtems_timer_service_routine Timer_Routine( rtems_id id, void *ignored )
 {
-  rtems_status_code sc;
+  rtems_status_code status;
 
   Fired++;
   timerRan = true;
 
-  sc = rtems_timer_server_fire_after(
+  status = rtems_timer_server_fire_after(
     id,
     rtems_clock_get_ticks_per_second(),
@@ -32,4 +32,6 @@
     NULL
   );
+  directive_failed( status, "fire after" );
+
 }
 
Index: testsuites/sptests/sp57/init.c
===================================================================
--- testsuites/sptests/sp57/init.c	(revision ff7ff62a0f1598e5db1ccd76b9efac49e0959689)
+++ testsuites/sptests/sp57/init.c	(revision c0d7e23ce943acd34f20fca96540769ab1927ec9)
@@ -1,5 +1,5 @@
 /*  Restart a task which is delaying
  *
- *  COPYRIGHT (c) 1989-2009.
+ *  COPYRIGHT (c) 1989-2011.
  *  On-Line Applications Research Corporation (OAR).
  *
@@ -25,4 +25,5 @@
   puts( "Delay - rtems_task_wake_after - OK" );
   status = rtems_task_wake_after( RTEMS_MILLISECONDS_TO_TICKS(2000) );
+  directive_failed( status, "wake after" );
 
   puts( "ERROR - delay task woke up!!" );
Index: testsuites/sptests/sp72/init.c
===================================================================
--- testsuites/sptests/sp72/init.c	(revision ff7ff62a0f1598e5db1ccd76b9efac49e0959689)
+++ testsuites/sptests/sp72/init.c	(revision c0d7e23ce943acd34f20fca96540769ab1927ec9)
@@ -1,4 +1,4 @@
 /*
- *  COPYRIGHT (c) 1989-2010.
+ *  COPYRIGHT (c) 1989-2011.
  *  On-Line Applications Research Corporation (OAR).
  *
@@ -31,4 +31,6 @@
     rtems_clock_get_ticks_per_second() * 10
   );
+  directive_failed( status, "obtain" );
+
 }
 
Index: testsuites/sptests/sp73/init.c
===================================================================
--- testsuites/sptests/sp73/init.c	(revision ff7ff62a0f1598e5db1ccd76b9efac49e0959689)
+++ testsuites/sptests/sp73/init.c	(revision c0d7e23ce943acd34f20fca96540769ab1927ec9)
@@ -32,4 +32,6 @@
   for ( ; ; ) {
     status = rtems_clock_get_tod( &time );
+    directive_failed( status, "get tod" );
+
     if ( time.second >= 15 ) {
       puts( "*** END OF SP73 (YIELD) TEST ***" );
@@ -39,8 +41,9 @@
     print_time( " - rtems_clock_get_tod - ", &time, "\n" );
     status = rtems_task_wake_after(
-      task_index * 5 * rtems_clock_get_ticks_per_second() );
+      task_index * 5 * rtems_clock_get_ticks_per_second()
+    );
+    directive_failed( status, "wake after" );
   }
 }
-
 
 rtems_task Init(
@@ -72,23 +75,37 @@
     RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 1 ]
   );
+  directive_failed( status, "create 1" );
+
   status = rtems_task_create(
     Task_name[ 2 ], 1, RTEMS_MINIMUM_STACK_SIZE, RTEMS_DEFAULT_MODES,
     RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 2 ]
   );
+  directive_failed( status, "create 2" );
+
   status = rtems_task_create(
     Task_name[ 3 ], 1, RTEMS_MINIMUM_STACK_SIZE, RTEMS_DEFAULT_MODES,
     RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 3 ]
   );
+  directive_failed( status, "create 3" );
 
   status = rtems_task_start( Task_id[ 1 ], Test_task, 1 );
-  rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
-  status = rtems_task_start( Task_id[ 2 ], Test_task, 2 );
-  rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
-  status = rtems_task_start( Task_id[ 3 ], Test_task, 3 );
-
-  rtems_task_set_priority(Task_id[1], 1, &old);
+  directive_failed( status, "start 1" );
   rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
 
+  status = rtems_task_start( Task_id[ 2 ], Test_task, 2 );
+  directive_failed( status, "start 2" );
+  rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
+
+  status = rtems_task_start( Task_id[ 3 ], Test_task, 3 );
+  directive_failed( status, "start 3" );
+
+  status = rtems_task_set_priority(Task_id[1], 1, &old);
+  directive_failed( status, "set priority" );
+
+  status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
+  directive_failed( status, "wake after" );
+
   status = rtems_task_delete( RTEMS_SELF );
+  directive_failed( status, "delete" );
 }
 
Index: testsuites/sptests/spintrcritical01/init.c
===================================================================
--- testsuites/sptests/spintrcritical01/init.c	(revision ff7ff62a0f1598e5db1ccd76b9efac49e0959689)
+++ testsuites/sptests/spintrcritical01/init.c	(revision c0d7e23ce943acd34f20fca96540769ab1927ec9)
@@ -1,4 +1,4 @@
 /*
- *  COPYRIGHT (c) 1989-2009.
+ *  COPYRIGHT (c) 1989-2011.
  *  On-Line Applications Research Corporation (OAR).
  *
@@ -83,5 +83,7 @@
     case_hit = true;
   }
+
   status = rtems_semaphore_release( Semaphore );
+  directive_failed( status, "release" );
 }
 
Index: testsuites/sptests/spprivenv01/init.c
===================================================================
--- testsuites/sptests/spprivenv01/init.c	(revision ff7ff62a0f1598e5db1ccd76b9efac49e0959689)
+++ testsuites/sptests/spprivenv01/init.c	(revision c0d7e23ce943acd34f20fca96540769ab1927ec9)
@@ -1,4 +1,4 @@
 /*
- *  COPYRIGHT (c) 1989-2010.
+ *  COPYRIGHT (c) 1989-2011.
  *  On-Line Applications Research Corporation (OAR).
  *
@@ -21,9 +21,10 @@
 rtems_task task_routine( rtems_task_argument not_used )
 {
-  int sc = 0;
+  rtems_status_code sc;
 
   puts( "task_routine - setting up a private environment" );
 
   sc = rtems_libio_set_private_env();
+  directive_failed( sc, "set private env" );
   sleep( 1 );
 
@@ -35,10 +36,10 @@
 )
 {
-  int sc = 0;
-  bool status = 0;
-  void *alloc_ptr = (void *)0;
-  rtems_id current_task_id;
-  rtems_id task_id;
-  rtems_name another_task_name;
+  rtems_status_code       sc;
+  bool                    status;
+  void                   *alloc_ptr;
+  rtems_id                current_task_id;
+  rtems_id                task_id;
+  rtems_name              another_task_name;
   Heap_Information_block  Info;
   
Index: testsuites/sptests/spsimplesched01/init.c
===================================================================
--- testsuites/sptests/spsimplesched01/init.c	(revision ff7ff62a0f1598e5db1ccd76b9efac49e0959689)
+++ testsuites/sptests/spsimplesched01/init.c	(revision c0d7e23ce943acd34f20fca96540769ab1927ec9)
@@ -26,13 +26,16 @@
 )
 {
-  rtems_id          tid;
-  rtems_time_of_day time;
-  uint32_t    task_index;
-  rtems_status_code status;
+  rtems_id           tid;
+  rtems_time_of_day  time;
+  uint32_t           task_index;
+  rtems_status_code  status;
 
   status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
+  directive_failed( status, "task ident" );
+
   task_index = task_number( tid );
   for ( ; ; ) {
     status = rtems_clock_get_tod( &time );
+    directive_failed( status, "clock get tod" );
     if ( time.second >= 35 ) {
       puts( "*** END OF SIMPLE01 TEST ***" );
@@ -42,5 +45,7 @@
     print_time( " - rtems_clock_get_tod - ", &time, "\n" );
     status = rtems_task_wake_after(
-      task_index * 5 * rtems_clock_get_ticks_per_second() );
+      task_index * 5 * rtems_clock_get_ticks_per_second()
+    );
+    directive_failed( status, "wake after" );
   }
 }
@@ -74,26 +79,41 @@
     RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 1 ]
   );
+  directive_failed( status, "create 1" );
+
   status = rtems_task_create(
     Task_name[ 2 ], 1, RTEMS_MINIMUM_STACK_SIZE * 2, RTEMS_DEFAULT_MODES,
     RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 2 ]
   );
+  directive_failed( status, "create 2" );
+
   status = rtems_task_create(
     Task_name[ 3 ], 1, RTEMS_MINIMUM_STACK_SIZE * 2, RTEMS_DEFAULT_MODES,
     RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 3 ]
   );
+  directive_failed( status, "create 3" );
 
   status = rtems_task_start( Task_id[ 1 ], Test_task, 1 );
-  rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
-  status = rtems_task_start( Task_id[ 2 ], Test_task, 2 );
-  rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
-  status = rtems_task_start( Task_id[ 3 ], Test_task, 3 );
-
-  rtems_task_set_priority(Task_id[1], 2, &old);
-  rtems_task_set_priority(Task_id[2], 2, &old);
-  rtems_task_set_priority(Task_id[3], 2, &old);
-
+  directive_failed( status, "start 1" );
   rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
 
+  status = rtems_task_start( Task_id[ 2 ], Test_task, 2 );
+  directive_failed( status, "start 2" );
+  rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
+
+  status = rtems_task_start( Task_id[ 3 ], Test_task, 3 );
+  directive_failed( status, "start 3" );
+
+  status = rtems_task_set_priority( Task_id[1], 2, &old );
+  directive_failed( status, "set priority 1" );
+  status = rtems_task_set_priority( Task_id[2], 2, &old );
+  directive_failed( status, "set priority 2" );
+  status = rtems_task_set_priority( Task_id[3], 2, &old );
+  directive_failed( status, "set priority 3" );
+
+  status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
+  directive_failed( status, "yield" );
+
   status = rtems_task_delete( RTEMS_SELF );
+  directive_failed( status, "delete self" );
 }
 
Index: testsuites/sptests/spsimplesched02/init.c
===================================================================
--- testsuites/sptests/spsimplesched02/init.c	(revision ff7ff62a0f1598e5db1ccd76b9efac49e0959689)
+++ testsuites/sptests/spsimplesched02/init.c	(revision c0d7e23ce943acd34f20fca96540769ab1927ec9)
@@ -29,12 +29,12 @@
 {
   rtems_id          tid;
-  uint32_t    task_index;
   rtems_status_code status;
 
   status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
-  task_index = task_number( tid );
+  directive_failed( status, "wake after" );
 
   for ( ; ; ) {
-    rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
+    status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
+    directive_failed( status, "yield" );
   }
 }
