summaryrefslogtreecommitdiff
path: root/pack.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-12-05 09:50:12 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-12-05 09:50:12 +0000
commit8baffe6ef664e53a6acf0c3f52e900d37780fabb (patch)
treec8beb7b613d023d0ea60a4c8d8cdf7427e7ded17 /pack.c
parent0e4b86b5b94c8ce6abedde5a525f0a48c36ddd1d (diff)
* class.c (rb_obj_methods), compile.c (iseq_compile_each),
iseq.c(iseq_load, rb_iseq_parameters), pack.c (pack_pack), regcomp.c (is_not_included, update_string_node_case_fold), transcode.c (rb_econv_open0, make_replacement), vm_eval.c (raise_method_missing): remove unused variable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'pack.c')
-rw-r--r--pack.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/pack.c b/pack.c
index d22a80a9be..a75c02bac6 100644
--- a/pack.c
+++ b/pack.c
@@ -378,7 +378,7 @@ pack_pack(VALUE ary, VALUE fmt)
#ifdef NATINT_PACK
int natint; /* native integer */
#endif
- int signed_p, integer_size, bigendian_p;
+ int integer_size, bigendian_p;
StringValue(fmt);
p = RSTRING_PTR(fmt);
@@ -648,73 +648,61 @@ pack_pack(VALUE ary, VALUE fmt)
break;
case 's': /* signed short */
- signed_p = 1;
integer_size = NATINT_LEN(short, 2);
bigendian_p = BIGENDIAN_P();
goto pack_integer;
case 'S': /* unsigned short */
- signed_p = 0;
integer_size = NATINT_LEN(short, 2);
bigendian_p = BIGENDIAN_P();
goto pack_integer;
case 'i': /* signed int */
- signed_p = 1;
integer_size = (int)sizeof(int);
bigendian_p = BIGENDIAN_P();
goto pack_integer;
case 'I': /* unsigned int */
- signed_p = 0;
integer_size = (int)sizeof(int);
bigendian_p = BIGENDIAN_P();
goto pack_integer;
case 'l': /* signed long */
- signed_p = 1;
integer_size = NATINT_LEN(long, 4);
bigendian_p = BIGENDIAN_P();
goto pack_integer;
case 'L': /* unsigned long */
- signed_p = 0;
integer_size = NATINT_LEN(long, 4);
bigendian_p = BIGENDIAN_P();
goto pack_integer;
case 'q': /* signed quad (64bit) int */
- signed_p = 1;
integer_size = 8;
bigendian_p = BIGENDIAN_P();
goto pack_integer;
case 'Q': /* unsigned quad (64bit) int */
- signed_p = 0;
integer_size = 8;
bigendian_p = BIGENDIAN_P();
goto pack_integer;
case 'n': /* unsigned short (network byte-order) */
- signed_p = 0;
integer_size = 2;
bigendian_p = 1;
goto pack_integer;
case 'N': /* unsigned long (network byte-order) */
- signed_p = 0;
integer_size = 4;
bigendian_p = 1;
goto pack_integer;
case 'v': /* unsigned short (VAX byte-order) */
- signed_p = 0;
integer_size = 2;
bigendian_p = 0;
goto pack_integer;
case 'V': /* unsigned long (VAX byte-order) */
- signed_p = 0;
integer_size = 4;
bigendian_p = 0;
goto pack_integer;