Skip to content

Commit

Permalink
* ext/dl/cptr.c (rb_dlptr_new2): remove unused variable.
Browse files Browse the repository at this point in the history
	* 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
  • Loading branch information
nobu committed Jan 30, 2012
1 parent 72969cd commit ef84b7c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
11 changes: 1 addition & 10 deletions ext/dl/cptr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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;
}
Expand Down
8 changes: 6 additions & 2 deletions ext/iconv/iconv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions ext/syck/token.c
Original file line number Diff line number Diff line change
Expand Up @@ -1489,8 +1489,8 @@ yy108: switch(yych){

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;
Expand Down

0 comments on commit ef84b7c

Please sign in to comment.