summaryrefslogtreecommitdiff
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
commit745c63e9a05b33e8399b3a9eb5ae8027fadc4093 (patch)
tree9ef519af46394c6329d3d1aee45b249a4c48aa3d
parent46df9c425ea0ef8d8162af06d02de3506e0240b5 (diff)
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.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);
}