diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-04-25 07:56:42 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-04-25 07:56:42 +0000 |
commit | 63f39fcb4045f98888b24494b77317d70a8398e0 (patch) | |
tree | 46f2c37ad0fd78b7701bbd346a4f6cf85642d172 /sprintf.c | |
parent | 7c885222ca1d038006819afda93758cf1425ec66 (diff) | |
download | ruby-63f39fcb4045f98888b24494b77317d70a8398e0.tar.gz |
* random.c (random_rand): remove unused variables.
* struct.c (rb_struct_define_without_accessor): ditto.
* strftime.c (rb_strftime_with_timespec): ditto.
* sprintf.c: ditto.
* time.c (time_asctime): remove useless GetTimeval().
* thread_pthread.c: cast to (void *) for %p.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31343 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sprintf.c')
-rw-r--r-- | sprintf.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -30,9 +30,7 @@ static void fmt_setup(char*,size_t,int,int,int,int); static char* remove_sign_bits(char *str, int base) { - char *s, *t; - - s = t = str; + char *t = str; if (base == 16) { while (*t == 'f') { @@ -746,7 +744,7 @@ rb_str_format(int argc, const VALUE *argv, VALUE fmt) char sc = 0; long v = 0; int base, bignum = 0; - int len, pos; + int len; switch (*p) { case 'd': @@ -910,7 +908,6 @@ rb_str_format(int argc, const VALUE *argv, VALUE fmt) len = rb_long2int(RSTRING_END(tmp) - s); } - pos = -1; if (dots) { prec -= 2; width -= 2; |