Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm1 committed Nov 8, 2013
1 parent aea2a28 commit 37dedd7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ext/objspace/depend
Expand Up @@ -11,4 +11,4 @@ gc_hook.o: $(HDRS) $(ruby_headers) $(hdrdir)/ruby/debug.h
object_tracing.o: $(HDRS) $(ruby_headers) $(hdrdir)/ruby/debug.h
objspace_dump.o: $(HDRS) $(ruby_headers) $(hdrdir)/ruby/debug.h \
$(hdrdir)/ruby/encoding.h $(hdrdir)/ruby/io.h \
$(top_srcdir)/node.h $(top_srcdir)/vm_core.h
$(top_srcdir)/node.h $(top_srcdir)/vm_core.h $(top_srcdir)/gc.h
7 changes: 4 additions & 3 deletions ext/objspace/objspace_dump.c
Expand Up @@ -16,6 +16,7 @@
#include "ruby/debug.h"
#include "ruby/encoding.h"
#include "ruby/io.h"
#include "gc.h"
#include "node.h"
#include "vm_core.h"
#include "objspace.h"
Expand Down Expand Up @@ -265,7 +266,7 @@ dump_object(VALUE obj, struct dump_config *dc)
}

static int
heap_i(void *vstart, void *vend, int stride, void *data)
heap_i(void *vstart, void *vend, size_t stride, void *data)
{
VALUE v = (VALUE)vstart;
for (; v != (VALUE)vend; v += stride) {
Expand Down Expand Up @@ -322,7 +323,7 @@ objspace_dump(int argc, VALUE *argv, VALUE os)
dc.stream = stdout;
else if (output == sym_file) {
fd = mkstemp(filename);
if (fd == -1) rb_sys_fail_path(filename);
if (fd == -1) rb_sys_fail_path(rb_str_new_cstr(filename));
dc.stream = fdopen(fd, "w");
}
else {
Expand Down Expand Up @@ -373,7 +374,7 @@ objspace_dump_all(int argc, VALUE *argv, VALUE os)
dc.string = rb_str_new2("");
else if (output == sym_file) {
fd = mkstemp(filename);
if (fd == -1) rb_sys_fail_path(filename);
if (fd == -1) rb_sys_fail_path(rb_str_new_cstr(filename));
dc.stream = fdopen(fd, "w");
}
else {
Expand Down

0 comments on commit 37dedd7

Please sign in to comment.