diff options
author | Joel Sherrill <joel.sherrill@oarcorp.com> | 2015-03-20 17:56:08 -0500 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@oarcorp.com> | 2015-03-24 08:16:36 -0500 |
commit | 0d36bfb30e21c062f4cbdf40b0f1249624d1bc44 (patch) | |
tree | c0f815c5b1d40d87f2ed031b5313ee929abab25c | |
parent | sptests/spwatchdog/init.c: Avoid integer overflow (diff) | |
download | rtems-0d36bfb30e21c062f4cbdf40b0f1249624d1bc44.tar.bz2 |
rtems/score/tls.h: Add casts to eliminate warnings on some targets
-rw-r--r-- | cpukit/score/include/rtems/score/tls.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/cpukit/score/include/rtems/score/tls.h b/cpukit/score/include/rtems/score/tls.h index 139db7856c..51398a0a35 100644 --- a/cpukit/score/include/rtems/score/tls.h +++ b/cpukit/score/include/rtems/score/tls.h @@ -117,12 +117,18 @@ static inline uintptr_t _TLS_Get_allocation_size( static inline void *_TLS_Copy_and_clear( void *tls_area ) { - tls_area = memcpy( tls_area, _TLS_Data_begin, (size_t) _TLS_Data_size ); + tls_area = memcpy( + tls_area, + _TLS_Data_begin, + (size_t) ((uintptr_t)_TLS_Data_size) + ); + memset( - (char *) tls_area + (size_t) _TLS_BSS_begin - (size_t) _TLS_Data_begin, + (char *) tls_area + (size_t)((intptr_t) _TLS_BSS_begin) - + (size_t)((intptr_t) _TLS_Data_begin), 0, - (size_t) _TLS_BSS_size + ((size_t) (intptr_t)_TLS_BSS_size) ); return tls_area; |