From: Sylvester Keil Date: 2011-11-09T18:49:31+09:00 Subject: Re: Compiling Ruby Inline C code - resolving errors On Nov 9, 2011, at 10:25 AM, Martin Hansen wrote: > OK, it works now. However, I still get a warning: > > warning: implicit conversion shortens 64-bit value into a 32-bit > value > > The offending line is return (s - ss) - 1; where I expect an int. How > to make this portable? IIRC s and ss are pointers to a (the same?) string, right? If they are, then this difference here will easily fit into 32bit so you could cast to int explicitly: return (int)((s - ss) - 1) Or you could change the function definition to return a long instead of int and return a 64bit value on 64bit systems.