[PATCH 20/42] sptests/sp12/pritask.c: Correct printf() warning

Joel Sherrill joel.sherrill at oarcorp.com
Mon Mar 23 14:39:18 UTC 2015


---
 testsuites/sptests/sp12/pritask.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/testsuites/sptests/sp12/pritask.c b/testsuites/sptests/sp12/pritask.c
index 736aa82..2de764a 100644
--- a/testsuites/sptests/sp12/pritask.c
+++ b/testsuites/sptests/sp12/pritask.c
@@ -14,15 +14,17 @@
 #include "system.h"
 
 rtems_task Priority_task(
-  rtems_task_argument its_index
+  rtems_task_argument its_index_arg
 )
 {
   rtems_interval      timeout;
   rtems_task_priority its_priority;
   rtems_task_priority current_priority;
   rtems_status_code   status;
+  int                 its_index;
   uint32_t            index;
 
+  its_index = (int) its_index_arg;
   its_priority = Task_priority[ its_index ];
 
   if ( its_priority < 3 )
@@ -42,8 +44,7 @@ rtems_task Priority_task(
 
   if ( its_priority < PRIORITY_INHERIT_BASE_PRIORITY ) {
     printf(
-      "PRI%" PRIdrtems_task_argument " - WHY AM I HERE? (pri=%"
-        PRIdrtems_task_priority ")",
+      "PRI%d - WHY AM I HERE? (pri=%" PRIdrtems_task_priority ")",
      its_index,
      its_priority
     );
-- 
1.9.3




More information about the devel mailing list