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

This commit is contained in:
Joel Sherrill
2015-03-21 14:45:10 -05:00
parent 0d36bfb30e
commit dc8ab4400b

View File

@@ -26,11 +26,11 @@ static rtems_id master_task;
static __thread volatile char tls_item = 123; 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); printf("TLS item = %i\n", tls_item);
rtems_test_assert(tls_item == expected); rtems_test_assert(tls_item == expected);
@@ -56,8 +56,8 @@ static void test(void)
master_task = rtems_task_self(); master_task = rtems_task_self();
rtems_test_assert(read_write_small == 0xdeadbeef); rtems_test_assert(read_write_small == 0xdeadbeefUL);
rtems_test_assert(read_only_small == 0x601dc0fe); rtems_test_assert(read_only_small == 0x601dc0feUL);
check_tls_item(123); check_tls_item(123);
tls_item = 5; tls_item = 5;