From: Adhemerval Zanella Date: Tue, 15 Mar 2022 18:33:02 +0000 (-0300) Subject: math: Fix clang warnings for math/test-tgmath-ret.c X-Git-Tag: glibc-2.41~235 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=03962d17c946ee6ca2a75bb2ed05b9402de07132;p=thirdparty%2Fglibc.git 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 Reviewed-by: Sam James --- diff --git a/math/test-tgmath-ret.c b/math/test-tgmath-ret.c index 36dc132e4f..44b285ccff 100644 --- a/math/test-tgmath-ret.c +++ b/math/test-tgmath-ret.c @@ -21,13 +21,19 @@ #include #include #include +#include +/* 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)