OSDN Git Service

mips: silence 'set but not used' warnings
authorSteve Ellcey <sellcey@mips.com>
Wed, 29 Jan 2014 17:54:34 +0000 (09:54 -0800)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Sun, 2 Feb 2014 20:35:24 +0000 (21:35 +0100)
This patch uses 'attribute_unused' to clean up a number of warnings
messages that are generated when doing a MIPS build.  All of the
changes are in MIPS specific files and there are no code changes
other then adding the unused attribute where needed.

Signed-off-by: Steve Ellcey <sellcey@mips.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
libc/sysdeps/linux/mips/bits/atomic.h
libc/sysdeps/linux/mips/bits/syscalls.h
libc/sysdeps/linux/mips/sysdep.h
libpthread/nptl/sysdeps/mips/tls.h

index 9a9f60f..60ee0a6 100644 (file)
@@ -135,22 +135,22 @@ typedef uintmax_t uatomic_max_t;
 /* For all "bool" routines, we return FALSE if exchange succesful.  */
 
 #define __arch_compare_and_exchange_bool_8_int(mem, new, old, rel, acq)        \
-({ __typeof (*mem) __prev; int __cmp;                                  \
+({ __typeof (*mem) __prev attribute_unused; int __cmp;         \
    __arch_compare_and_exchange_xxx_8_int(mem, new, old, rel, acq);     \
    !__cmp; })
 
 #define __arch_compare_and_exchange_bool_16_int(mem, new, old, rel, acq) \
-({ __typeof (*mem) __prev; int __cmp;                                  \
+({ __typeof (*mem) __prev attribute_unused; int __cmp;         \
    __arch_compare_and_exchange_xxx_16_int(mem, new, old, rel, acq);    \
    !__cmp; })
 
 #define __arch_compare_and_exchange_bool_32_int(mem, new, old, rel, acq) \
-({ __typeof (*mem) __prev; int __cmp;                                  \
+({ __typeof (*mem) __prev attribute_unused; int __cmp;         \
    __arch_compare_and_exchange_xxx_32_int(mem, new, old, rel, acq);    \
    !__cmp; })
 
 #define __arch_compare_and_exchange_bool_64_int(mem, new, old, rel, acq) \
-({ __typeof (*mem) __prev; int __cmp;                                  \
+({ __typeof (*mem) __prev attribute_unused; int __cmp;         \
    __arch_compare_and_exchange_xxx_64_int(mem, new, old, rel, acq);    \
    !__cmp; })
 
@@ -158,22 +158,22 @@ typedef uintmax_t uatomic_max_t;
    successful or not.  */
 
 #define __arch_compare_and_exchange_val_8_int(mem, new, old, rel, acq) \
-({ __typeof (*mem) __prev; int __cmp;                                  \
+({ __typeof (*mem) __prev attribute_unused; int __cmp;         \
    __arch_compare_and_exchange_xxx_8_int(mem, new, old, rel, acq);     \
    (__typeof (*mem))__prev; })
 
 #define __arch_compare_and_exchange_val_16_int(mem, new, old, rel, acq) \
-({ __typeof (*mem) __prev; int __cmp;                                  \
+({ __typeof (*mem) __prev attribute_unused; int __cmp;         \
    __arch_compare_and_exchange_xxx_16_int(mem, new, old, rel, acq);    \
    (__typeof (*mem))__prev; })
 
 #define __arch_compare_and_exchange_val_32_int(mem, new, old, rel, acq) \
-({ __typeof (*mem) __prev; int __cmp;                                  \
+({ __typeof (*mem) __prev attribute_unused; int __cmp;         \
    __arch_compare_and_exchange_xxx_32_int(mem, new, old, rel, acq);    \
    (__typeof (*mem))__prev; })
 
 #define __arch_compare_and_exchange_val_64_int(mem, new, old, rel, acq) \
-({ __typeof (*mem) __prev; int __cmp;                                  \
+({ __typeof (*mem) __prev attribute_unused; int __cmp;         \
    __arch_compare_and_exchange_xxx_64_int(mem, new, old, rel, acq);    \
    (__typeof (*mem))__prev; })
 
index 944d038..787bb7d 100644 (file)
@@ -29,7 +29,7 @@
        }                                                               \
      result_var; })
 
-#define INTERNAL_SYSCALL_DECL(err) long err
+#define INTERNAL_SYSCALL_DECL(err) long err attribute_unused
 
 #define INTERNAL_SYSCALL_ERROR_P(val, err)   ((long) (err))
 
index 46b6c53..b6d4f10 100644 (file)
@@ -144,7 +144,7 @@ L(syse1):
      result_var; })
 
 #undef INTERNAL_SYSCALL_DECL
-#define INTERNAL_SYSCALL_DECL(err) long err
+#define INTERNAL_SYSCALL_DECL(err) long err attribute_unused
 
 #undef INTERNAL_SYSCALL_ERROR_P
 #define INTERNAL_SYSCALL_ERROR_P(val, err)   ((long) (err))
index c522f21..09baf12 100644 (file)
@@ -120,7 +120,7 @@ typedef struct
    operation can cause a failure 'errno' must not be touched.  */
 # define TLS_INIT_TP(tcbp, secondcall) \
   ({ INTERNAL_SYSCALL_DECL (err);                                      \
-     long result_var;                                                  \
+     long result_var attribute_unused;                                 \
      result_var = INTERNAL_SYSCALL (set_thread_area, err, 1,           \
                                    (char *) (tcbp) + TLS_TCB_OFFSET);  \
      INTERNAL_SYSCALL_ERROR_P (result_var, err)                                \