diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-28 01:27:37 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-28 01:27:37 +0000 |
commit | d4bd69441170a6a07470973640f329673fe1785e (patch) | |
tree | 75535252f9d13c363a18cbfe94e44a815244b5f0 | |
parent | 614bc7f9f842e9385f64b32c59c79b05e2bd2f59 (diff) | |
download | ruby-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
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | vsnprintf.c | 4 |
2 files changed, 7 insertions, 2 deletions
@@ -1,3 +1,8 @@ +Wed Apr 28 10:27:33 2010 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * vsnprintf.c (ruby_vsnprintf, ruby_snprintf): suppress warnings. + why return int in spite of the arguments of size_t? + Wed Apr 28 09:49:21 2010 Nobuyoshi Nakada <nobu@ruby-lang.org> * tool/compile_prelude.rb: enable optimization. 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); |