diff options
| author | [email protected] <[email protected]> | 2012-02-19 09:12:39 +0000 |
|---|---|---|
| committer | [email protected] <[email protected]> | 2012-02-19 09:12:39 +0000 |
| commit | 9d61fc32c8737198f2bca1de984917e074361671 (patch) | |
| tree | 5361a1271c2cf9296cec21f48bd1ff627c798380 | |
| parent | 3fd6fd1f050e05369f9406ab6a94721a4ea8eb94 (diff) | |
fix compiling warning.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1971 bbd45198-f89e-11dd-88c7-29a3b14d5316
| -rw-r--r-- | components/pthreads/pthread_tls.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/components/pthreads/pthread_tls.c b/components/pthreads/pthread_tls.c index 0fda158a39..c01840df59 100644 --- a/components/pthreads/pthread_tls.c +++ b/components/pthreads/pthread_tls.c @@ -31,7 +31,10 @@ int pthread_setspecific(pthread_key_t key, const void *value) RT_ASSERT(ptd != NULL);
/* check tls area */
- if (ptd->tls == NULL) ptd->tls = rt_malloc(sizeof(void*) * PTHREAD_KEY_MAX);
+ if (ptd->tls == NULL)
+ {
+ ptd->tls = (void**)rt_malloc(sizeof(void*) * PTHREAD_KEY_MAX);
+ }
if ((key < PTHREAD_KEY_MAX) && _thread_keys[key].is_used)
{
|
