From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 9617B3858416; Fri, 9 Feb 2024 17:38:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9617B3858416 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1707500295; bh=fvx3Xdt7OVeQ8nN9wt/gY8uU0RGmXZG5ahrX+yvIGrU=; h=From:To:Subject:Date:From; b=KSmz3nehiJsrk58L7rvSj6ZXFxdF/kA5kdzpwILHHn0GOnAjuqbSi3SRZZr+Tul/T qxHAnfp7EbRuvChYjgIsHDMJK+ZXLszNxPhkpt77bpNKIYrq08cAG95u3l0a5Sl2/2 x5OaARltyUC/ETenvA+yFeec+Fz+Jfb8reiHkR0g= 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] stdio: Fix clang warnings on tests X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/azanella/clang X-Git-Oldrev: 077a8b67db6299bb096314a85a2f62db8ec49ac4 X-Git-Newrev: 82918c893a2228b5b12aa7db18470b0238b9f14f Message-Id: <20240209173815.9617B3858416@sourceware.org> Date: Fri, 9 Feb 2024 17:38:15 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=82918c893a2228b5b12aa7db18470b0238b9f14f commit 82918c893a2228b5b12aa7db18470b0238b9f14f Author: Adhemerval Zanella Date: Thu Jul 27 15:27:08 2023 -0300 stdio: Fix clang warnings on tests clang does not support 'I' specifier and handles it as a 'length modifier'. Diff: --- stdio-common/tst-scanf-to_inpunct.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/stdio-common/tst-scanf-to_inpunct.c b/stdio-common/tst-scanf-to_inpunct.c index 6fc038f476..fab1a232b9 100644 --- a/stdio-common/tst-scanf-to_inpunct.c +++ b/stdio-common/tst-scanf-to_inpunct.c @@ -18,6 +18,7 @@ . */ #include +#include #include #include #include @@ -68,7 +69,11 @@ do_test (void) for (int i = 0; i < array_length (inputs); i++) { int n; + /* clang does not support 'I' specifier. */ + DIAG_PUSH_NEEDS_COMMENT_CLANG; + DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat"); sscanf (inputs[i].str, "%Id", &n); + DIAG_POP_NEEDS_COMMENT_CLANG; TEST_COMPARE (n, inputs[i].n); }