1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
nobu 2009-10-04 06:00:33 +00:00
parent 4530644186
commit f517fb54c7
2 changed files with 7 additions and 3 deletions

View file

@ -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

6
pack.c
View file

@ -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;