summaryrefslogtreecommitdiff
path: root/pack.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-10-04 06:00:33 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-10-04 06:00:33 +0000
commitf517fb54c76e2510b9bc0167ad64a5726bd3926c (patch)
treee694e7bc2360879fb5a1c8b52d20221525cc1c55 /pack.c
parent45306441865722cb1ea2a08c514b743ce5d512aa (diff)
* 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
Diffstat (limited to 'pack.c')
-rw-r--r--pack.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pack.c b/pack.c
index 172534404d..f1841ab89a 100644
--- a/pack.c
+++ b/pack.c
@@ -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;