From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id F39323830B7F; Thu, 28 Sep 2023 17:58:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F39323830B7F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1695923905; bh=Eb3MEBt59lrGTAMJJRKAZIDehkGSsb0yDpxI+jV+WKs=; h=From:To:Subject:Date:From; b=roIlVanK2wC4KQXrMjpyfA3umYPp7LGpzfzuN0iLPMpZT4J+766sWbHlEinJ7zGS6 fimKdlrVYmLko2uMFOB3XqWWl38SUg9H1+ByOQwuGyXIB46vSh0JD/G/yGH8xyhXRv EQqGHQJ6TOASjeVTc7XAOwMWCWAi+wuNiN6NNTSU= 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: f30faf85fcf0b8084f4901e44f34c292cb5dc492 X-Git-Newrev: 004d3b3617451b7ba264a23a0ea95502e58cfa0b Message-Id: <20230928175824.F39323830B7F@sourceware.org> Date: Thu, 28 Sep 2023 17:58:24 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=004d3b3617451b7ba264a23a0ea95502e58cfa0b commit 004d3b3617451b7ba264a23a0ea95502e58cfa0b 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 32236ac2dc..69508f26d7 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); }