[rtems commit] posix: Use RTEMS_DECONST()
Sebastian Huber
sebh at rtems.org
Mon Sep 8 06:46:32 UTC 2014
Module: rtems
Branch: master
Commit: 05ac47d75e4d945c0c30922260c8bbf1922cdd0f
Changeset: http://git.rtems.org/rtems/commit/?id=05ac47d75e4d945c0c30922260c8bbf1922cdd0f
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Fri Sep 5 09:13:46 2014 +0200
posix: Use RTEMS_DECONST()
---
cpukit/posix/include/rtems/posix/key.h | 2 +-
cpukit/posix/src/keysetspecific.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/cpukit/posix/include/rtems/posix/key.h b/cpukit/posix/include/rtems/posix/key.h
index 7cc179c..6e52544 100644
--- a/cpukit/posix/include/rtems/posix/key.h
+++ b/cpukit/posix/include/rtems/posix/key.h
@@ -68,7 +68,7 @@ typedef struct {
/**
* @brief The thread specific POSIX key value.
*/
- const void *value;
+ void *value;
} POSIX_Keys_Key_value_pair;
/**
diff --git a/cpukit/posix/src/keysetspecific.c b/cpukit/posix/src/keysetspecific.c
index ee85ac2..8e4b3a4 100644
--- a/cpukit/posix/src/keysetspecific.c
+++ b/cpukit/posix/src/keysetspecific.c
@@ -49,7 +49,7 @@ int pthread_setspecific(
p = _POSIX_Keys_Find( key, executing, &search_node );
if ( p != NULL ) {
value_pair_ptr = POSIX_KEYS_RBTREE_NODE_TO_KEY_VALUE_PAIR( p );
- value_pair_ptr->value = value;
+ value_pair_ptr->value = RTEMS_DECONST( void *, value );
} else {
value_pair_ptr = _POSIX_Keys_Key_value_pair_allocate();
@@ -61,7 +61,7 @@ int pthread_setspecific(
value_pair_ptr->key = key;
value_pair_ptr->thread = executing;
- value_pair_ptr->value = value;
+ value_pair_ptr->value = RTEMS_DECONST( void *, value );
/* The insert can only go wrong if the same node is already in a unique
* tree. This has been already checked with the _RBTree_Find() */
_RBTree_Insert(
More information about the vc
mailing list