Created attachment 419290 [details, diff] Quiet down gcc warnings on MIPS due to -Wunused-but-set-variable With a recent gcc on a MIPS platform, uclibc's compile phase generates innumerable warnings due to the '-Wunused-but-set-variable' being active: CC libpthread/nptl_db/td_thr_setprio.oS In file included from ./include/atomic.h:51:0, from ./libpthread/nptl/sysdeps/unix/sysv/linux/mips/lowlevellock.h:26, from libpthread/nptl_db/../nptl/descr.h:30, from libpthread/nptl_db/../nptl/pthreadP.h:27, from libpthread/nptl_db/thread_dbP.h:31, from libpthread/nptl_db/td_thr_event_getmsg.c:21: ./libpthread/nptl/sysdeps/unix/sysv/linux/mips/lowlevellock.h: In function '__lll_cond_lock': ./include/bits/atomic.h:139:20: warning: variable '__prev' set but not used [-Wunused-but-set-variable] ({ __typeof (*mem) __prev; int __cmp; \ ^ ./include/atomic.h:75:23: note: in expansion of macro '__arch_compare_and_exchange_bool_8_int' __atg2_result = pre##_8_##post (mem, __VA_ARGS__); \ ^ ./include/bits/atomic.h:184:3: note: in expansion of macro '__atomic_bool_bysize' __atomic_bool_bysize (__arch_compare_and_exchange_bool, int, \ ^ ./libpthread/nptl/sysdeps/unix/sysv/linux/mips/lowlevellock.h:194:7: note: in expansion of macro 'atomic_compare_and_exchange_bool_acq' if (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0) ^ ./include/bits/atomic.h:144:20: warning: variable '__prev' set but not used [-Wunused-but-set-variable] ({ __typeof (*mem) __prev; int __cmp; \ ^ ./include/atomic.h:77:23: note: in expansion of macro '__arch_compare_and_exchange_bool_16_int' __atg2_result = pre##_16_##post (mem, __VA_ARGS__); \ ^ Quick check on Google found a patch which works well to quiet down these warnings so that the uclibc compile phase is cleaner, and proper errors can be more easily noticed: http://lists.uclibc.org/pipermail/uclibc/2014-January/048196.html I've re-diffed the patch due to some file offsets and attached it here.
considering the warnings are entirely harmless, this should just go upstream