aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-03-15 15:33:02 -0300
committerH.J. Lu <hjl.tools@gmail.com>2024-12-22 17:40:33 +0800
commit03962d17c946ee6ca2a75bb2ed05b9402de07132 (patch)
tree01345587893dadd372d46f750360eac7f4638c1c
parent27a4b6421f488753aab982dfa2b873498fe58fa2 (diff)
downloadglibc-03962d17c946ee6ca2a75bb2ed05b9402de07132.zip
glibc-03962d17c946ee6ca2a75bb2ed05b9402de07132.tar.gz
glibc-03962d17c946ee6ca2a75bb2ed05b9402de07132.tar.bz2
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), they are not needed and will not be emitted. Signed-off-by: H.J. Lu <hjl.tools@gmail.com> Reviewed-by: Sam James <sam@gentoo.org>
-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 36dc132..44b285c 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 they 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)