summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-08-08 09:47:06 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-08-08 09:47:06 +0200
commit5c09e9dd1fb35120ddcca5b1087abd8f594d81fa (patch)
tree6641587853ba842a635f2ce1e73f1d8013bc47f4
parente5fd901141062dce6f372dd391ed11cc676d1d19 (diff)
downloadrtems-5c09e9dd1fb35120ddcca5b1087abd8f594d81fa.tar.bz2
sptests/splinkersets01: Fix warnings
-rw-r--r--testsuites/sptests/splinkersets01/init.c40
-rw-r--r--testsuites/sptests/splinkersets01/items.c14
-rw-r--r--testsuites/sptests/splinkersets01/splinkersets01.h14
3 files changed, 34 insertions, 34 deletions
diff --git a/testsuites/sptests/splinkersets01/init.c b/testsuites/sptests/splinkersets01/init.c
index 28c6384377..853d8e1609 100644
--- a/testsuites/sptests/splinkersets01/init.c
+++ b/testsuites/sptests/splinkersets01/init.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2015, 2016 embedded brains GmbH. All rights reserved.
*
* embedded brains GmbH
* Dornierstr. 4
@@ -132,25 +132,25 @@ static void test(void)
static void test_content(void)
{
- void volatile *b_rw = RTEMS_LINKER_SET_BEGIN(test_content_rw);
- void volatile *e_rw = RTEMS_LINKER_SET_END(test_content_rw);
-
- void volatile const *b_ro = RTEMS_LINKER_SET_BEGIN(test_content_ro);
- void volatile const *e_ro = RTEMS_LINKER_SET_END(test_content_ro);
-
- rtems_test_assert(&content_rw_1 >= b_rw);
- rtems_test_assert(&content_rw_2 >= b_rw);
- rtems_test_assert(&content_rw_3 >= b_rw);
- rtems_test_assert(&content_rw_1 <= e_rw);
- rtems_test_assert(&content_rw_2 <= e_rw);
- rtems_test_assert(&content_rw_3 <= e_rw);
-
- rtems_test_assert(&content_ro_1 >= b_ro);
- rtems_test_assert(&content_ro_2 >= b_ro);
- rtems_test_assert(&content_ro_3 >= b_ro);
- rtems_test_assert(&content_ro_1 <= e_ro);
- rtems_test_assert(&content_ro_2 <= e_ro);
- rtems_test_assert(&content_ro_3 <= e_ro);
+ uintptr_t b_rw = (uintptr_t) RTEMS_LINKER_SET_BEGIN(test_content_rw);
+ uintptr_t e_rw = (uintptr_t) RTEMS_LINKER_SET_END(test_content_rw);
+
+ uintptr_t b_ro = (uintptr_t) RTEMS_LINKER_SET_BEGIN(test_content_ro);
+ uintptr_t e_ro = (uintptr_t) RTEMS_LINKER_SET_END(test_content_ro);
+
+ rtems_test_assert((uintptr_t) &content_rw_1 >= b_rw);
+ rtems_test_assert((uintptr_t) &content_rw_2 >= b_rw);
+ rtems_test_assert((uintptr_t) &content_rw_3 >= b_rw);
+ rtems_test_assert((uintptr_t) &content_rw_1 <= e_rw);
+ rtems_test_assert((uintptr_t) &content_rw_2 <= e_rw);
+ rtems_test_assert((uintptr_t) &content_rw_3 <= e_rw);
+
+ rtems_test_assert((uintptr_t) &content_ro_1 >= b_ro);
+ rtems_test_assert((uintptr_t) &content_ro_2 >= b_ro);
+ rtems_test_assert((uintptr_t) &content_ro_3 >= b_ro);
+ rtems_test_assert((uintptr_t) &content_ro_1 <= e_ro);
+ rtems_test_assert((uintptr_t) &content_ro_2 <= e_ro);
+ rtems_test_assert((uintptr_t) &content_ro_3 <= e_ro);
}
static void Init(rtems_task_argument arg)
diff --git a/testsuites/sptests/splinkersets01/items.c b/testsuites/sptests/splinkersets01/items.c
index fde102acac..d230ce1618 100644
--- a/testsuites/sptests/splinkersets01/items.c
+++ b/testsuites/sptests/splinkersets01/items.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2015, 2016 embedded brains GmbH. All rights reserved.
*
* embedded brains GmbH
* Dornierstr. 4
@@ -22,10 +22,10 @@ RTEMS_LINKER_RWSET_ITEM_ORDERED(test_rw, const int *, a1, 1) = &a[1];
RTEMS_LINKER_ROSET_ITEM_ORDERED(test_ro, const int *, ca2, OC) = &ca[2];
-int content_rw_1;
-char content_rw_2;
-char content_rw_3;
+RTEMS_LINKER_RWSET_CONTENT(test_content_rw, int content_rw_1);
+RTEMS_LINKER_RWSET_CONTENT(test_content_rw, char content_rw_2);
+RTEMS_LINKER_RWSET_CONTENT(test_content_rw, char content_rw_3);
-const int content_ro_1;
-const char content_ro_2;
-const char content_ro_3;
+RTEMS_LINKER_ROSET_CONTENT(test_content_ro, const int content_ro_1);
+RTEMS_LINKER_ROSET_CONTENT(test_content_ro, const char content_ro_2);
+RTEMS_LINKER_ROSET_CONTENT(test_content_ro, const char content_ro_3);
diff --git a/testsuites/sptests/splinkersets01/splinkersets01.h b/testsuites/sptests/splinkersets01/splinkersets01.h
index 03391542df..8ebf89467e 100644
--- a/testsuites/sptests/splinkersets01/splinkersets01.h
+++ b/testsuites/sptests/splinkersets01/splinkersets01.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2015, 2016 embedded brains GmbH. All rights reserved.
*
* embedded brains GmbH
* Dornierstr. 4
@@ -37,13 +37,13 @@ RTEMS_LINKER_RWSET_ITEM_DECLARE(test_rw, const int *, a1);
RTEMS_LINKER_ROSET_ITEM_DECLARE(test_ro, const int *, ca2);
-RTEMS_LINKER_RWSET_CONTENT(test_content_rw, extern int content_rw_1);
-RTEMS_LINKER_RWSET_CONTENT(test_content_rw, extern char content_rw_2);
-RTEMS_LINKER_RWSET_CONTENT(test_content_rw, extern char content_rw_3);
+extern int content_rw_1;
+extern char content_rw_2;
+extern char content_rw_3;
-RTEMS_LINKER_ROSET_CONTENT(test_content_ro, extern const int content_ro_1);
-RTEMS_LINKER_ROSET_CONTENT(test_content_ro, extern const char content_ro_2);
-RTEMS_LINKER_ROSET_CONTENT(test_content_ro, extern const char content_ro_3);
+extern const int content_ro_1;
+extern const char content_ro_2;
+extern const char content_ro_3;
#ifdef __cplusplus
}