From b560c39793615ec7357ed31c3119c0f4a8b69113 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 2 Jul 1997 06:25:00 +0000 Subject: [PATCH] (re_search_2): Cast result of POS_ADDR_VSTRING. --- src/regex.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/regex.c b/src/regex.c index d30a922abdf..6a45db69b8f 100644 --- a/src/regex.c +++ b/src/regex.c @@ -3856,8 +3856,10 @@ re_search_2 (bufp, string1, size1, string2, size2, startpos, range, regs, stop) /* Update STARTPOS to the next character boundary. */ if (multibyte) { - const unsigned char *p = POS_ADDR_VSTRING (startpos); - const unsigned char *pend = STOP_ADDR_VSTRING (startpos); + const unsigned char *p + = (const unsigned char *) POS_ADDR_VSTRING (startpos); + const unsigned char *pend + = (const unsigned char *) STOP_ADDR_VSTRING (startpos); int len = MULTIBYTE_FORM_LENGTH (p, pend - p); range -= len; @@ -3867,9 +3869,9 @@ re_search_2 (bufp, string1, size1, string2, size2, startpos, range, regs, stop) } else { - range--; - startpos++; - } + range--; + startpos++; + } } else { @@ -3879,7 +3881,8 @@ re_search_2 (bufp, string1, size1, string2, size2, startpos, range, regs, stop) /* Update STARTPOS to the previous character boundary. */ if (multibyte) { - const unsigned char *p = POS_ADDR_VSTRING (startpos); + const unsigned char *p + = (const unsigned char *) POS_ADDR_VSTRING (startpos); int len = 0; /* Find the head of multibyte form. */ -- 2.39.2