From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 7466B3947C1E; Wed, 16 Mar 2022 18:05:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7466B3947C1E Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc/azanella/clang] math: Fix clang warnings for math/test-tgmath-ret.c X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/azanella/clang X-Git-Oldrev: 246593c91ec62e4f1109c409874d737eaba9dbe8 X-Git-Newrev: 91b1c05a2f512e5ae897b09f73ec1c88ef221f12 Message-Id: <20220316180503.7466B3947C1E@sourceware.org> Date: Wed, 16 Mar 2022 18:05:03 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Mar 2022 18:05:03 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=91b1c05a2f512e5ae897b09f73ec1c88ef221f12 commit 91b1c05a2f512e5ae897b09f73ec1c88ef221f12 Author: Adhemerval Zanella Date: Tue Mar 15 15:33:02 2022 -0300 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. Diff: --- math/test-tgmath-ret.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/math/test-tgmath-ret.c b/math/test-tgmath-ret.c index 8c1cce37bd..acfb6e66e8 100644 --- a/math/test-tgmath-ret.c +++ b/math/test-tgmath-ret.c @@ -21,13 +21,20 @@ #include #include #include +#include +/* 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. */ +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)