aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-03-15 15:33:02 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-02-09 10:29:18 -0300
commit9491140bd7c32a24e8620d4b00fe42537eb23338 (patch)
tree0a0ce68b96b87fecf7c2d3132277118a1b606736
parentf762c246042d5cd6ed5128c141a8fe90e0b1a4fd (diff)
downloadglibc-9491140bd7c32a24e8620d4b00fe42537eb23338.tar
glibc-9491140bd7c32a24e8620d4b00fe42537eb23338.tar.gz
glibc-9491140bd7c32a24e8620d4b00fe42537eb23338.tar.bz2
glibc-9491140bd7c32a24e8620d4b00fe42537eb23338.zip
math: Fix clang warnings for math/test-tgmath-ret.c
clang warns that since the global variables are only used to function calls (without being actually used), there are not needed and will not be emitted.
-rw-r--r--math/test-tgmath-ret.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/math/test-tgmath-ret.c b/math/test-tgmath-ret.c
index 36dc132e4f..71f36d39fa 100644
--- a/math/test-tgmath-ret.c
+++ b/math/test-tgmath-ret.c
@@ -21,13 +21,19 @@
#include <tgmath.h>
#include <stdint.h>
#include <stdio.h>
+#include <libc-diag.h>
+/* clang warns the global variables are not needed and will not be emitted.
+ However there are used on the CHECK_RET_* macros. */
+DIAG_PUSH_NEEDS_COMMENT_CLANG;
+DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wunneeded-internal-declaration");
static float fx;
static double dx;
static long double lx;
static int rm = FP_INT_UPWARD;
static unsigned int width = 64;
static int errors = 0;
+DIAG_POP_NEEDS_COMMENT_CLANG;
static void
our_error (const char *c)