diff --git a/ChangeLog b/ChangeLog index 630ddf5880..fde3e3353d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sat May 18 16:57:58 2013 Tanaka Akira + + * ext/socket/mkconstants.rb (INTEGER2VALUE): Suppress a warning: + comparison between signed and unsigned integer expressions + Sat May 18 16:38:39 2013 Nobuyoshi Nakada * compile.c (iseq_compile_each): forward anonymous and first keyword diff --git a/ext/socket/mkconstants.rb b/ext/socket/mkconstants.rb index 521aa95547..1f4184f3bd 100644 --- a/ext/socket/mkconstants.rb +++ b/ext/socket/mkconstants.rb @@ -282,11 +282,11 @@ result = ERB.new(<<'EOS', nil, '%').result(binding) #ifdef HAVE_LONG_LONG #define INTEGER2VALUE(n) (0 < (n) ? \ ((n) <= FIXNUM_MAX ? LONG2FIX(n) : ULL2NUM(n)) : \ - (FIXNUM_MIN <= (n) ? LONG2FIX(n) : LL2NUM(n))) + (FIXNUM_MIN <= (LONG_LONG)(n) ? LONG2FIX(n) : LL2NUM(n))) #else #define INTEGER2VALUE(n) (0 < (n) ? \ ((n) <= FIXNUM_MAX ? LONG2FIX(n) : ULONG2NUM(n)) : \ - (FIXNUM_MIN <= (n) ? LONG2FIX(n) : LONG2NUM(n))) + (FIXNUM_MIN <= (long)(n) ? LONG2FIX(n) : LONG2NUM(n))) #endif static void