aboutsummaryrefslogtreecommitdiffstats
path: root/compile.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-08 15:59:05 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-08 15:59:05 +0000
commitc3181e75cdb390038cc812b36f6f82daff8cff8b (patch)
tree9ef519af46394c6329d3d1aee45b249a4c48aa3d /compile.c
parent95ac88131bead1d375a1d5555b388fa863a735c8 (diff)
downloadruby-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
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/compile.c b/compile.c
index 31741ca598..83132b741c 100644
--- a/compile.c
+++ b/compile.c
@@ -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);
}