summaryrefslogtreecommitdiff
path: root/sprintf.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-28 11:42:58 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-28 11:42:58 (GMT)
commit99a105c82fa524a13445e516edf0148564595d4a (patch)
treef1fde943b2239ce33a9e8372bdc7c29b77c15c27 /sprintf.c
parent191be8057d1dabc3710d295817afc57b3b318e24 (diff)
sprintf.c: remove unused variable
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sprintf.c')
-rw-r--r--sprintf.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sprintf.c b/sprintf.c
index f2d51f1..8954134 100644
--- a/sprintf.c
+++ b/sprintf.c
@@ -1126,7 +1126,7 @@ rb_str_format(int argc, const VALUE *argv, VALUE fmt)
fval = RFLOAT_VALUE(rb_Float(val));
if (isnan(fval) || isinf(fval)) {
const char *expr;
- int i, need;
+ int need;
int elen;
char sign = '\0';
@@ -1138,7 +1138,6 @@ rb_str_format(int argc, const VALUE *argv, VALUE fmt)
}
need = (int)strlen(expr);
elen = need;
- i = 0;
if (!isnan(fval) && fval < 0.0)
sign = '-';
else if (flags & (FPLUS|FSPACE))