[rtems commit] psxtests: Fix warnings

Sebastian Huber sebh at rtems.org
Wed Feb 15 12:06:25 UTC 2017


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Feb 14 11:30:00 2017 +0100

psxtests: Fix warnings

---

 testsuites/psxtests/psxfatal_support/init.c   | 14 ++++++++------
 testsuites/psxtests/psxfatal_support/system.h |  5 +----
 2 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/testsuites/psxtests/psxfatal_support/init.c b/testsuites/psxtests/psxfatal_support/init.c
index d639d17..9b59efa 100644
--- a/testsuites/psxtests/psxfatal_support/init.c
+++ b/testsuites/psxtests/psxfatal_support/init.c
@@ -39,19 +39,21 @@ void *POSIX_Init(
   rtems_test_exit(0);
 }
 
-void Put_Error( uint32_t source, uint32_t error )
+void Put_Error( rtems_fatal_source source, rtems_fatal_code error )
 {
   if ( source == INTERNAL_ERROR_CORE ) {
     printk( rtems_internal_error_text( error ) );
   }
   else if (source == INTERNAL_ERROR_RTEMS_API ){
-    if (error >  RTEMS_NOT_IMPLEMENTED )
-      printk("Unknown Internal Rtems Error (%d)", error);
-    else
-      printk( "%s", rtems_status_text( error ) );
+    printk( "%s", rtems_status_text( error ) );
   }
   else if (source == INTERNAL_ERROR_POSIX_API ) {
-      printk( "SOURCE=%d ERROR=%d %s", source, error, strerror( error ) );
+    printk(
+      "SOURCE=%d ERROR=%" PRIuMAX " %s",
+      source,
+      (uintmax_t) error,
+      strerror( (int) error )
+    );
   }
 }
 
diff --git a/testsuites/psxtests/psxfatal_support/system.h b/testsuites/psxtests/psxfatal_support/system.h
index c825a4a..cb84ef1 100644
--- a/testsuites/psxtests/psxfatal_support/system.h
+++ b/testsuites/psxtests/psxfatal_support/system.h
@@ -25,10 +25,7 @@ void force_error(void);
 
 void Put_Source( rtems_fatal_source source );
 
-void Put_Error(
-  uint32_t source,
-  uint32_t error
-);
+void Put_Error( rtems_fatal_source source, rtems_fatal_code error );
 
 void *POSIX_Init(
   void *argument




More information about the vc mailing list