From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 549013856DC8; Tue, 10 May 2022 18:22:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 549013856DC8 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 -Wtautological-constant-out-of-range-compare on clang X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/azanella/clang X-Git-Oldrev: c1f72ba4974965dc0f0701011559bb567409b2c9 X-Git-Newrev: b5b3827cf0c9af1cc27e5b3455e15c1f95846421 Message-Id: <20220510182211.549013856DC8@sourceware.org> Date: Tue, 10 May 2022 18:22:11 +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: Tue, 10 May 2022 18:22:11 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=b5b3827cf0c9af1cc27e5b3455e15c1f95846421 commit b5b3827cf0c9af1cc27e5b3455e15c1f95846421 Author: Adhemerval Zanella Date: Wed Mar 9 15:57:17 2022 -0300 stdio: Fix -Wtautological-constant-out-of-range-compare on clang Diff: --- stdio-common/vfprintf-internal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdio-common/vfprintf-internal.c b/stdio-common/vfprintf-internal.c index 59bd76c890..76b89d5d65 100644 --- a/stdio-common/vfprintf-internal.c +++ b/stdio-common/vfprintf-internal.c @@ -1878,7 +1878,7 @@ printf_positional (FILE *s, const CHAR_T *format, int readonly_format, extern printf_function **__printf_function_table; int function_done; - if (spec <= UCHAR_MAX + if ((int) spec <= UCHAR_MAX && __printf_function_table != NULL && __printf_function_table[(size_t) spec] != NULL) {