[rtems commit] posix: Fix const qualifier warning

Sebastian Huber sebh at rtems.org
Thu Oct 12 05:20:20 UTC 2017


Module:    rtems
Branch:    master
Commit:    5850054098b08aa87501fe464a0e4764916a433b
Changeset: http://git.rtems.org/rtems/commit/?id=5850054098b08aa87501fe464a0e4764916a433b

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu Oct 12 07:18:28 2017 +0200

posix: Fix const qualifier warning

Update #2514.
Update #3179.

---

 cpukit/posix/src/pthreadattrdefault.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/cpukit/posix/src/pthreadattrdefault.c b/cpukit/posix/src/pthreadattrdefault.c
index efd6671..ca3c2c1 100644
--- a/cpukit/posix/src/pthreadattrdefault.c
+++ b/cpukit/posix/src/pthreadattrdefault.c
@@ -54,7 +54,9 @@ const pthread_attr_t _POSIX_Threads_Default_attributes = {
   .detachstate             = PTHREAD_CREATE_JOINABLE,    /* detachstate */
   .affinitysetsize         =
     sizeof( _POSIX_Threads_Default_attributes.affinitysetpreallocated ),
-  .affinityset             =
-    &_POSIX_Threads_Default_attributes.affinitysetpreallocated,
+  .affinityset             = RTEMS_DECONST(
+    cpu_set_t *,
+    &_POSIX_Threads_Default_attributes.affinitysetpreallocated
+  ),
   .affinitysetpreallocated = { { -1L } }
 };



More information about the vc mailing list