Changeset 4a7c6867 in rtems


Ignore:
Timestamp:
Oct 5, 2018, 7:37:44 AM (7 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
05b5f9c0
Parents:
1d39e96
git-author:
Sebastian Huber <sebastian.huber@…> (10/05/18 07:37:44)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/05/18 11:41:07)
Message:

Fix rbtree_postorder_for_each_entry_safe()

Use the non-standard typeof operator to avoid code generation errors
with clang and use of uninitialized variable warnings with GCC and
Coverity Scan.

Update #3465.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/include/linux/rbtree.h

    r1d39e96 r4a7c6867  
    127127    node = _RBTree_Postorder_first( \
    128128      (RBTree_Control *) root, \
    129       (size_t) ( (char *) &node->field - (char *) node ) \
     129      offsetof( __typeof__( *node ), field ) \
    130130    ); \
    131131    node != NULL && ( \
    132132      next = _RBTree_Postorder_next( \
    133133        &node->field, \
    134         (size_t) ( (char *) &node->field - (char *) node ) \
     134        offsetof( __typeof__( *node ), field ) \
    135135      ), \
    136136      node != NULL \
Note: See TracChangeset for help on using the changeset viewer.