From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id A2D7D385780C; Mon, 4 Apr 2022 12:52:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A2D7D385780C 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: 36c3237a05a982ee42add57970857ff1addbd996 X-Git-Newrev: 470bac73eace7dee7b3c1b24abb69e64527ce933 Message-Id: <20220404125221.A2D7D385780C@sourceware.org> Date: Mon, 4 Apr 2022 12:52:21 +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: Mon, 04 Apr 2022 12:52:21 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=470bac73eace7dee7b3c1b24abb69e64527ce933 commit 470bac73eace7dee7b3c1b24abb69e64527ce933 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) {