[rtems commit] sptests/splinkersets01: Fix warnings
Sebastian Huber
sebh at rtems.org
Mon Aug 8 07:47:42 UTC 2016
Module: rtems
Branch: master
Commit: 5c09e9dd1fb35120ddcca5b1087abd8f594d81fa
Changeset: http://git.rtems.org/rtems/commit/?id=5c09e9dd1fb35120ddcca5b1087abd8f594d81fa
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Mon Aug 8 09:47:06 2016 +0200
sptests/splinkersets01: Fix warnings
---
testsuites/sptests/splinkersets01/init.c | 40 +++++++++++-----------
testsuites/sptests/splinkersets01/items.c | 14 ++++----
testsuites/sptests/splinkersets01/splinkersets01.h | 14 ++++----
3 files changed, 34 insertions(+), 34 deletions(-)
diff --git a/testsuites/sptests/splinkersets01/init.c b/testsuites/sptests/splinkersets01/init.c
index 28c6384..853d8e1 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 fde102a..d230ce1 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 0339154..8ebf894 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
}
More information about the vc
mailing list