From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 8D39C3858417; Tue, 15 Mar 2022 18:37:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8D39C3858417 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: 40c8a0213ccc0970707f2322572564bd7d9ba3ac X-Git-Newrev: 8cf3da8d75a819aad893f8cc644dd05a9d2bf073 Message-Id: <20220315183749.8D39C3858417@sourceware.org> Date: Tue, 15 Mar 2022 18:37:49 +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, 15 Mar 2022 18:37:49 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8cf3da8d75a819aad893f8cc644dd05a9d2bf073 commit 8cf3da8d75a819aad893f8cc644dd05a9d2bf073 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) {