From 745c63e9a05b33e8399b3a9eb5ae8027fadc4093 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 8 Dec 2015 15:59:05 +0000 Subject: 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 --- compile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'compile.c') 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); } -- cgit v1.2.3