summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/bigdecimal/bigdecimal.c2
-rw-r--r--ext/digest/digest.c8
-rw-r--r--ext/dl/handle.c2
-rw-r--r--ext/fiddle/conversions.c2
-rw-r--r--ext/openssl/ossl_pkey_ec.c6
-rw-r--r--ext/openssl/ossl_ssl.c2
-rw-r--r--ext/ripper/eventids2.c2
-rw-r--r--ext/socket/raddrinfo.c2
-rw-r--r--ext/socket/socket.c2
-rw-r--r--ext/tk/tcltklib.c10
-rw-r--r--ext/tk/tkutil/tkutil.c2
11 files changed, 40 insertions, 0 deletions
diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c
index 3fbb9a88835..041d33fd7d0 100644
--- a/ext/bigdecimal/bigdecimal.c
+++ b/ext/bigdecimal/bigdecimal.c
@@ -971,6 +971,8 @@ BigDecimalCmp(VALUE self, VALUE r,char op)
}
rb_bug("Undefined operation in BigDecimalCmp()");
+
+ UNREACHABLE;
}
/* Returns True if the value is zero. */
diff --git a/ext/digest/digest.c b/ext/digest/digest.c
index 956f47ff78c..4d185a8e5df 100644
--- a/ext/digest/digest.c
+++ b/ext/digest/digest.c
@@ -154,6 +154,8 @@ static VALUE
rb_digest_instance_update(VALUE self, VALUE str)
{
rb_digest_instance_method_unimpl(self, "update");
+
+ UNREACHABLE;
}
/*
@@ -172,6 +174,8 @@ static VALUE
rb_digest_instance_finish(VALUE self)
{
rb_digest_instance_method_unimpl(self, "finish");
+
+ UNREACHABLE;
}
/*
@@ -186,6 +190,8 @@ static VALUE
rb_digest_instance_reset(VALUE self)
{
rb_digest_instance_method_unimpl(self, "reset");
+
+ UNREACHABLE;
}
/*
@@ -409,6 +415,8 @@ static VALUE
rb_digest_instance_block_length(VALUE self)
{
rb_digest_instance_method_unimpl(self, "block_length");
+
+ UNREACHABLE;
}
/*
diff --git a/ext/dl/handle.c b/ext/dl/handle.c
index 2037ab5760f..ef182e816fc 100644
--- a/ext/dl/handle.c
+++ b/ext/dl/handle.c
@@ -78,6 +78,8 @@ rb_dlhandle_close(VALUE self)
return INT2NUM(ret);
}
rb_raise(rb_eDLError, "dlclose() called too many times");
+
+ UNREACHABLE;
}
VALUE
diff --git a/ext/fiddle/conversions.c b/ext/fiddle/conversions.c
index f2c15117787..d40ddc1f38f 100644
--- a/ext/fiddle/conversions.c
+++ b/ext/fiddle/conversions.c
@@ -134,6 +134,8 @@ generic_to_value(VALUE rettype, fiddle_generic retval)
default:
rb_raise(rb_eRuntimeError, "unknown type %d", type);
}
+
+ UNREACHABLE;
}
/* vim: set noet sw=4 sts=4 */
diff --git a/ext/openssl/ossl_pkey_ec.c b/ext/openssl/ossl_pkey_ec.c
index 9f1050f62d9..cfcaf97ab51 100644
--- a/ext/openssl/ossl_pkey_ec.c
+++ b/ext/openssl/ossl_pkey_ec.c
@@ -700,6 +700,8 @@ static VALUE ossl_ec_key_dsa_verify_asn1(VALUE self, VALUE data, VALUE sig)
}
ossl_raise(eECError, "ECDSA_verify");
+
+ UNREACHABLE;
}
static void ossl_ec_group_free(ossl_ec_group *ec_group)
@@ -1349,6 +1351,8 @@ static VALUE ossl_ec_point_is_at_infinity(VALUE self)
case 0: return Qfalse;
default: ossl_raise(cEC_POINT, "EC_POINT_is_at_infinity");
}
+
+ UNREACHABLE;
}
/*
@@ -1370,6 +1374,8 @@ static VALUE ossl_ec_point_is_on_curve(VALUE self)
case 0: return Qfalse;
default: ossl_raise(cEC_POINT, "EC_POINT_is_on_curve");
}
+
+ UNREACHABLE;
}
/*
diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c
index c55b7796f70..79941db1ee0 100644
--- a/ext/openssl/ossl_ssl.c
+++ b/ext/openssl/ossl_ssl.c
@@ -1593,6 +1593,8 @@ ossl_ssl_session_reused(VALUE self)
case 0: return Qfalse;
default: ossl_raise(eSSLError, "SSL_session_reused");
}
+
+ UNREACHABLE;
}
/*
diff --git a/ext/ripper/eventids2.c b/ext/ripper/eventids2.c
index 946978954a6..18d2d2a28a4 100644
--- a/ext/ripper/eventids2.c
+++ b/ext/ripper/eventids2.c
@@ -275,4 +275,6 @@ ripper_token2eventid(int tok)
return ripper_id_CHAR;
}
rb_raise(rb_eRuntimeError, "[Ripper FATAL] unknown token %d", tok);
+
+ UNREACHABLE;
}
diff --git a/ext/socket/raddrinfo.c b/ext/socket/raddrinfo.c
index a9a4535741b..f71d0f9c655 100644
--- a/ext/socket/raddrinfo.c
+++ b/ext/socket/raddrinfo.c
@@ -2144,6 +2144,8 @@ rsock_io_socket_addrinfo(VALUE io, struct sockaddr *addr, socklen_t len)
default:
rb_raise(rb_eTypeError, "neither IO nor file descriptor");
}
+
+ UNREACHABLE;
}
/*
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index 872dd65b85f..d2177e505da 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -1334,6 +1334,8 @@ sock_s_getnameinfo(int argc, VALUE *argv)
error_exit_name:
if (res) freeaddrinfo(res);
rsock_raise_socket_error("getnameinfo", error);
+
+ UNREACHABLE;
}
/*
diff --git a/ext/tk/tcltklib.c b/ext/tk/tcltklib.c
index e3c5ea0c79f..02571d62fba 100644
--- a/ext/tk/tcltklib.c
+++ b/ext/tk/tcltklib.c
@@ -1407,6 +1407,8 @@ pending_exception_check0()
} else {
return 0;
}
+
+ UNREACHABLE;
}
static int
@@ -1448,6 +1450,8 @@ pending_exception_check1(thr_crit_bup, ptr)
} else {
return 0;
}
+
+ UNREACHABLE;
}
@@ -7781,6 +7785,8 @@ ip_cancel_eval_core(interp, msg, flag)
#if TCL_MAJOR_VERSION < 8 || (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION < 6)
rb_raise(rb_eNotImpError,
"cancel_eval is supported Tcl/Tk8.6 or later.");
+
+ UNREACHABLE;
#else
Tcl_Obj *msg_obj;
@@ -10014,6 +10020,8 @@ lib_get_reltype_name(self)
default:
rb_raise(rb_eRuntimeError, "tcltklib has invalid release type number");
}
+
+ UNREACHABLE;
}
@@ -10117,6 +10125,8 @@ create_dummy_encoding_for_tk_core(interp, name, error_mode)
return Qnil;
}
}
+
+ UNREACHABLE;
#else
return name;
#endif
diff --git a/ext/tk/tkutil/tkutil.c b/ext/tk/tkutil/tkutil.c
index 956c6737c9e..0e256921ba1 100644
--- a/ext/tk/tkutil/tkutil.c
+++ b/ext/tk/tkutil/tkutil.c
@@ -800,6 +800,8 @@ tk_hash_kv(argc, argv, self)
}
rb_raise(rb_eArgError, "Hash is expected for 1st argument");
}
+
+ UNREACHABLE;
}
static VALUE