mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
objspace_dump.c: suppress warnings
* ext/objspace/objspace_dump.c (dump_object): remove unused variables, and cast size_t to long. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b60079fe95
commit
a50bbcfecb
1 changed files with 1 additions and 3 deletions
|
@ -156,8 +156,6 @@ reachable_object_i(VALUE ref, void *data)
|
|||
static void
|
||||
dump_object(VALUE obj, struct dump_config *dc)
|
||||
{
|
||||
int enc;
|
||||
long length;
|
||||
size_t memsize;
|
||||
struct allocation_info *ainfo;
|
||||
rb_io_t *fptr;
|
||||
|
@ -192,7 +190,7 @@ dump_object(VALUE obj, struct dump_config *dc)
|
|||
dump_append(dc, ", \"shared\":true");
|
||||
else {
|
||||
dump_append(dc, ", \"bytesize\":%ld", RSTRING_LEN(obj));
|
||||
if (!STR_EMBED_P(obj) && !STR_NOCAPA_P(obj) && rb_str_capacity(obj) != RSTRING_LEN(obj))
|
||||
if (!STR_EMBED_P(obj) && !STR_NOCAPA_P(obj) && (long)rb_str_capacity(obj) != RSTRING_LEN(obj))
|
||||
dump_append(dc, ", \"capacity\":%ld", rb_str_capacity(obj));
|
||||
|
||||
if (is_ascii_string(obj)) {
|
||||
|
|
Loading…
Reference in a new issue