[ruby/openssl] Add fallthrough comments

https://github.com/ruby/openssl/commit/258e30b640
This commit is contained in:
Nobuyoshi Nakada 2021-09-12 16:38:03 +09:00
parent 6920f3dc96
commit 289f3a79b5
2 changed files with 4 additions and 0 deletions

View File

@ -288,6 +288,7 @@ static VALUE ossl_ec_key_set_private_key(VALUE self, VALUE private_key)
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)
case 0:
if (point == NULL)
break;
/* fallthrough */
default:
ossl_raise(eECError, "EC_KEY_set_public_key");
}

View File

@ -1621,6 +1621,7 @@ ossl_start_ssl(VALUE self, int (*func)(), const char *funcname, VALUE opts)
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)
continue;
#endif
if (errno) rb_sys_fail(0);
/* fallthrough */
default:
ossl_raise(eSSLError, "SSL_write");
}