This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix "set but not used" warnings for X##_s in soft-fp


In soft-fp, the macro _FP_DECL declares one of the variables it
declares, X##_c, with __attribute__ ((unused)), since some users may
not use all three variables, but not another X##_s.  However,
unordsf2.c and unorddf2.c do not use this variable, resulting in "set
but not used" warnings for it.  This patch fixes these warnings
(tested powerpc-nofpu) by using the attribute on X##_s as well.

2012-12-05  Joseph Myers  <joseph@codesourcery.com>

	* soft-fp/op-common.h (_FP_DECL): Declare X##_s with __attribute__
	((unused)).

diff --git a/soft-fp/op-common.h b/soft-fp/op-common.h
index 12fb16e..8855ad3 100644
--- a/soft-fp/op-common.h
+++ b/soft-fp/op-common.h
@@ -29,8 +29,10 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#define _FP_DECL(wc, X)						\
-  _FP_I_TYPE X##_c __attribute__((unused)), X##_s, X##_e;	\
+#define _FP_DECL(wc, X)				\
+  _FP_I_TYPE X##_c __attribute__((unused));	\
+  _FP_I_TYPE X##_s __attribute__((unused));	\
+  _FP_I_TYPE X##_e;				\
   _FP_FRAC_DECL_##wc(X)
 
 /*

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]