ruby-changes:9968
From: akr <ko1@a...>
Date: Wed, 14 Jan 2009 22:41:36 +0900 (JST)
Subject: [ruby-changes:9968] Ruby:r21510 (trunk): * gc.c (negative_size_allocation_error_with_gvl): abolish a warning.
akr 2009-01-14 22:39:17 +0900 (Wed, 14 Jan 2009) New Revision: 21510 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=21510 Log: * gc.c (negative_size_allocation_error_with_gvl): abolish a warning. (negative_size_allocation_error): ditto. * ext/openssl/ossl.c (ossl_raise): ditto. Modified files: trunk/ChangeLog trunk/ext/openssl/ossl.c trunk/gc.c Index: ChangeLog =================================================================== --- ChangeLog (revision 21509) +++ ChangeLog (revision 21510) @@ -1,3 +1,10 @@ +Wed Jan 14 22:38:30 2009 Tanaka Akira <akr@f...> + + * 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@i...> * enc/trans/gb18030.trans, gb18030-tbl.rb: Index: gc.c =================================================================== --- gc.c (revision 21509) +++ gc.c (revision 21510) @@ -558,7 +558,7 @@ 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 @@ 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()) { Index: ext/openssl/ossl.c =================================================================== --- ext/openssl/ossl.c (revision 21509) +++ ext/openssl/ossl.c (revision 21510) @@ -296,8 +296,7 @@ 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){ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/