summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2020-09-23 19:04:01 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2020-09-23 19:56:24 -0700
commitadc03b4563b7c9380bc016b2921ffadd4917a228 (patch)
treea8f41c181529d6d52e2e7916aed1894f59afe870 /src
parent016e590a8198009bce0e1078f6d4c7e037e2df3c (diff)
downloadgrep-adc03b4563b7c9380bc016b2921ffadd4917a228.tar.gz
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.
Diffstat (limited to 'src')
-rw-r--r--src/grep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/grep.c b/src/grep.c
index 1a52c898..de7616a0 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;
}