[PATCH 30/42] sptls03/init.c: Make type and constants uint32_t to avoid overflow warnings

Joel Sherrill joel.sherrill at oarcorp.com
Mon Mar 23 14:39:28 UTC 2015


---
 testsuites/sptests/sptls03/init.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/testsuites/sptests/sptls03/init.c b/testsuites/sptests/sptls03/init.c
index 7974264..1487595 100644
--- a/testsuites/sptests/sptls03/init.c
+++ b/testsuites/sptests/sptls03/init.c
@@ -22,16 +22,16 @@
 
 const char rtems_test_name[] = "SPTLS 3";
 
-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 test(void)
 {
   Thread_Control *executing = _Thread_Get_executing();
 
-  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);
 
   rtems_test_assert(executing->Start.tls_area == NULL);
 }
-- 
1.9.3




More information about the devel mailing list