forked from Imagelibrary/rtems
sptests/splinkersets01: Fix warnings
This commit is contained in:
@@ -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);
|
||||
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);
|
||||
|
||||
void volatile const *b_ro = RTEMS_LINKER_SET_BEGIN(test_content_ro);
|
||||
void volatile const *e_ro = RTEMS_LINKER_SET_END(test_content_ro);
|
||||
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(&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((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(&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);
|
||||
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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user