From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 86AD2385C424; Thu, 21 Dec 2023 19:00:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 86AD2385C424 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1703185211; bh=IBy8n+ZbeRBSyxNka9PW9MLJGJpRfdkmdC5DA7m2lbg=; h=From:To:Subject:Date:From; b=IHvWDdEQbQRYDL/CYijGo6B5PHToOa642D41RPHeyeQ02TxmOEG7+79UScI+nsY8p iUI320KPX+kLOtiwQuzSy5DeahpscD7N4i5Pw5Mo2U0HtbiYiIgvq8LNV3ZmDhCLTt 3ahWhWzvY+KfY/2FfG+xzaZyfoA9OyZYlJwIm8+E= 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: a7d85e239873c3c4d0834cd1e4447054167a3fb9 X-Git-Newrev: 48ed7fb56d40009367e99f053d1f062f9b8415e1 Message-Id: <20231221190011.86AD2385C424@sourceware.org> Date: Thu, 21 Dec 2023 19:00:11 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=48ed7fb56d40009367e99f053d1f062f9b8415e1 commit 48ed7fb56d40009367e99f053d1f062f9b8415e1 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); }