From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 322553858CDA; Tue, 2 Apr 2024 15:59:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 322553858CDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1712073592; bh=sxJ5GndMWbFgyBo1/Yqup1xM17S7THWH7DYnwHw74xY=; h=From:To:Subject:Date:From; b=W6f/sAJPiYDZcvdRQWMYq2FDriu8jLk9eAz/pTczX2StLh+HvMZYPIdzKRaS3N7Hs YcSLjPU8T39q6P0KxhD476VbayJbnsX0LUxPFgEtqx5hpVYozBkh2hq15pHAmnAr8o ZM/YqRH0ju1TXNlfVLSXSYawEvr3uGxcH1xb23g4= 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: b37295d084d381a5f3595f6a8379739231c0ed20 X-Git-Newrev: c449401e8fa1a44003a051dfc9b15f1ca93eccbb Message-Id: <20240402155952.322553858CDA@sourceware.org> Date: Tue, 2 Apr 2024 15:59:52 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c449401e8fa1a44003a051dfc9b15f1ca93eccbb commit c449401e8fa1a44003a051dfc9b15f1ca93eccbb 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); }