1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
nobu 2010-04-28 01:27:37 +00:00
parent 614bc7f9f8
commit d4bd694411
2 changed files with 7 additions and 2 deletions

View file

@ -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.

View file

@ -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);