diff options
author | dim <dim@FreeBSD.org> | 2017-05-16 18:54:25 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2017-05-16 18:54:25 +0000 |
commit | 875a71d5915ab9689d47c22c62687b4a7c0ff39a (patch) | |
tree | b1a571eb60fa6508f88b121cda6f545000be9bb9 /lib/msun/src | |
parent | c44273db25c27e5c888f8dbfa3d4499d4a768bc4 (diff) | |
download | FreeBSD-src-875a71d5915ab9689d47c22c62687b4a7c0ff39a.zip FreeBSD-src-875a71d5915ab9689d47c22c62687b4a7c0ff39a.tar.gz |
MFC r318259:
Silence a -Wunused warning about the junk variable being used to raise
an inexact floating point exception. The variable cannot be eliminated,
unfortunately, otherwise the desired addition triggering the exception
will be emitted neither by clang, nor by gcc.
Reviewed by: Steve Kargl, bde
Diffstat (limited to 'lib/msun/src')
-rw-r--r-- | lib/msun/src/catrig.c | 2 | ||||
-rw-r--r-- | lib/msun/src/catrigf.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/msun/src/catrig.c b/lib/msun/src/catrig.c index c0f5f55..f392862 100644 --- a/lib/msun/src/catrig.c +++ b/lib/msun/src/catrig.c @@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$"); #define isinf(x) (fabs(x) == INFINITY) #undef isnan #define isnan(x) ((x) != (x)) -#define raise_inexact() do { volatile float junk = 1 + tiny; } while(0) +#define raise_inexact() do { volatile float junk __unused = 1 + tiny; } while(0) #undef signbit #define signbit(x) (__builtin_signbit(x)) diff --git a/lib/msun/src/catrigf.c b/lib/msun/src/catrigf.c index ca84ce2..3067d31 100644 --- a/lib/msun/src/catrigf.c +++ b/lib/msun/src/catrigf.c @@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$"); #define isinf(x) (fabsf(x) == INFINITY) #undef isnan #define isnan(x) ((x) != (x)) -#define raise_inexact() do { volatile float junk = 1 + tiny; } while(0) +#define raise_inexact() do { volatile float junk __unused = 1 + tiny; } while(0) #undef signbit #define signbit(x) (__builtin_signbitf(x)) |