From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 988D83888C4D; Thu, 12 May 2022 19:36:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 988D83888C4D 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 for tst-unlockedio X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/azanella/clang X-Git-Oldrev: 9c911277c3636c5427cb056640733cb92c020684 X-Git-Newrev: 63397406220bb06a4ff7775a9ae234a6754dc586 Message-Id: <20220512193613.988D83888C4D@sourceware.org> Date: Thu, 12 May 2022 19:36:13 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 May 2022 19:36:13 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=63397406220bb06a4ff7775a9ae234a6754dc586 commit 63397406220bb06a4ff7775a9ae234a6754dc586 Author: Adhemerval Zanella Date: Thu Mar 24 16:03:16 2022 -0300 stdio: Fix clang warnings for tst-unlockedio Diff: --- stdio-common/tst-unlockedio.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stdio-common/tst-unlockedio.c b/stdio-common/tst-unlockedio.c index 83b3e5594a..6f109ba330 100644 --- a/stdio-common/tst-unlockedio.c +++ b/stdio-common/tst-unlockedio.c @@ -51,6 +51,9 @@ do_test (void) fread_unlocked below as well. */ DIAG_PUSH_NEEDS_COMMENT; DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdiv-by-zero"); + /* clang warns about the implicit conversion from double to size_t, + which is required by this tests. */ + DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wliteral-conversion"); if (ftello (fp) != 0 || fwrite_unlocked (blah, blah - blah, strlen (blah), f++) != 0 || f != fp + 1 @@ -104,6 +107,7 @@ do_test (void) /* See explanation above. */ DIAG_PUSH_NEEDS_COMMENT; DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdiv-by-zero"); + DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wliteral-conversion"); if (ftello (fp) != 0 || fread_unlocked (buf, buf - buf, strlen (blah), f++) != 0 || f != fp + 1