From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id 64DEA385783F; Thu, 16 Mar 2023 12:55:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 64DEA385783F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1678971306; bh=ptKOVU4efNtLIeLELcebfOQ/a5FRlyVEgRwHXo1olU4=; h=From:To:Subject:Date:From; b=B0kDk5dJjWIEpXCNG3brXP4/wYrDItcFQ1vimbyqp9ZTqZf21vL2KUJpbM6Yliim0 uDRcmv0UsOovbQMeDYTzG20YyqeurU7jQBx4wt4nZ/HN2xqDw1nBgASWw92mm0pc3U XzNkpp6A5oxJ6qED9Pqs/5hRzeKgVjGzNLOIExvg= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Corinna Vinschen To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin/main] Cygwin: regex: NONCHAR: re-add cast to int X-Act-Checkin: newlib-cygwin X-Git-Author: Corinna Vinschen X-Git-Refname: refs/heads/main X-Git-Oldrev: 0bdc764b421b56ac2961ce54f538d4a71f38b724 X-Git-Newrev: 2285cf0d1ccd783cedc46463fe5c7cc55c6e29a4 Message-Id: <20230316125506.64DEA385783F@sourceware.org> Date: Thu, 16 Mar 2023 12:55:06 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D2285cf0d1cc= d783cedc46463fe5c7cc55c6e29a4 commit 2285cf0d1ccd783cedc46463fe5c7cc55c6e29a4 Author: Corinna Vinschen AuthorDate: Thu Mar 16 13:47:07 2023 +0100 Commit: Corinna Vinschen CommitDate: Thu Mar 16 13:47:10 2023 +0100 Cygwin: regex: NONCHAR: re-add cast to int =20 wint_t is unsigned int and the test checks for a negative value. Thus, it's optimized out by gcc. Add the cast from commit 44caccfca2433 to avoid this. =20 Signed-off-by: Corinna Vinschen Diff: --- winsup/cygwin/regex/engine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/regex/engine.c b/winsup/cygwin/regex/engine.c index 77e7007bb1fa..5e12ab7f3735 100644 --- a/winsup/cygwin/regex/engine.c +++ b/winsup/cygwin/regex/engine.c @@ -119,7 +119,7 @@ static states step(struct re_guts *g, sopno start, sopn= o stop, states bef, wint_ #define EOW (BOL-5) #define BADCHAR (BOL-6) #define NWBND (BOL-7) -#define NONCHAR(c) ((c) <=3D OUT) +#define NONCHAR(c) ((int)(c) <=3D OUT) /* sflags */ #define SBOS 0x0001 #define SEOS 0x0002