Changeset 5c09e9d in rtems


Ignore:
Timestamp:
Aug 8, 2016, 7:47:06 AM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
5d0f0de4
Parents:
e5fd901
Message:

sptests/splinkersets01: Fix warnings

Location:
testsuites/sptests/splinkersets01
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • testsuites/sptests/splinkersets01/init.c

    re5fd901 r5c09e9d  
    11/*
    2  * Copyright (c) 2015 embedded brains GmbH.  All rights reserved.
     2 * Copyright (c) 2015, 2016 embedded brains GmbH.  All rights reserved.
    33 *
    44 *  embedded brains GmbH
     
    133133static void test_content(void)
    134134{
    135   void volatile *b_rw = RTEMS_LINKER_SET_BEGIN(test_content_rw);
    136   void volatile *e_rw = RTEMS_LINKER_SET_END(test_content_rw);
     135  uintptr_t b_rw = (uintptr_t) RTEMS_LINKER_SET_BEGIN(test_content_rw);
     136  uintptr_t e_rw = (uintptr_t) RTEMS_LINKER_SET_END(test_content_rw);
    137137
    138   void volatile const *b_ro = RTEMS_LINKER_SET_BEGIN(test_content_ro);
    139   void volatile const *e_ro = RTEMS_LINKER_SET_END(test_content_ro);
     138  uintptr_t b_ro = (uintptr_t) RTEMS_LINKER_SET_BEGIN(test_content_ro);
     139  uintptr_t e_ro = (uintptr_t) RTEMS_LINKER_SET_END(test_content_ro);
    140140
    141   rtems_test_assert(&content_rw_1 >= b_rw);
    142   rtems_test_assert(&content_rw_2 >= b_rw);
    143   rtems_test_assert(&content_rw_3 >= b_rw);
    144   rtems_test_assert(&content_rw_1 <= e_rw);
    145   rtems_test_assert(&content_rw_2 <= e_rw);
    146   rtems_test_assert(&content_rw_3 <= e_rw);
     141  rtems_test_assert((uintptr_t) &content_rw_1 >= b_rw);
     142  rtems_test_assert((uintptr_t) &content_rw_2 >= b_rw);
     143  rtems_test_assert((uintptr_t) &content_rw_3 >= b_rw);
     144  rtems_test_assert((uintptr_t) &content_rw_1 <= e_rw);
     145  rtems_test_assert((uintptr_t) &content_rw_2 <= e_rw);
     146  rtems_test_assert((uintptr_t) &content_rw_3 <= e_rw);
    147147
    148   rtems_test_assert(&content_ro_1 >= b_ro);
    149   rtems_test_assert(&content_ro_2 >= b_ro);
    150   rtems_test_assert(&content_ro_3 >= b_ro);
    151   rtems_test_assert(&content_ro_1 <= e_ro);
    152   rtems_test_assert(&content_ro_2 <= e_ro);
    153   rtems_test_assert(&content_ro_3 <= e_ro);
     148  rtems_test_assert((uintptr_t) &content_ro_1 >= b_ro);
     149  rtems_test_assert((uintptr_t) &content_ro_2 >= b_ro);
     150  rtems_test_assert((uintptr_t) &content_ro_3 >= b_ro);
     151  rtems_test_assert((uintptr_t) &content_ro_1 <= e_ro);
     152  rtems_test_assert((uintptr_t) &content_ro_2 <= e_ro);
     153  rtems_test_assert((uintptr_t) &content_ro_3 <= e_ro);
    154154}
    155155
  • testsuites/sptests/splinkersets01/items.c

    re5fd901 r5c09e9d  
    11/*
    2  * Copyright (c) 2015 embedded brains GmbH.  All rights reserved.
     2 * Copyright (c) 2015, 2016 embedded brains GmbH.  All rights reserved.
    33 *
    44 *  embedded brains GmbH
     
    2323RTEMS_LINKER_ROSET_ITEM_ORDERED(test_ro, const int *, ca2, OC) = &ca[2];
    2424
    25 int content_rw_1;
    26 char content_rw_2;
    27 char content_rw_3;
     25RTEMS_LINKER_RWSET_CONTENT(test_content_rw, int content_rw_1);
     26RTEMS_LINKER_RWSET_CONTENT(test_content_rw, char content_rw_2);
     27RTEMS_LINKER_RWSET_CONTENT(test_content_rw, char content_rw_3);
    2828
    29 const int content_ro_1;
    30 const char content_ro_2;
    31 const char content_ro_3;
     29RTEMS_LINKER_ROSET_CONTENT(test_content_ro, const int content_ro_1);
     30RTEMS_LINKER_ROSET_CONTENT(test_content_ro, const char content_ro_2);
     31RTEMS_LINKER_ROSET_CONTENT(test_content_ro, const char content_ro_3);
  • testsuites/sptests/splinkersets01/splinkersets01.h

    re5fd901 r5c09e9d  
    11/*
    2  * Copyright (c) 2015 embedded brains GmbH.  All rights reserved.
     2 * Copyright (c) 2015, 2016 embedded brains GmbH.  All rights reserved.
    33 *
    44 *  embedded brains GmbH
     
    3838RTEMS_LINKER_ROSET_ITEM_DECLARE(test_ro, const int *, ca2);
    3939
    40 RTEMS_LINKER_RWSET_CONTENT(test_content_rw, extern int content_rw_1);
    41 RTEMS_LINKER_RWSET_CONTENT(test_content_rw, extern char content_rw_2);
    42 RTEMS_LINKER_RWSET_CONTENT(test_content_rw, extern char content_rw_3);
     40extern int content_rw_1;
     41extern char content_rw_2;
     42extern char content_rw_3;
    4343
    44 RTEMS_LINKER_ROSET_CONTENT(test_content_ro, extern const int content_ro_1);
    45 RTEMS_LINKER_ROSET_CONTENT(test_content_ro, extern const char content_ro_2);
    46 RTEMS_LINKER_ROSET_CONTENT(test_content_ro, extern const char content_ro_3);
     44extern const int content_ro_1;
     45extern const char content_ro_2;
     46extern const char content_ro_3;
    4747
    4848#ifdef __cplusplus
Note: See TracChangeset for help on using the changeset viewer.