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

ruby-changes:67957

From: Nobuyoshi <ko1@a...>
Date: Mon, 13 Sep 2021 00:51:22 +0900 (JST)
Subject: [ruby-changes:67957] 289f3a79b5 (master): [ruby/openssl] Add fallthrough comments

https://git.ruby-lang.org/ruby.git/commit/?id=289f3a79b5

From 289f3a79b5257931004252515a56a783132941df Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Sun, 12 Sep 2021 16:38:03 +0900
Subject: [ruby/openssl] Add fallthrough comments

https://github.com/ruby/openssl/commit/258e30b640
---
 ext/openssl/ossl_pkey_ec.c | 2 ++
 ext/openssl/ossl_ssl.c     | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/ext/openssl/ossl_pkey_ec.c b/ext/openssl/ossl_pkey_ec.c
index 26c627f..a4a6143 100644
--- a/ext/openssl/ossl_pkey_ec.c
+++ b/ext/openssl/ossl_pkey_ec.c
@@ -288,6 +288,7 @@ static VALUE ossl_ec_key_set_private_key(VALUE self, VALUE private_key) https://github.com/ruby/ruby/blob/trunk/ext/openssl/ossl_pkey_ec.c#L288
     case 0:
         if (bn == NULL)
             break;
+	/* fallthrough */
     default:
         ossl_raise(eECError, "EC_KEY_set_private_key");
     }
@@ -334,6 +335,7 @@ static VALUE ossl_ec_key_set_public_key(VALUE self, VALUE public_key) https://github.com/ruby/ruby/blob/trunk/ext/openssl/ossl_pkey_ec.c#L335
     case 0:
         if (point == NULL)
             break;
+	/* fallthrough */
     default:
         ossl_raise(eECError, "EC_KEY_set_public_key");
     }
diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c
index 4f24a83..a32e1dc 100644
--- a/ext/openssl/ossl_ssl.c
+++ b/ext/openssl/ossl_ssl.c
@@ -1621,6 +1621,7 @@ ossl_start_ssl(VALUE self, int (*func)(), const char *funcname, VALUE opts) https://github.com/ruby/ruby/blob/trunk/ext/openssl/ossl_ssl.c#L1621
 			   err_msg, verify_msg);
 	    }
 #endif
+	    /* fallthrough */
 	default:
 	    ossl_raise(eSSLError, "%s returned=%d errno=%d peeraddr=%"PRIsVALUE" state=%s",
                 funcname, ret2, errno, peeraddr_ip_str(self), SSL_state_string_long(ssl));
@@ -1905,6 +1906,7 @@ ossl_ssl_write_internal(VALUE self, VALUE str, VALUE opts) https://github.com/ruby/ruby/blob/trunk/ext/openssl/ossl_ssl.c#L1906
                     continue;
 #endif
 		if (errno) rb_sys_fail(0);
+		/* fallthrough */
 	    default:
 		ossl_raise(eSSLError, "SSL_write");
 	    }
-- 
cgit v1.1


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

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