This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Fix set-but-not-used warnings in ldbl-128 nearbyintl, rintl
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: <libc-alpha at sourceware dot org>
- Date: Tue, 20 Nov 2012 03:12:56 +0000
- Subject: Fix set-but-not-used warnings in ldbl-128 nearbyintl, rintl
The ldbl-128 versions of nearybintl and rintl define variables i1 for
output use by the GET_LDOUBLE_WORDS64 macro. Nothing then uses the
values that macro puts in those variables, resulting in
set-but-not-used warnings.
This patch marks those variables with __attribute__ ((unused)), as
used for various similar cases. Tested on MIPS that this does
eliminate those warnings.
2012-11-20 Joseph Myers <joseph@codesourcery.com>
* sysdeps/ieee754/ldbl-128/s_nearbyintl.c (__nearbyintl): Mark
variable I1 with __attribute__ ((unused)).
* sysdeps/ieee754/ldbl-128/s_rintl.c (__rintl): Likewise.
diff --git a/sysdeps/ieee754/ldbl-128/s_nearbyintl.c b/sysdeps/ieee754/ldbl-128/s_nearbyintl.c
index b335adc..d2afc10 100644
--- a/sysdeps/ieee754/ldbl-128/s_nearbyintl.c
+++ b/sysdeps/ieee754/ldbl-128/s_nearbyintl.c
@@ -37,7 +37,7 @@ long double __nearbyintl(long double x)
{
fenv_t env;
int64_t i0,j0,sx;
- u_int64_t i1;
+ u_int64_t i1 __attribute__ ((unused));
long double w,t;
GET_LDOUBLE_WORDS64(i0,i1,x);
sx = (((u_int64_t)i0)>>63);
diff --git a/sysdeps/ieee754/ldbl-128/s_rintl.c b/sysdeps/ieee754/ldbl-128/s_rintl.c
index 088d3c4..ae2142b 100644
--- a/sysdeps/ieee754/ldbl-128/s_rintl.c
+++ b/sysdeps/ieee754/ldbl-128/s_rintl.c
@@ -39,7 +39,7 @@ TWO112[2]={
long double __rintl(long double x)
{
int64_t i0,j0,sx;
- u_int64_t i1;
+ u_int64_t i1 __attribute__ ((unused));
long double w,t;
GET_LDOUBLE_WORDS64(i0,i1,x);
sx = (((u_int64_t)i0)>>63);
--
Joseph S. Myers
joseph@codesourcery.com