[PATCH 27/42] sptests/spwatchdog/init.c: Avoid integer overflow
Joel Sherrill
joel.sherrill at oarcorp.com
Mon Mar 23 14:39:25 UTC 2015
---
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 8e329a4..1d3cb2f 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
);
--
1.9.3
More information about the devel
mailing list