diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-10-04 06:00:33 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-10-04 06:00:33 +0000 |
commit | f517fb54c76e2510b9bc0167ad64a5726bd3926c (patch) | |
tree | e694e7bc2360879fb5a1c8b52d20221525cc1c55 | |
parent | 45306441865722cb1ea2a08c514b743ce5d512aa (diff) | |
download | ruby-f517fb54c76e2510b9bc0167ad64a5726bd3926c.tar.gz |
* pack.c (NATINT_LEN, pack_pack): suppressed warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | pack.c | 6 |
2 files changed, 7 insertions, 3 deletions
@@ -1,3 +1,7 @@ +Sun Oct 4 15:00:32 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * pack.c (NATINT_LEN, pack_pack): suppressed warnings. + Sun Oct 4 14:01:10 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> * lib/rubygems.rb (Gem::binary_mode): binary mode uses binary @@ -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 @@ pack_pack(VALUE ary, VALUE fmt) int i; from = NEXTFROM; - i = num2i32(from); + i = (int)num2i32(from); rb_str_buf_cat(res, (char*)&i, sizeof(int)); } break; |