aboutsummaryrefslogtreecommitdiff
path: root/math/math_config.h
diff options
context:
space:
mode:
authorSzabolcs Nagy <szabolcs.nagy@arm.com>2019-11-06 18:10:17 +0000
committerSzabolcs Nagy <szabolcs.nagy@arm.com>2019-11-06 18:10:17 +0000
commit17cd8af3201acd97fc348543be3c7fc651c2287a (patch)
tree56231a894276ebb1db405739bd3e7c02b4e9fed8 /math/math_config.h
parent9e6e14e2c8554c178af54f23151b54aa72d0271e (diff)
downloadarm-optimized-routines-17cd8af3201acd97fc348543be3c7fc651c2287a.tar.gz
math: fix unused variable warnings
Compilers (incorrectly) warn about unused volatile variables: math/math_config.h: In function 'force_eval_float': math/math_config.h:188:18: warning: unused variable 'y' [-Wunused-variable] silence them.
Diffstat (limited to 'math/math_config.h')
-rw-r--r--math/math_config.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/math/math_config.h b/math/math_config.h
index 1615230..c386ef3 100644
--- a/math/math_config.h
+++ b/math/math_config.h
@@ -66,6 +66,7 @@
#ifdef __GNUC__
# define HIDDEN __attribute__ ((__visibility__ ("hidden")))
# define NOINLINE __attribute__ ((noinline))
+# define UNUSED __attribute__ ((unused))
# define likely(x) __builtin_expect (!!(x), 1)
# define unlikely(x) __builtin_expect (x, 0)
# define strong_alias(f, a) \
@@ -75,6 +76,7 @@
#else
# define HIDDEN
# define NOINLINE
+# define UNUSED
# define likely(x) (x)
# define unlikely(x) (x)
#endif
@@ -213,12 +215,12 @@ opt_barrier_double (double x)
static inline void
force_eval_float (float x)
{
- volatile float y = x;
+ volatile float y UNUSED = x;
}
static inline void
force_eval_double (double x)
{
- volatile double y = x;
+ volatile double y UNUSED = x;
}
#endif