aboutsummaryrefslogtreecommitdiffstats
path: root/vsnprintf.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-28 01:27:37 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-28 01:27:37 +0000
commitd4bd69441170a6a07470973640f329673fe1785e (patch)
tree75535252f9d13c363a18cbfe94e44a815244b5f0 /vsnprintf.c
parent614bc7f9f842e9385f64b32c59c79b05e2bd2f59 (diff)
downloadruby-d4bd69441170a6a07470973640f329673fe1785e.tar.gz
* vsnprintf.c (ruby_vsnprintf, ruby_snprintf): suppress warnings.
why return int in spite of the arguments of size_t? git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vsnprintf.c')
-rw-r--r--vsnprintf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vsnprintf.c b/vsnprintf.c
index 6385aa1aa7..a389d15fc3 100644
--- a/vsnprintf.c
+++ b/vsnprintf.c
@@ -1229,7 +1229,7 @@ ruby_vsnprintf(char *str, size_t n, const char *fmt, va_list ap)
f._bf._base = f._p = (unsigned char *)str;
f._bf._size = f._w = n - 1;
f.vwrite = BSD__sfvwrite;
- ret = BSD_vfprintf(&f, fmt, ap);
+ ret = (int)BSD_vfprintf(&f, fmt, ap);
*f._p = 0;
return (ret);
}
@@ -1249,7 +1249,7 @@ ruby_snprintf(char *str, size_t n, char const *fmt, ...)
f._bf._base = f._p = (unsigned char *)str;
f._bf._size = f._w = n - 1;
f.vwrite = BSD__sfvwrite;
- ret = BSD_vfprintf(&f, fmt, ap);
+ ret = (int)BSD_vfprintf(&f, fmt, ap);
*f._p = 0;
va_end(ap);
return (ret);