From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 53D37385841A; Fri, 9 Feb 2024 17:33:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 53D37385841A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1707499992; bh=GhwUzbW5ZDYSznakIuzTGPKkQfDn3Fek3aMNI9feXrk=; h=From:To:Subject:Date:From; b=RiKTk7qc2FfHKZcTYRWWfSEI8YXE0ue8fin1xS/oBhgZr7Zv0VdAJ37mgsUCHAVSC BBq3nrPZDAGNIX8jMx3VHsRCYQXuTAfX7GR1oAvHQbvLqBHtcKX/nt1uXuXu+rQ9Po IMrZvZANfhhYnpkrGGUz1UI9QVznEG/cGA14wxXo= 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: f762c246042d5cd6ed5128c141a8fe90e0b1a4fd X-Git-Newrev: 9491140bd7c32a24e8620d4b00fe42537eb23338 Message-Id: <20240209173312.53D37385841A@sourceware.org> Date: Fri, 9 Feb 2024 17:33:12 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=9491140bd7c32a24e8620d4b00fe42537eb23338 commit 9491140bd7c32a24e8620d4b00fe42537eb23338 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 | 6 ++++++ 1 file changed, 6 insertions(+) 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 #include #include +#include +/* 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)