summaryrefslogtreecommitdiff
path: root/ext/zlib/zlib.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-07-11 03:17:35 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-07-11 03:17:35 +0000
commit7bca2f031ae387f979397f73640f0c5b07dc313d (patch)
treeb6b847bbc5df2530ad367d4bd987d57a867a2f66 /ext/zlib/zlib.c
parent11bde3ae11838e3d257d3c887e496bfc1214a2a1 (diff)
get rid of warnings
* io.c (sysopen_func, rb_sysopen_internal): cast through VALUE to get rid of warnings. fixup of r36355. * process.c (rb_waitpid_blocking, rb_waitpid): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/zlib/zlib.c')
-rw-r--r--ext/zlib/zlib.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index e2b4f44..ae8536b 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -695,7 +695,7 @@ zstream_expand_buffer_protect(void *ptr)
rb_protect((VALUE (*)(VALUE))zstream_expand_buffer, (VALUE)z, &state);
- return (void *)state;
+ return (void *)(VALUE)state;
}
static int
@@ -991,8 +991,8 @@ zstream_run_func(void *ptr)
}
if (args->stream_output) {
- state = (int)rb_thread_call_with_gvl(zstream_expand_buffer_protect,
- (void *)z);
+ state = (int)(VALUE)rb_thread_call_with_gvl(zstream_expand_buffer_protect,
+ (void *)z);
} else {
state = zstream_expand_buffer_without_gvl(z);
}
@@ -1004,7 +1004,7 @@ zstream_run_func(void *ptr)
}
}
- return (void *)err;
+ return (void *)(VALUE)err;
}
/*
@@ -1050,9 +1050,8 @@ zstream_run(struct zstream *z, Bytef *src, long len, int flush)
}
loop:
- err = (int)rb_thread_call_without_gvl(
- zstream_run_func, (void *)&args,
- zstream_unblock_func, (void *)&args);
+ err = (int)(VALUE)rb_thread_call_without_gvl(zstream_run_func, (void *)&args,
+ zstream_unblock_func, (void *)&args);
if (flush != Z_FINISH && err == Z_BUF_ERROR
&& z->stream.avail_out > 0) {