ruby-changes:40892
From: nobu <ko1@a...>
Date: Wed, 9 Dec 2015 00:59:24 +0900 (JST)
Subject: [ruby-changes:40892] nobu:r52971 (trunk): compile.c: suppress warning
nobu 2015-12-09 00:59:05 +0900 (Wed, 09 Dec 2015) New Revision: 52971 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52971 Log: compile.c: suppress warning * compile.c (ibf_dump_overwrite): cast to unsigned long to suppress sign-compare warning. Modified files: trunk/compile.c Index: compile.c =================================================================== --- compile.c (revision 52970) +++ compile.c (revision 52971) @@ -6860,7 +6860,8 @@ ibf_dump_overwrite(struct ibf_dump *dump https://github.com/ruby/ruby/blob/trunk/compile.c#L6860 { 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); } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/