* bignum.c (LSHIFTX): Revert r41611.
The redundant expression suppresses a warning, C4293, by Visual Studio. http://ruby-mswin.cloudapp.net/vc10-x64/ruby-trunk/log/20130625T072854Z.log.html.gz#miniruby git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b51a43e1c2
commit
e4e5bc118e
@ -1,3 +1,10 @@
|
|||||||
|
Tue Jun 25 19:07:33 2013 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
|
* bignum.c (LSHIFTX): Revert r41611.
|
||||||
|
The redundant expression suppresses a warning, C4293, by Visual
|
||||||
|
Studio.
|
||||||
|
http://ruby-mswin.cloudapp.net/vc10-x64/ruby-trunk/log/20130625T072854Z.log.html.gz#miniruby
|
||||||
|
|
||||||
Tue Jun 25 19:03:00 2013 Tanaka Akira <akr@fsij.org>
|
Tue Jun 25 19:03:00 2013 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* bignum.c (big2ulong): Add a cast.
|
* bignum.c (big2ulong): Add a cast.
|
||||||
|
3
bignum.c
3
bignum.c
@ -39,7 +39,8 @@ static VALUE big_three = Qnil;
|
|||||||
# define HOST_BIGENDIAN_P 0
|
# define HOST_BIGENDIAN_P 0
|
||||||
#endif
|
#endif
|
||||||
#define ALIGNOF(type) ((int)offsetof(struct { char f1; type f2; }, f2))
|
#define ALIGNOF(type) ((int)offsetof(struct { char f1; type f2; }, f2))
|
||||||
#define LSHIFTX(d, n) (sizeof(d) * CHAR_BIT <= (n) ? 0 : ((d) << (n)))
|
/* (sizeof(d) * CHAR_BIT <= (n) ? 0 : (n)) is same as n but suppress a warning, C4293, by Visual Studio. */
|
||||||
|
#define LSHIFTX(d, n) (sizeof(d) * CHAR_BIT <= (n) ? 0 : ((d) << (sizeof(d) * CHAR_BIT <= (n) ? 0 : (n))))
|
||||||
#define CLEAR_LOWBITS(d, numbits) ((d) & LSHIFTX(~((d)*0), (numbits)))
|
#define CLEAR_LOWBITS(d, numbits) ((d) & LSHIFTX(~((d)*0), (numbits)))
|
||||||
#define FILL_LOWBITS(d, numbits) ((d) | (LSHIFTX(((d)*0+1), (numbits))-1))
|
#define FILL_LOWBITS(d, numbits) ((d) | (LSHIFTX(((d)*0+1), (numbits))-1))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user