diff options
Diffstat (limited to 'ext/date/date_strftime.c')
-rw-r--r-- | ext/date/date_strftime.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/ext/date/date_strftime.c b/ext/date/date_strftime.c index 5bb84a1c2b..2b20f310f9 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; } } |