From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 602DD3839816; Thu, 31 Mar 2022 19:04:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 602DD3839816 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: f9a126c3b605c22973444a3c142023d50812ad6c X-Git-Newrev: 22854742e74e7594c1fd6e036c46c4e55446ebc4 Message-Id: <20220331190444.602DD3839816@sourceware.org> Date: Thu, 31 Mar 2022 19:04:44 +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, 31 Mar 2022 19:04:44 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=22854742e74e7594c1fd6e036c46c4e55446ebc4 commit 22854742e74e7594c1fd6e036c46c4e55446ebc4 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) {