summaryrefslogtreecommitdiff
path: root/ext/date/date_strftime.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-04-23 17:34:55 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-04-23 17:34:55 +0000
commitc34db589139980914f0b05d27b2499ac5bec615a (patch)
tree35dca0b96c3e330eb7ef06c83ed2f7703c4e6d37 /ext/date/date_strftime.c
parent5c0a69a6211c76d0e34be9adb24e89ee539f4cba (diff)
* ext/date/date_core.c (leap_p): surpress warning: parentheses.
* ext/date/date_core.c (date_s__parse_internal): remove unused variable "str". * ext/date/date_parse.c (parse_ddd_cb): use RSTRING_LENINT. * ext/date/date_strftime.c (date_strftime_with_tmx): remove unused variable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/date/date_strftime.c')
-rw-r--r--ext/date/date_strftime.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/ext/date/date_strftime.c b/ext/date/date_strftime.c
index 5bb84a1..2b20f31 100644
--- a/ext/date/date_strftime.c
+++ b/ext/date/date_strftime.c
@@ -716,17 +716,15 @@ date_strftime_with_tmx(char *s, size_t maxsize, const char *format,
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;
}
}