ruby-changes:29222
From: nobu <ko1@a...>
Date: Thu, 13 Jun 2013 16:33:22 +0900 (JST)
Subject: [ruby-changes:29222] nobu:r41274 (trunk): bignum.c: suppress warnings
nobu 2013-06-13 16:33:12 +0900 (Thu, 13 Jun 2013) New Revision: 41274 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=41274 Log: bignum.c: suppress warnings * bignum.c (integer_unpack_num_bdigits_generic): suppress "implicit conversion shortens 64-bit value into a 32-bit value" warnings. Modified files: trunk/bignum.c Index: bignum.c =================================================================== --- bignum.c (revision 41273) +++ bignum.c (revision 41274) @@ -1178,7 +1178,7 @@ integer_unpack_num_bdigits_generic(size_ https://github.com/ruby/ruby/blob/trunk/bignum.c#L1178 if (CHAR_BIT * r3 >= r1 * r2) { size_t tmp1 = CHAR_BIT * BITSPERDIG - (CHAR_BIT * r3 - r1 * r2); size_t q4 = tmp1 / BITSPERDIG; - int r4 = tmp1 % BITSPERDIG; + int r4 = (int)(tmp1 % BITSPERDIG); size_t num_digits2 = num_digits1 + CHAR_BIT - q4; *nlp_bits_ret = r4; return num_digits2; @@ -1186,7 +1186,7 @@ integer_unpack_num_bdigits_generic(size_ https://github.com/ruby/ruby/blob/trunk/bignum.c#L1186 else { size_t tmp1 = - (CHAR_BIT * r3 - r1 * r2); size_t q4 = tmp1 / BITSPERDIG; - int r4 = tmp1 % BITSPERDIG; + int r4 = (int)(tmp1 % BITSPERDIG); size_t num_digits2 = num_digits1 - q4; *nlp_bits_ret = r4; return num_digits2; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/