diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-30 09:48:28 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-30 09:48:28 +0000 |
commit | 2a0c12cce4691a2cab93e17129768a06f0b132e5 (patch) | |
tree | 3f15a3af9e12a5ff45417695a49bb83732f9ed0a /ext | |
parent | 208a51ffa3551bc7548aa878a46ebb72901110a1 (diff) | |
download | ruby-2a0c12cce4691a2cab93e17129768a06f0b132e5.tar.gz |
* ext/nkf/nkf-utf8/nkf.c: updated to b856dd07.
this cleans warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/nkf/nkf-utf8/nkf.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/nkf/nkf-utf8/nkf.c b/ext/nkf/nkf-utf8/nkf.c index ec10c83c91..06dfc74fcb 100644 --- a/ext/nkf/nkf-utf8/nkf.c +++ b/ext/nkf/nkf-utf8/nkf.c @@ -477,7 +477,7 @@ struct input_code input_code_list[] = { {"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 @@ unicode_iconv(nkf_char wc) 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 @@ noconvert(FILE *f) #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 @@ kanji_convert(FILE *f) 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 @@ options(unsigned char *cp) 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){ |