aboutsummaryrefslogtreecommitdiffstats
path: root/strftime.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-04-25 07:56:42 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-04-25 07:56:42 +0000
commit63f39fcb4045f98888b24494b77317d70a8398e0 (patch)
tree46f2c37ad0fd78b7701bbd346a4f6cf85642d172 /strftime.c
parent7c885222ca1d038006819afda93758cf1425ec66 (diff)
downloadruby-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 'strftime.c')
-rw-r--r--strftime.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/strftime.c b/strftime.c
index 9d9f48d0de..8b6473ce38 100644
--- a/strftime.c
+++ b/strftime.c
@@ -689,17 +689,15 @@ rb_strftime_with_timespec(char *s, size_t maxsize, const char *format, const str
subsec = div(subsec, INT2FIX(1));
if (FIXNUM_P(subsec)) {
- int l;
- l = snprintf(s, endp - s, "%0*ld", precision, FIX2LONG(subsec));
+ (void)snprintf(s, endp - s, "%0*ld", precision, FIX2LONG(subsec));
s += precision;
}
else {
VALUE args[2], result;
- size_t l;
args[0] = INT2FIX(precision);
args[1] = subsec;
result = rb_str_format(2, args, rb_str_new2("%0*d"));
- l = strlcpy(s, StringValueCStr(result), endp-s);
+ (void)strlcpy(s, StringValueCStr(result), endp-s);
s += precision;
}
}