From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 586493858C2D; Mon, 29 Jan 2024 18:03:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 586493858C2D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1706551424; bh=JrG+I0fDJEcL2+iFX6THbDadYLOFgWbjg25CoDY70eU=; h=From:To:Subject:Date:From; b=MCPqSh3dbkmZfMf8NCKProb2ebldl0mclm2bnEvx6D52d8xxdLcyNPIo7Yuq/REuq bsO1RBIrcSNIASzFPThpPnwKk865cTkYVCaKXBrafwdTzZSMnSlqcsgfFMjxHTpDkq Q3hzvMjogEQkH5U9njg6PPWrmTbHjVpN6b7+f9UU= 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: 7a94b19de524f6775ee28dc91fd11efa36a572b8 X-Git-Newrev: 57757a723f520bea5db03e546a956424c36769f4 Message-Id: <20240129180344.586493858C2D@sourceware.org> Date: Mon, 29 Jan 2024 18:03:44 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=57757a723f520bea5db03e546a956424c36769f4 commit 57757a723f520bea5db03e546a956424c36769f4 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); }