mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
46df9c425e
commit
745c63e9a0
1 changed files with 2 additions and 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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue