[#31166] is_ruby_native_thread() — Masahiro Sakai (酒井政裕) <masahiro.sakai@...>

酒井です。

16 messages 2007/07/08
[#31269] Re: is_ruby_native_thread() — Nobuyoshi Nakada <nobu@...> 2007/07/21

なかだです。

[#31270] Re: is_ruby_native_thread() — Hidetoshi NAGAI <nagai@...> 2007/07/22

永井@知能.九工大です.

[#31298] retryの使い方 — eklerni <eklerni@...>

松尾といいます。

52 messages 2007/07/25
[#31299] Re: retryの使い方 — SASADA Koichi <ko1@...> 2007/07/26

 ささだです。

[#31300] Re: retryの使い方 — eklerni <eklerni@...> 2007/07/26

松尾です、返信ありがとうございます。

[#31303] Re: retryの使い方 — Yugui <yugui@...> 2007/07/26

Yuguiといいます。

[#31306] Re: retryの使い方 — eklerni <eklerni@...> 2007/07/26

松尾といいます。

[#31308] Re: retryの使い方 — Tanaka Akira <akr@...> 2007/07/26

In article <46A909DD.1070405@for.mail-box.ne.jp>,

[#31310] Re: retryの使い方 — eklerni <eklerni@...> 2007/07/26

Tanaka Akira さんは書きました:

[#31314] Re: retryの使い方 — Tanaka Akira <akr@...> 2007/07/30

In article <46A92530.80507@for.mail-box.ne.jp>,

[#31315] Re: retryの使い方 — eklerni <eklerni@...> 2007/07/30

Tanaka Akira さんは書きました:

[#31316] Re: retryの使い方 — Tanaka Akira <akr@...> 2007/07/30

In article <46AD7A16.8080509@for.mail-box.ne.jp>,

[#31317] Re: retryの使い方 — eklerni <eklerni@...> 2007/07/31

松尾です。

[#31381] Re: retryの使い方 — SASADA Koichi <ko1@...> 2007/08/12

 ささだです。

[#31422] Re: retryの使い方 — Yukihiro Matsumoto <matz@...> 2007/08/15

まつもと ゆきひろです

[#31425] Re: retryの使い方 — Tanaka Akira <akr@...> 2007/08/15

In article <E1ILDTi-0005T6-Be@x31>,

[#31426] Re: retryの使い方 — Yukihiro Matsumoto <matz@...> 2007/08/15

まつもと ゆきひろです

[#31433] Re: retryの使い方 — Tanaka Akira <akr@...> 2007/08/16

In article <E1ILKn6-0003Nv-0f@x31>,

[#31435] Re: retryの使い方 — Yukihiro Matsumoto <matz@...> 2007/08/16

まつもと ゆきひろです

[#31447] Re: retryの使い方 — Tanaka Akira <akr@...> 2007/08/16

In article <E1ILVN9-0006xJ-7I@x31>,

[#31450] Re: retryの使い方 — Tanaka Akira <akr@...> 2007/08/17

In article <E1ILq4x-0002Bs-Lg@x31>,

[#31451] Re: retryの使い方 — Yukihiro Matsumoto <matz@...> 2007/08/17

まつもと ゆきひろです

[ruby-dev:31222] trunk: バグを指摘している警告

From: pegacorn <subscriber.jp@...>
Date: 2007-07-14 11:00:01 UTC
List: ruby-dev #31222
trunk で -Wall を付けてコンパイルしてみると、バグを指摘している警告が
いくつか見付かりました。

compiling digest
gcc -I. -I../../.ext/include/i386-freebsd6.2 -I../.././include -I../.././ext/digest -DRUBY_EXTCONF_H=\"extconf.h\" -fPIC -g -O2 -Wall -c digest.c
digest.c: In function `rb_digest_instance_update':
digest.c:100: warning: format argument is not a pointer (arg 3)
digest.c: In function `rb_digest_instance_finish':
digest.c:118: warning: format argument is not a pointer (arg 3)
digest.c: In function `rb_digest_instance_reset':
digest.c:132: warning: format argument is not a pointer (arg 3)
digest.c: In function `rb_digest_instance_block_length':
digest.c:361: warning: format argument is not a pointer (arg 3)
digest.c: In function `rb_digest_class_s_digest':
compiling dl
gcc -I. -I../../.ext/include/i386-freebsd6.2 -I../.././include -I../.././ext/dl -DRUBY_EXTCONF_H=\"extconf.h\" -fPIC -g -O2 -Wall -fno-defer-pop -fno-omit-frame-pointer -c cfunc.c
cfunc.c: In function `rb_dlcfunc_call':
cfunc.c:463: warning: unsigned int format, ID arg (arg 3)
compiling openssl
gcc -I. -I../../.ext/include/i386-freebsd6.2 -I../.././include -I../.././ext/openssl -DRUBY_EXTCONF_H=\"extconf.h\" -fPIC -g -O2 -Wall -c ossl_x509name.c
ossl_x509name.c: In function `ossl_x509name_to_s':
ossl_x509name.c:207: warning: null format string
ossl_x509name.c:211: warning: null format string


ext/openssl の
    ossl_x509name.c:207: warning: null format string
    ossl_x509name.c:211: warning: null format string
は、
-	rb_raise(eX509NameError, NULL);
+	rb_raise(eX509NameError, "");
にすべきかどうかよくわかりませんが、他を見ると ossl_raise() を使うつもり
だったと思われたので、ossl_raise() に置き換えました。


Index: ext/digest/digest.c
===================================================================
--- ext/digest/digest.c	(リビジョン 12779)
+++ ext/digest/digest.c	(作業コピー)
@@ -97,7 +97,7 @@
 static VALUE
 rb_digest_instance_update(VALUE self, VALUE str)
 {
-    rb_raise(rb_eRuntimeError, "%s does not implement update()", rb_inspect(self));
+    rb_raise(rb_eRuntimeError, "%s does not implement update()", RSTRING_PTR(rb_inspect(self)));
 }
 
 /*
@@ -115,7 +115,7 @@
 static VALUE
 rb_digest_instance_finish(VALUE self)
 {
-    rb_raise(rb_eRuntimeError, "%s does not implement finish()", rb_inspect(self));
+    rb_raise(rb_eRuntimeError, "%s does not implement finish()", RSTRING_PTR(rb_inspect(self)));
 }
 
 /*
@@ -129,7 +129,7 @@
 static VALUE
 rb_digest_instance_reset(VALUE self)
 {
-    rb_raise(rb_eRuntimeError, "%s does not implement reset()", rb_inspect(self));
+    rb_raise(rb_eRuntimeError, "%s does not implement reset()", RSTRING_PTR(rb_inspect(self)));
 }
 
 /*
@@ -358,7 +358,7 @@
 static VALUE
 rb_digest_instance_block_length(VALUE self)
 {
-    rb_raise(rb_eRuntimeError, "%s does not implement block_length()", rb_inspect(self));
+    rb_raise(rb_eRuntimeError, "%s does not implement block_length()", RSTRING_PTR(rb_inspect(self)));
 }
 
 /*
Index: ext/dl/cfunc.c
===================================================================
--- ext/dl/cfunc.c	(リビジョン 12779)
+++ ext/dl/cfunc.c	(作業コピー)
@@ -460,7 +460,11 @@
 	}
     }
     else{
-	rb_raise(rb_eDLError, "unsupported call type: %x", cfunc->calltype);
+#ifndef LONG_LONG_VALUE
+	rb_raise(rb_eDLError, "unsupported call type: %lx", cfunc->calltype);
+#else
+	rb_raise(rb_eDLError, "unsupported call type: %llx", cfunc->calltype);
+#endif
     }
 
     rb_dl_set_last_error(self, INT2NUM(errno));
Index: ext/openssl/ossl_x509name.c
===================================================================
--- ext/openssl/ossl_x509name.c	(リビジョン 12779)
+++ ext/openssl/ossl_x509name.c	(作業コピー)
@@ -204,11 +204,11 @@
 	return ossl_x509name_to_s_old(self);
     else iflag = NUM2ULONG(flag);
     if (!(out = BIO_new(BIO_s_mem())))
-	rb_raise(eX509NameError, NULL);
+	ossl_raise(eX509NameError, NULL);
     GetX509Name(self, name);
     if (!X509_NAME_print_ex(out, name, 0, iflag)){
 	BIO_free(out);
-	rb_raise(eX509NameError, NULL);
+	ossl_raise(eX509NameError, NULL);
     }
     str = ossl_membio2str(out);
 


--
pegacorn

In This Thread

Prev Next