changeset 18532:488df9d19f5e

(re_search_2): Cast result of POS_ADDR_VSTRING.
author Richard M. Stallman <rms@gnu.org>
date Wed, 02 Jul 1997 06:25:00 +0000
parents 35a263e545b3
children d9160fd77816
files src/regex.c
diffstat 1 files changed, 9 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/regex.c	Wed Jul 02 06:23:21 1997 +0000
+++ b/src/regex.c	Wed Jul 02 06:25:00 1997 +0000
@@ -3856,8 +3856,10 @@
 	  /* 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 @@
 	    }
 	  else
 	    {
-	  range--;
-	  startpos++;
-	}
+	      range--;
+	      startpos++;
+	    }
 	}
       else
 	{
@@ -3879,7 +3881,8 @@
 	  /* 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.  */