>From ee6b62007dcbf860f204fbc6921a4d0af74845c3 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 23 Sep 2020 19:04:01 -0700 Subject: [PATCH 4/5] grep: pacify Sun C 5.15 This suppresses a false alarm '"grep.c", line 720: warning: initializer will be sign-extended: -1'. * src/grep.c (uword_max): New static constant. (initialize_unibyte_mask): Use it. --- src/grep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/grep.c b/src/grep.c index 1a52c89..de7616a 100644 --- a/src/grep.c +++ b/src/grep.c @@ -684,6 +684,7 @@ clean_up_stdout (void) /* An unsigned type suitable for fast matching. */ typedef uintmax_t uword; +static uword const uword_max = UINTMAX_MAX; struct localeinfo localeinfo; @@ -717,7 +718,6 @@ initialize_unibyte_mask (void) /* Now MASK will detect any encoding-error byte, although it may cry wolf and it may not be optimal. Build a uword-length mask by repeating MASK. */ - uword uword_max = -1; unibyte_mask = uword_max / UCHAR_MAX * mask; } -- 2.17.1