Browse Source

pthreads: remove some useless variables

Grissiom 11 years ago
parent
commit
1422569e7c

+ 0 - 3
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);
 

+ 1 - 1
components/pthreads/pthread_rwlock.c

@@ -101,7 +101,7 @@ int pthread_rwlock_destroy (pthread_rwlock_t *rwlock)
     {
         result = EBUSY;
 
-        return(EBUSY);
+        return result;
     }
     else
     {

+ 0 - 2
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);