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 | 745c63e9a05b33e8399b3a9eb5ae8027fadc4093 (patch) | |
tree | 9ef519af46394c6329d3d1aee45b249a4c48aa3d | |
parent | 46df9c425ea0ef8d8162af06d02de3506e0240b5 (diff) | |
download | ruby-745c63e9a05b33e8399b3a9eb5ae8027fadc4093.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); } |