[前][次][番号順一覧][スレッド一覧]

ruby-changes:39429

From: nobu <ko1@a...>
Date: Sat, 8 Aug 2015 09:33:16 +0900 (JST)
Subject: [ruby-changes:39429] nobu:r51510 (trunk): transcode_data.h: missing cast

nobu	2015-08-08 09:33:11 +0900 (Sat, 08 Aug 2015)

  New Revision: 51510

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=51510

  Log:
    transcode_data.h: missing cast
    
    * transcode_data.h (o4): add missing cast to get rid of implicit
      signed extension and suppress shift-overflow warnings.

  Modified files:
    trunk/transcode_data.h
Index: transcode_data.h
===================================================================
--- transcode_data.h	(revision 51509)
+++ transcode_data.h	(revision 51510)
@@ -56,7 +56,7 @@ RUBY_SYMBOL_EXPORT_BEGIN https://github.com/ruby/ruby/blob/trunk/transcode_data.h#L56
 			       0xffffffffU))
 #define o4(b0,b1,b2,b3)	(PType(((((unsigned char)(b1))<<8)|\
 				(((unsigned char)(b2))<<16)|\
-				(((unsigned char)(b3))<<24)|\
+				(((unsigned int)(unsigned char)(b3))<<24)|\
 				((((unsigned char)(b0))&0x07)<<5)|\
 				FOURbt)&\
 			       0xffffffffU))

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]