From dffa551e0c4801147f17acdb7734f954c097eca7 Mon Sep 17 00:00:00 2001 From: dim Date: Tue, 16 May 2017 18:54:25 +0000 Subject: 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 --- lib/msun/src/catrig.c | 2 +- lib/msun/src/catrigf.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/msun') 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)) -- cgit v1.1