diff options
| author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-14 13:39:17 +0000 |
|---|---|---|
| committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-14 13:39:17 +0000 |
| commit | dd38dc1e81a46a0b6d8940b06a4368a391132687 (patch) | |
| tree | 5b2ab529872778f1e38305a06f4d1b7b1d556d24 | |
| parent | 34eb5a4eaf36a42d2873fe3f7fc9c38b1c36e74a (diff) | |
| download | ruby-dd38dc1e81a46a0b6d8940b06a4368a391132687.tar.gz ruby-dd38dc1e81a46a0b6d8940b06a4368a391132687.tar.xz ruby-dd38dc1e81a46a0b6d8940b06a4368a391132687.zip | |
* gc.c (negative_size_allocation_error_with_gvl): abolish a warning.
(negative_size_allocation_error): ditto.
* ext/openssl/ossl.c (ossl_raise): ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 7 | ||||
| -rw-r--r-- | ext/openssl/ossl.c | 3 | ||||
| -rw-r--r-- | gc.c | 4 |
3 files changed, 10 insertions, 4 deletions
@@ -1,3 +1,10 @@ +Wed Jan 14 22:38:30 2009 Tanaka Akira <akr@fsij.org> + + * gc.c (negative_size_allocation_error_with_gvl): abolish a warning. + (negative_size_allocation_error): ditto. + + * ext/openssl/ossl.c (ossl_raise): ditto. + Wed Jan 14 20:05:05 2009 Martin Duerst <duerst@it.aoyama.ac.jp> * enc/trans/gb18030.trans, gb18030-tbl.rb: diff --git a/ext/openssl/ossl.c b/ext/openssl/ossl.c index 9df7c59d2..28696cabe 100644 --- a/ext/openssl/ossl.c +++ b/ext/openssl/ossl.c @@ -296,8 +296,7 @@ ossl_raise(VALUE exc, const char *fmt, ...) msg = ERR_error_string(e, NULL); else msg = ERR_reason_error_string(e); - fmt = len ? ": %s" : "%s"; - len += snprintf(buf+len, BUFSIZ-len, fmt, msg); + len += snprintf(buf+len, BUFSIZ-len, "%s%s", (len ? ": " : ""), msg); } if (dOSSL == Qtrue){ /* show all errors on the stack */ while ((e = ERR_get_error()) != 0){ @@ -558,7 +558,7 @@ gc_profile_clear(void) static void * negative_size_allocation_error_with_gvl(void *ptr) { - rb_raise(rb_eNoMemError, (const char *)ptr); + rb_raise(rb_eNoMemError, "%s", (const char *)ptr); return 0; /* should not be reached */ } @@ -566,7 +566,7 @@ static void negative_size_allocation_error(const char *msg) { if (ruby_thread_has_gvl_p()) { - rb_raise(rb_eNoMemError, msg); + rb_raise(rb_eNoMemError, "%s", msg); } else { if (ruby_native_thread_p()) { |
