[rtems commit] sptests/spwatchdog: Fix for short enums

Sebastian Huber sebh at rtems.org
Mon Apr 7 14:42:12 UTC 2014


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Mon Apr  7 14:50:34 2014 +0200

sptests/spwatchdog: Fix for short enums

---

 testsuites/sptests/spwatchdog/init.c |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/testsuites/sptests/spwatchdog/init.c b/testsuites/sptests/spwatchdog/init.c
index 2b1bc3d..8e329a4 100644
--- a/testsuites/sptests/spwatchdog/init.c
+++ b/testsuites/sptests/spwatchdog/init.c
@@ -36,13 +36,20 @@ static void test_watchdog_routine( Objects_Id id, void *arg )
 
 static void test_watchdog_static_init( void )
 {
-  Objects_Id id = 0x12345678;
-  void *arg = (void *) 0xdeadbeef;
-  Watchdog_Control a = WATCHDOG_INITIALIZER( test_watchdog_routine, id, arg );
+  static Watchdog_Control a = WATCHDOG_INITIALIZER(
+    test_watchdog_routine,
+    0x12345678,
+    (void *) 0xdeadbeef
+  );
   Watchdog_Control b;
 
   memset( &b, 0, sizeof( b ) );
-  _Watchdog_Initialize( &b, test_watchdog_routine, id, arg );
+  _Watchdog_Initialize(
+    &b,
+    test_watchdog_routine,
+    0x12345678,
+    (void *) 0xdeadbeef
+  );
 
   rtems_test_assert( memcmp( &a, &b, sizeof( a ) ) == 0 );
 }




More information about the vc mailing list