diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-08 15:59:05 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-08 15:59:05 +0000 |
commit | c3181e75cdb390038cc812b36f6f82daff8cff8b (patch) | |
tree | 9ef519af46394c6329d3d1aee45b249a4c48aa3d | |
parent | 95ac88131bead1d375a1d5555b388fa863a735c8 (diff) | |
download | ruby-c3181e75cdb390038cc812b36f6f82daff8cff8b.tar.gz |
compile.c: suppress warning
* compile.c (ibf_dump_overwrite): cast to unsigned long to
suppress sign-compare warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | compile.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -6860,7 +6860,8 @@ ibf_dump_overwrite(struct ibf_dump *dump, void *buff, unsigned int size, long of { VALUE str = dump->str; char *ptr = RSTRING_PTR(str); - if (size + offset > RSTRING_LEN(str)) rb_bug("ibf_dump_overwrite: overflow"); + if ((unsigned long)(size + offset) > (unsigned long)RSTRING_LEN(str)) + rb_bug("ibf_dump_overwrite: overflow"); memcpy(ptr + offset, buff, size); } |