From 73a2caf46b229dc51dff89b83860fcf42515c38e Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 20 Mar 2015 10:50:13 -0500 Subject: sptests/spwatchdog/init.c: Avoid integer overflow --- testsuites/sptests/spwatchdog/init.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/testsuites/sptests/spwatchdog/init.c b/testsuites/sptests/spwatchdog/init.c index 8e329a4f2b..1d3cb2f9dd 100644 --- a/testsuites/sptests/spwatchdog/init.c +++ b/testsuites/sptests/spwatchdog/init.c @@ -36,9 +36,15 @@ static void test_watchdog_routine( Objects_Id id, void *arg ) static void test_watchdog_static_init( void ) { + #if defined(RTEMS_USE_16_BIT_OBJECT) + #define JUNK_ID 0x1234 + #else + #define JUNK_ID 0x12345678 + #endif + static Watchdog_Control a = WATCHDOG_INITIALIZER( test_watchdog_routine, - 0x12345678, + JUNK_ID, (void *) 0xdeadbeef ); Watchdog_Control b; @@ -47,7 +53,7 @@ static void test_watchdog_static_init( void ) _Watchdog_Initialize( &b, test_watchdog_routine, - 0x12345678, + JUNK_ID, (void *) 0xdeadbeef ); -- cgit v1.2.3