[前][次][番号順一覧][スレッド一覧]

ruby-changes:4121

From: ko1@a...
Date: Tue, 26 Feb 2008 16:11:37 +0900 (JST)
Subject: [ruby-changes:4121] technorama - Ruby:r15611 (ruby_1_8): * ext/openssl/ossl_pkey_{ec,dh,dsa,rsa}.c: Remove useless warnings.

technorama	2008-02-26 16:11:23 +0900 (Tue, 26 Feb 2008)

  New Revision: 15611

  Modified files:
    branches/ruby_1_8/ChangeLog
    branches/ruby_1_8/ext/openssl/ossl_pkey_dh.c
    branches/ruby_1_8/ext/openssl/ossl_pkey_dsa.c
    branches/ruby_1_8/ext/openssl/ossl_pkey_ec.c
    branches/ruby_1_8/ext/openssl/ossl_pkey_rsa.c
    branches/ruby_1_8/ext/openssl/ossl_ssl_session.c

  Log:
    * ext/openssl/ossl_pkey_{ec,dh,dsa,rsa}.c: Remove useless warnings.
    
    * ext/openssl/ossl_asn1.c: Simplify code.
    
    * ext/openssl/ossl_ssl_session.c Fix compiler warnings.
      Undefine #id if SSL_SESSION_get_id is not supported.


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/ext/openssl/ossl_pkey_rsa.c?r1=15611&r2=15610&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/ChangeLog?r1=15611&r2=15610&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/ext/openssl/ossl_pkey_dh.c?r1=15611&r2=15610&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/ext/openssl/ossl_pkey_ec.c?r1=15611&r2=15610&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/ext/openssl/ossl_pkey_dsa.c?r1=15611&r2=15610&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/ext/openssl/ossl_ssl_session.c?r1=15611&r2=15610&diff_format=u

Index: ruby_1_8/ext/openssl/ossl_pkey_dsa.c
===================================================================
--- ruby_1_8/ext/openssl/ossl_pkey_dsa.c	(revision 15610)
+++ ruby_1_8/ext/openssl/ossl_pkey_dsa.c	(revision 15611)
@@ -477,12 +477,8 @@
 }
 
 #else /* defined NO_DSA */
-#   warning >>> OpenSSL is compiled without DSA support <<<
-
 void
 Init_ossl_dsa()
 {
-    rb_warning("OpenSSL is compiled without DSA support");
 }
-
 #endif /* NO_DSA */
Index: ruby_1_8/ext/openssl/ossl_pkey_rsa.c
===================================================================
--- ruby_1_8/ext/openssl/ossl_pkey_rsa.c	(revision 15610)
+++ ruby_1_8/ext/openssl/ossl_pkey_rsa.c	(revision 15611)
@@ -585,11 +585,9 @@
 }
 
 #else /* defined NO_RSA */
-#   warning >>> OpenSSL is compiled without RSA support <<<
 void
 Init_ossl_rsa()
 {
-    rb_warning("OpenSSL is compiled without RSA support");
 }
 #endif /* NO_RSA */
 
Index: ruby_1_8/ext/openssl/ossl_pkey_ec.c
===================================================================
--- ruby_1_8/ext/openssl/ossl_pkey_ec.c	(revision 15610)
+++ ruby_1_8/ext/openssl/ossl_pkey_ec.c	(revision 15611)
@@ -1576,10 +1576,7 @@
 }
 
 #else /* defined NO_EC */
-#   warning >>> OpenSSL is compiled without EC support <<<
-
 void Init_ossl_ec()
 {
 }
-
 #endif /* NO_EC */
Index: ruby_1_8/ext/openssl/ossl_ssl_session.c
===================================================================
--- ruby_1_8/ext/openssl/ossl_ssl_session.c	(revision 15610)
+++ ruby_1_8/ext/openssl/ossl_ssl_session.c	(revision 15611)
@@ -174,7 +174,7 @@
 
 	p = SSL_SESSION_get_id(ctx, &i);
 
-	return rb_str_new(p, i);
+	return rb_str_new((const char *) p, i);
 }
 #endif
 
@@ -200,7 +200,7 @@
 	else if (len >= sizeof(buf))
 		ossl_raise(eSSLSession, "i2d_SSL_SESSION too large");
 
-	return rb_str_new(p, len);
+	return rb_str_new((const char *) p, len);
 }
 
 /*
@@ -289,6 +289,8 @@
 
 #ifdef HAVE_SSL_SESSION_GET_ID
 	rb_define_method(cSSLSession, "id", ossl_ssl_session_get_id, 0);
+#else
+	rb_undef_method(cSSLSession, "id");
 #endif
 	rb_define_method(cSSLSession, "to_der", ossl_ssl_session_to_der, 0);
 	rb_define_method(cSSLSession, "to_pem", ossl_ssl_session_to_pem, 0);
Index: ruby_1_8/ext/openssl/ossl_pkey_dh.c
===================================================================
--- ruby_1_8/ext/openssl/ossl_pkey_dh.c	(revision 15610)
+++ ruby_1_8/ext/openssl/ossl_pkey_dh.c	(revision 15611)
@@ -524,11 +524,9 @@
 }
 
 #else /* defined NO_DH */
-#   warning >>> OpenSSL is compiled without DH support <<<
 void
 Init_ossl_dh()
 {
-    rb_warning("OpenSSL is compiled without DH support");
 }
 #endif /* NO_DH */
 
Index: ruby_1_8/ChangeLog
===================================================================
--- ruby_1_8/ChangeLog	(revision 15610)
+++ ruby_1_8/ChangeLog	(revision 15611)
@@ -1,3 +1,12 @@
+Tue Feb 26 16:06:00 2008  Technorama Ltd.  <oss-ruby@t...>
+
+	* ext/openssl/ossl_pkey_{ec,dh,dsa,rsa}.c: Remove useless warnings.
+
+	* ext/openssl/ossl_asn1.c: Simplify code.
+
+	* ext/openssl/ossl_ssl_session.c Fix compiler warnings.
+	  Undefine #id if SSL_SESSION_get_id is not supported.
+
 Tue Feb 26 15:43:42 2008  Tanaka Akira  <akr@f...>
 
 	* parse.y (tokadd_escape): refactored.  [ruby-core:15657]

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]