Namazu-devel-ja(旧)


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: regex.c



>                                            千葉市中央区長洲
>                                                    藤原  誠

| regex.c: In function `nmz_re_compile_pattern':
| regex.c:1715: warning: subscript has type `char'
| regex.c:1717: warning: subscript has type `char'
| regex.c:1717: warning: subscript has type `char'
| regex.c:2238: warning: subscript has type `char'
| regex.c:2240: warning: subscript has type `char'
| regex.c:2240: warning: subscript has type `char'

こんな変更をしたくなっています。

Index: nmz/regex.c
===================================================================
RCS file: /storage/cvsroot/namazu/nmz/regex.c,v
retrieving revision 1.5.8.5
diff -u -r1.5.8.5 regex.c
--- nmz/regex.c	4 Feb 2002 04:15:31 -0000	1.5.8.5
+++ nmz/regex.c	22 Jul 2003 03:20:15 -0000
@@ -1712,9 +1712,9 @@
       while ((int)b[-1] > 0 && b[b[-1] - 1] == 0) 
 	b[-1]--; 
       if (b[-1] != (1 << BYTEWIDTH) / BYTEWIDTH)
-	memmove(&b[b[-1]], &b[(1 << BYTEWIDTH) / BYTEWIDTH],
+	memmove(&b[(int)b[-1]], &b[(1 << BYTEWIDTH) / BYTEWIDTH],
 		2 + EXTRACT_UNSIGNED(&b[(1 << BYTEWIDTH) / BYTEWIDTH])*8);
-      b += b[-1] + 2 + EXTRACT_UNSIGNED(&b[b[-1]])*8;
+      b += b[-1] + 2 + EXTRACT_UNSIGNED(&b[(int)b[-1]])*8;
       break;
 
     case '(':
@@ -2235,9 +2235,9 @@
 	while ((int)b[-1] > 0 && b[b[-1] - 1] == 0) 
 	  b[-1]--; 
 	if (b[-1] != (1 << BYTEWIDTH) / BYTEWIDTH)
-	  memmove(&b[b[-1]], &b[(1 << BYTEWIDTH) / BYTEWIDTH],
+	  memmove(&b[(int)b[-1]], &b[(1 << BYTEWIDTH) / BYTEWIDTH],
 		  2 + EXTRACT_UNSIGNED(&b[(1 << BYTEWIDTH) / BYTEWIDTH])*8);
-	b += b[-1] + 2 + EXTRACT_UNSIGNED(&b[b[-1]])*8;
+	b += b[-1] + 2 + EXTRACT_UNSIGNED(&b[(int)b[-1]])*8;
 	break;
 
       case 'w':

---
(藤原)
http://www.ki.nu/software/namazu/tutorial/