From: Richard M. Stallman Date: Wed, 2 Jul 1997 06:25:00 +0000 (+0000) Subject: (re_search_2): Cast result of POS_ADDR_VSTRING. X-Git-Tag: emacs-20.1~1414 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b560c39793615ec7357ed31c3119c0f4a8b69113;p=emacs.git (re_search_2): Cast result of POS_ADDR_VSTRING. --- 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. */