diff options
| author | Grissiom <[email protected]> | 2014-04-12 16:54:20 +0800 |
|---|---|---|
| committer | Grissiom <[email protected]> | 2014-04-12 16:54:20 +0800 |
| commit | 1422569e7cae6d7d6cef64e60ac3afe12b53f617 (patch) | |
| tree | 20911135856fa989bb5dfa06028ef1243df92a8f /components | |
| parent | 4b7e9c6447d32aa403020d7731eee19a7e27119f (diff) | |
pthreads: remove some useless variables
Diffstat (limited to 'components')
| -rw-r--r-- | components/pthreads/mqueue.c | 3 | ||||
| -rw-r--r-- | components/pthreads/pthread_rwlock.c | 2 | ||||
| -rw-r--r-- | components/pthreads/semaphore.c | 2 |
3 files changed, 1 insertions, 6 deletions
diff --git a/components/pthreads/mqueue.c b/components/pthreads/mqueue.c index 7b669dc367..c1303ae6b1 100644 --- a/components/pthreads/mqueue.c +++ b/components/pthreads/mqueue.c @@ -119,7 +119,6 @@ mqd_t mq_open(const char *name, int oflag, ...) { mqd_t mqdes; va_list arg; - mode_t mode; struct mq_attr *attr = RT_NULL; /* lock posix mqueue list */ @@ -129,8 +128,6 @@ mqd_t mq_open(const char *name, int oflag, ...) if (oflag & O_CREAT) { va_start(arg, oflag); - mode = (mode_t)va_arg(arg, unsigned int); - mode = mode; attr = (struct mq_attr *)va_arg(arg, struct mq_attr *); va_end(arg); diff --git a/components/pthreads/pthread_rwlock.c b/components/pthreads/pthread_rwlock.c index 968c82b89f..3e009034cc 100644 --- a/components/pthreads/pthread_rwlock.c +++ b/components/pthreads/pthread_rwlock.c @@ -101,7 +101,7 @@ int pthread_rwlock_destroy (pthread_rwlock_t *rwlock) { result = EBUSY; - return(EBUSY); + return result; } else { diff --git a/components/pthreads/semaphore.c b/components/pthreads/semaphore.c index ae69e0d1bc..726246c95f 100644 --- a/components/pthreads/semaphore.c +++ b/components/pthreads/semaphore.c @@ -224,7 +224,6 @@ sem_t *sem_open(const char *name, int oflag, ...) { sem_t* sem; va_list arg; - mode_t mode; unsigned int value; sem = RT_NULL; @@ -234,7 +233,6 @@ sem_t *sem_open(const char *name, int oflag, ...) if (oflag & O_CREAT) { va_start(arg, oflag); - mode = (mode_t) va_arg( arg, unsigned int); mode = mode; value = va_arg( arg, unsigned int); va_end(arg); |
