summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-01-30 21:47:35 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-01-30 21:47:35 +0000
commitef84b7c67898646394e4cef8fd475cb652f2f0ca (patch)
tree50693a213c108b91ff05f8dcb9704d31ffd76955
parent72969cd348ac6f00bbe71ad63120db0114b35367 (diff)
* ext/dl/cptr.c (rb_dlptr_new2): remove unused variable.
* ext/iconv/iconv.c (get_iconv_opt_i): ditto. * ext/syck/token.c (Plain): fix types on LP64. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ext/dl/cptr.c11
-rw-r--r--ext/iconv/iconv.c8
-rw-r--r--ext/syck/token.c4
3 files changed, 9 insertions, 14 deletions
diff --git a/ext/dl/cptr.c b/ext/dl/cptr.c
index 89dcb942c02..636099d1fd1 100644
--- a/ext/dl/cptr.c
+++ b/ext/dl/cptr.c
@@ -63,15 +63,6 @@ static const rb_data_type_t dlptr_data_type = {
{dlptr_mark, dlptr_free, dlptr_memsize,},
};
-void
-dlptr_init(VALUE val)
-{
- struct ptr_data *data;
-
- TypedData_Get_Struct(val, struct ptr_data, &dlptr_data_type, data);
- OBJ_TAINT(val);
-}
-
VALUE
rb_dlptr_new2(VALUE klass, void *ptr, long size, freefunc_t func)
{
@@ -83,7 +74,7 @@ rb_dlptr_new2(VALUE klass, void *ptr, long size, freefunc_t func)
data->ptr = ptr;
data->free = func;
data->size = size;
- dlptr_init(val);
+ OBJ_TAINT(val);
return val;
}
diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c
index 531745c38db..125e82d6246 100644
--- a/ext/iconv/iconv.c
+++ b/ext/iconv/iconv.c
@@ -563,13 +563,17 @@ iconv_s_allocate(VALUE klass)
static VALUE
get_iconv_opt_i(VALUE i, VALUE arg)
{
+ VALUE name;
+#if defined ICONV_SET_TRANSLITERATE || defined ICONV_SET_DISCARD_ILSEQ
+ VALUE val;
struct rb_iconv_opt_t *opt = (struct rb_iconv_opt_t *)arg;
- VALUE name, val;
+#endif
- (void)opt;
i = rb_Array(i);
name = rb_ary_entry(i, 0);
+#if defined ICONV_SET_TRANSLITERATE || defined ICONV_SET_DISCARD_ILSEQ
val = rb_ary_entry(i, 1);
+#endif
do {
if (SYMBOL_P(name)) {
ID id = SYM2ID(name);
diff --git a/ext/syck/token.c b/ext/syck/token.c
index bea79c158a7..0d0d4846bab 100644
--- a/ext/syck/token.c
+++ b/ext/syck/token.c
@@ -1489,8 +1489,8 @@ yy109:
Plain:
{
- int qidx = 0;
- int qcapa = 100;
+ ptrdiff_t qidx = 0;
+ ptrdiff_t qcapa = 100;
char *qstr = S_ALLOC_N( char, qcapa );
SyckLevel *plvl;
int parentIndent;