[前][次][番号順一覧][スレッド一覧]

ruby-changes:16133

From: naruse <ko1@a...>
Date: Sun, 30 May 2010 18:48:44 +0900 (JST)
Subject: [ruby-changes:16133] Ruby:r28090 (trunk): * ext/nkf/nkf-utf8/nkf.c: updated to b856dd07.

naruse	2010-05-30 18:48:28 +0900 (Sun, 30 May 2010)

  New Revision: 28090

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=28090

  Log:
    * ext/nkf/nkf-utf8/nkf.c: updated to b856dd07.
      this cleans warnings.

  Modified files:
    trunk/ChangeLog
    trunk/ext/nkf/nkf-utf8/nkf.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 28089)
+++ ChangeLog	(revision 28090)
@@ -1,3 +1,8 @@
+Sun May 30 18:47:15 2010  NARUSE, Yui  <naruse@r...>
+
+	* ext/nkf/nkf-utf8/nkf.c: updated to b856dd07.
+	  this cleans warnings.
+
 Sun May 30 18:25:55 2010  Yusuke Endoh  <mame@t...>
 
 	* load.c (load_failed): use more accurate error message.
Index: ext/nkf/nkf-utf8/nkf.c
===================================================================
--- ext/nkf/nkf-utf8/nkf.c	(revision 28089)
+++ ext/nkf/nkf-utf8/nkf.c	(revision 28090)
@@ -477,7 +477,7 @@
     {"UTF-16",     0, 0, 0, {0, 0, 0}, NULL, w_iconv16, 0},
     {"UTF-32",     0, 0, 0, {0, 0, 0}, NULL, w_iconv32, 0},
 #endif
-    {0}
+    {NULL,        0, 0, 0, {0, 0, 0}, NULL, NULL, 0}
 };
 
 static int              mimeout_mode = 0; /* 0, -1, 'Q', 'B', 1, 2 */
@@ -2202,8 +2202,8 @@
     return 0;
 }
 
-#define NKF_ICONV_NEED_ONE_MORE_BYTE -1
-#define NKF_ICONV_NEED_TWO_MORE_BYTES -2
+#define NKF_ICONV_NEED_ONE_MORE_BYTE (size_t)-1
+#define NKF_ICONV_NEED_TWO_MORE_BYTES (size_t)-2
 #define UTF16_TO_UTF32(lead, trail) (((lead) << 10) + (trail) - NKF_INT32_C(0x35FDC00))
 static size_t
 nkf_iconv_utf_16(nkf_char c1, nkf_char c2, nkf_char c3, nkf_char c4)
@@ -5418,7 +5418,7 @@
 #define NEXT continue        /* no output, get next */
 #define SKIP c2=0;continue        /* no output, get next */
 #define MORE c2=c1;continue  /* need one more byte */
-#define SEND ;               /* output c1 and c2, get next */
+#define SEND (void)0         /* output c1 and c2, get next */
 #define LAST break           /* end of loop, go closing  */
 #define set_input_mode(mode) do { \
     input_mode = mode; \
@@ -5463,7 +5463,7 @@
     else if (iconv == w_iconv16) {
 	while ((c1 = (*i_getc)(f)) != EOF &&
 	       (c2 = (*i_getc)(f)) != EOF) {
-	    if (nkf_iconv_utf_16(c1, c2, 0, 0) == -2 &&
+	    if (nkf_iconv_utf_16(c1, c2, 0, 0) == NKF_ICONV_NEED_TWO_MORE_BYTES &&
 		(c3 = (*i_getc)(f)) != EOF &&
 		(c4 = (*i_getc)(f)) != EOF) {
 		nkf_iconv_utf_16(c1, c2, c3, c4);
@@ -5903,7 +5903,7 @@
 		option_mode = 1;
 		return 0;
 	    }
-	    for (i=0;i<sizeof(long_option)/sizeof(long_option[0]);i++) {
+	    for (i=0;i<(int)(sizeof(long_option)/sizeof(long_option[0]));i++) {
 		p = (unsigned char *)long_option[i].name;
 		for (j=0;*p && *p != '=' && *p == cp[j];p++, j++);
 		if (*p == cp[j] || cp[j] == SP){

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]