Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Dec 2021 11:06:53 -0800
From:      enh via freebsd-numerics <freebsd-numerics@freebsd.org>
To:        freebsd-numerics@freebsd.org
Cc:        mmel@freebsd.org
Subject:   s_sincosl.c: remove unused variable
Message-ID:  <CAJgzZoqrBgxto5k5eeJ1nuPu=BHLk1MfE74KN4rQh%2BghV8ehyQ@mail.gmail.com>

index | next in thread | raw e-mail

[-- Attachment #1 --]
Newer versions of clang complain about this, and it seems genuinely unneeded.

It was in the original commit, and judging from that I think it's just
a copy & paste leftover from inlinine sinl() and cosl() --- the <
M_PI_4 case in sinl() needs the original sign.

(I've cc:ed the original author.)

diff --git a/lib/msun/src/s_sincosl.c b/lib/msun/src/s_sincosl.c
index aef36c2320b..3dd34575f89 100644
--- a/lib/msun/src/s_sincosl.c
+++ b/lib/msun/src/s_sincosl.c
@@ -50,11 +50,10 @@ void
 sincosl(long double x, long double *sn, long double *cs)
 {
  union IEEEl2bits z;
- int e0, sgn;
+ int e0;
  long double y[2];

  z.e = x;
- sgn = z.bits.sign;
  z.bits.sign = 0;

  ENTERV();

[-- Attachment #2 --]
diff --git a/lib/msun/src/s_sincosl.c b/lib/msun/src/s_sincosl.c
index aef36c2320b..3dd34575f89 100644
--- a/lib/msun/src/s_sincosl.c
+++ b/lib/msun/src/s_sincosl.c
@@ -50,11 +50,10 @@ void
 sincosl(long double x, long double *sn, long double *cs)
 {
 	union IEEEl2bits z;
-	int e0, sgn;
+	int e0;
 	long double y[2];
 
 	z.e = x;
-	sgn = z.bits.sign;
 	z.bits.sign = 0;
 
 	ENTERV();
home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJgzZoqrBgxto5k5eeJ1nuPu=BHLk1MfE74KN4rQh%2BghV8ehyQ>