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

ruby-changes:13455

From: nobu <ko1@a...>
Date: Sun, 4 Oct 2009 15:00:55 +0900 (JST)
Subject: [ruby-changes:13455] Ruby:r25229 (trunk): * pack.c (NATINT_LEN, pack_pack): suppressed warnings.

nobu	2009-10-04 15:00:33 +0900 (Sun, 04 Oct 2009)

  New Revision: 25229

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

  Log:
    * pack.c (NATINT_LEN, pack_pack): suppressed warnings.

  Modified files:
    trunk/ChangeLog
    trunk/pack.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 25228)
+++ ChangeLog	(revision 25229)
@@ -1,3 +1,7 @@
+Sun Oct  4 15:00:32 2009  Nobuyoshi Nakada  <nobu@r...>
+
+	* pack.c (NATINT_LEN, pack_pack): suppressed warnings.
+
 Sun Oct  4 14:01:10 2009  Nobuyoshi Nakada  <nobu@r...>
 
 	* lib/rubygems.rb (Gem::binary_mode): binary mode uses binary
Index: pack.c
===================================================================
--- pack.c	(revision 25228)
+++ pack.c	(revision 25229)
@@ -25,7 +25,7 @@
 #ifdef NATINT_PACK
 # define OFF16B(p) ((char*)(p) + (natint?0:(sizeof(short) - SIZE16)))
 # define OFF32B(p) ((char*)(p) + (natint?0:(sizeof(long) - SIZE32)))
-# define NATINT_LEN(type,len) (natint?sizeof(type):(len))
+# define NATINT_LEN(type,len) (natint?(int)sizeof(type):(int)(len))
 # ifdef WORDS_BIGENDIAN
 #   define OFF16(p) OFF16B(p)
 #   define OFF32(p) OFF32B(p)
@@ -35,7 +35,7 @@
 # define NATINT_HTONS(x) (natint?htons(x):hton16(x))
 # define NATINT_HTONL(x) (natint?htonl(x):hton32(x))
 #else
-# define NATINT_LEN(type,len) sizeof(type)
+# define NATINT_LEN(type,len) ((int)sizeof(type))
 # define NATINT_HTOVS(x) htovs(x)
 # define NATINT_HTOVL(x) htovl(x)
 # define NATINT_HTONS(x) htons(x)
@@ -712,7 +712,7 @@
 		int i;
 
 		from = NEXTFROM;
-		i = num2i32(from);
+		i = (int)num2i32(from);
 		rb_str_buf_cat(res, (char*)&i, sizeof(int));
 	    }
 	    break;

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

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