Date: Wed, 28 Sep 2016 14:48:35 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306409 - head/lib/msun/src Message-ID: <201609281448.u8SEmZEt095307@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: emaste Date: Wed Sep 28 14:48:34 2016 New Revision: 306409 URL: https://svnweb.freebsd.org/changeset/base/306409 Log: libm: fix some unused variable (rcsid) and dangling else warnings s_{fabs,fmax,logb,scalb}{,f,l}.c may be built elsewhere with a higher WARNS setting. Reviewed by: ed Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8061 Modified: head/lib/msun/src/s_fabs.c head/lib/msun/src/s_logbl.c head/lib/msun/src/s_scalbn.c head/lib/msun/src/s_scalbnf.c head/lib/msun/src/s_scalbnl.c Modified: head/lib/msun/src/s_fabs.c ============================================================================== --- head/lib/msun/src/s_fabs.c Wed Sep 28 14:13:41 2016 (r306408) +++ head/lib/msun/src/s_fabs.c Wed Sep 28 14:48:34 2016 (r306409) @@ -10,9 +10,8 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD$"; -#endif +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); /* * fabs(x) returns the absolute value of x. Modified: head/lib/msun/src/s_logbl.c ============================================================================== --- head/lib/msun/src/s_logbl.c Wed Sep 28 14:13:41 2016 (r306408) +++ head/lib/msun/src/s_logbl.c Wed Sep 28 14:48:34 2016 (r306409) @@ -10,9 +10,8 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD$"; -#endif +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); #include <float.h> #include <limits.h> Modified: head/lib/msun/src/s_scalbn.c ============================================================================== --- head/lib/msun/src/s_scalbn.c Wed Sep 28 14:13:41 2016 (r306408) +++ head/lib/msun/src/s_scalbn.c Wed Sep 28 14:48:34 2016 (r306409) @@ -10,9 +10,8 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD$"; -#endif +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); /* * scalbn (double x, int n) @@ -21,7 +20,6 @@ static char rcsid[] = "$FreeBSD$"; * exponentiation or a multiplication. */ -#include <sys/cdefs.h> #include <float.h> #include "math.h" @@ -51,10 +49,12 @@ scalbn (double x, int n) if (k > 0x7fe) return huge*copysign(huge,x); /* overflow */ if (k > 0) /* normal result */ {SET_HIGH_WORD(x,(hx&0x800fffff)|(k<<20)); return x;} - if (k <= -54) + if (k <= -54) { if (n > 50000) /* in case integer overflow in n+k */ return huge*copysign(huge,x); /*overflow*/ - else return tiny*copysign(tiny,x); /*underflow*/ + else + return tiny*copysign(tiny,x); /*underflow*/ + } k += 54; /* subnormal result */ SET_HIGH_WORD(x,(hx&0x800fffff)|(k<<20)); return x*twom54; Modified: head/lib/msun/src/s_scalbnf.c ============================================================================== --- head/lib/msun/src/s_scalbnf.c Wed Sep 28 14:13:41 2016 (r306408) +++ head/lib/msun/src/s_scalbnf.c Wed Sep 28 14:48:34 2016 (r306409) @@ -13,11 +13,8 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD$"; -#endif - #include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); #include "math.h" #include "math_private.h" @@ -46,10 +43,12 @@ scalbnf (float x, int n) if (k > 0xfe) return huge*copysignf(huge,x); /* overflow */ if (k > 0) /* normal result */ {SET_FLOAT_WORD(x,(ix&0x807fffff)|(k<<23)); return x;} - if (k <= -25) + if (k <= -25) { if (n > 50000) /* in case integer overflow in n+k */ return huge*copysignf(huge,x); /*overflow*/ - else return tiny*copysignf(tiny,x); /*underflow*/ + else + return tiny*copysignf(tiny,x); /*underflow*/ + } k += 25; /* subnormal result */ SET_FLOAT_WORD(x,(ix&0x807fffff)|(k<<23)); return x*twom25; Modified: head/lib/msun/src/s_scalbnl.c ============================================================================== --- head/lib/msun/src/s_scalbnl.c Wed Sep 28 14:13:41 2016 (r306408) +++ head/lib/msun/src/s_scalbnl.c Wed Sep 28 14:48:34 2016 (r306409) @@ -10,9 +10,8 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD$"; -#endif +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); /* * scalbnl (long double x, int n) @@ -27,7 +26,6 @@ static char rcsid[] = "$FreeBSD$"; * for scalbn(), so we don't use this routine. */ -#include <sys/cdefs.h> #include <float.h> #include <math.h> @@ -59,10 +57,12 @@ scalbnl (long double x, int n) if (k >= 0x7fff) return huge*copysignl(huge,x); /* overflow */ if (k > 0) /* normal result */ {u.bits.exp = k; return u.e;} - if (k <= -128) + if (k <= -128) { if (n > 50000) /* in case integer overflow in n+k */ return huge*copysign(huge,x); /*overflow*/ - else return tiny*copysign(tiny,x); /*underflow*/ + else + return tiny*copysign(tiny,x); /*underflow*/ + } k += 128; /* subnormal result */ u.bits.exp = k; return u.e*0x1p-128;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201609281448.u8SEmZEt095307>