[rtems commit] sptls01/init.c: Use larger data types for values

Joel Sherril joel at rtems.org
Tue Mar 24 13:18:11 UTC 2015


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

Author:    Joel Sherrill <joel.sherrill at oarcorp.com>
Date:      Sat Mar 21 14:45:10 2015 -0500

sptls01/init.c: Use larger data types for values

---

 testsuites/sptests/sptls01/init.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/testsuites/sptests/sptls01/init.c b/testsuites/sptests/sptls01/init.c
index 1f06aaa..ba662aa 100644
--- a/testsuites/sptests/sptls01/init.c
+++ b/testsuites/sptests/sptls01/init.c
@@ -26,11 +26,11 @@ static rtems_id master_task;
 
 static __thread volatile char tls_item = 123;
 
-static volatile int read_write_small = 0xdeadbeef;
+static volatile uint32_t read_write_small = 0xdeadbeefUL;
 
-static const volatile int read_only_small = 0x601dc0fe;
+static const volatile uint32_t read_only_small = 0x601dc0feUL;
 
-static void check_tls_item(int expected)
+static void check_tls_item(uint32_t expected)
 {
   printf("TLS item = %i\n", tls_item);
   rtems_test_assert(tls_item == expected);
@@ -56,8 +56,8 @@ static void test(void)
 
   master_task = rtems_task_self();
 
-  rtems_test_assert(read_write_small == 0xdeadbeef);
-  rtems_test_assert(read_only_small == 0x601dc0fe);
+  rtems_test_assert(read_write_small == 0xdeadbeefUL);
+  rtems_test_assert(read_only_small == 0x601dc0feUL);
 
   check_tls_item(123);
   tls_item = 5;




More information about the vc mailing list