Project

General

Profile

Bug #6066 » return.UNREACHABLE.patch

Updated combined patch using UNREACHABLE - drbrain (Eric Hodel), 02/26/2012 01:39 PM

View differences:

encoding.c (working copy)
}
else
rb_raise(rb_eArgError, "invalid byte sequence in %s", rb_enc_name(enc));
UNREACHABLE;
}
#undef rb_enc_codepoint
re.c (working copy)
rb_raise(rb_eIndexError, "undefined group name reference: %s",
StringValuePtr(s));
}
UNREACHABLE;
}
/*
object.c (working copy)
default:
return rb_convert_type(val, T_FLOAT, "Float", "to_f");
}
UNREACHABLE;
}
/*
io.c (working copy)
rb_eof_error();
else
return ret;
UNREACHABLE;
}
/*
......
rb_eof_error();
else
return ret;
UNREACHABLE;
}
/*
pack.c (working copy)
return 6;
}
rb_raise(rb_eRangeError, "pack(U): value out of range");
UNREACHABLE;
}
static const unsigned long utf8_limits[] = {
proc.c (working copy)
}
}
rb_bug("rb_method_entry_arity: invalid method entry type (%d)", def->type);
UNREACHABLE;
}
/*
vm_method.c (working copy)
rb_f_notimplement(int argc, VALUE *argv, VALUE obj)
{
rb_notimplement();
UNREACHABLE;
}
static void
struct.c (working copy)
}
}
rb_name_error(id, "no member '%s' in struct", rb_id2name(id));
UNREACHABLE;
}
/*
class.c (working copy)
else
rb_raise(rb_eArgError, "wrong number of arguments (%d for %d%s)",
argc, n_mand, f_var ? "+" : "");
UNREACHABLE;
}
/*!
process.c (working copy)
return r;
rb_raise(rb_eArgError, "invalid resource name: %s", name);
UNREACHABLE;
}
static rlim_t
......
if (strcmp(name, "SAVED_CUR") == 0) return RLIM_SAVED_CUR;
#endif
rb_raise(rb_eArgError, "invalid resource value: %s", name);
UNREACHABLE;
}
#endif
......
errno = EPERM;
rb_sys_fail(0);
}
UNREACHABLE;
}
#else
static VALUE
......
errno = EPERM;
rb_sys_fail(0);
}
UNREACHABLE;
}
#else
static VALUE
ext/digest/digest.c (working copy)
rb_digest_instance_update(VALUE self, VALUE str)
{
rb_digest_instance_method_unimpl(self, "update");
UNREACHABLE;
}
/*
......
rb_digest_instance_finish(VALUE self)
{
rb_digest_instance_method_unimpl(self, "finish");
UNREACHABLE;
}
/*
......
rb_digest_instance_reset(VALUE self)
{
rb_digest_instance_method_unimpl(self, "reset");
UNREACHABLE;
}
/*
......
rb_digest_instance_block_length(VALUE self)
{
rb_digest_instance_method_unimpl(self, "block_length");
UNREACHABLE;
}
/*
ext/bigdecimal/bigdecimal.c (working copy)
}
rb_bug("Undefined operation in BigDecimalCmp()");
UNREACHABLE;
}
/* Returns True if the value is zero. */
ext/dl/handle.c (working copy)
return INT2NUM(ret);
}
rb_raise(rb_eDLError, "dlclose() called too many times");
UNREACHABLE;
}
VALUE
ext/tk/tcltklib.c (working copy)
} else {
return 0;
}
UNREACHABLE;
}
static int
......
} else {
return 0;
}
UNREACHABLE;
}
......
#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;
......
default:
rb_raise(rb_eRuntimeError, "tcltklib has invalid release type number");
}
UNREACHABLE;
}
......
return Qnil;
}
}
UNREACHABLE;
#else
return name;
#endif
ext/tk/tkutil/tkutil.c (working copy)
}
rb_raise(rb_eArgError, "Hash is expected for 1st argument");
}
UNREACHABLE;
}
static VALUE
ext/openssl/ossl_ssl.c (working copy)
case 0: return Qfalse;
default: ossl_raise(eSSLError, "SSL_session_reused");
}
UNREACHABLE;
}
/*
ext/openssl/ossl_pkey_ec.c (working copy)
}
ossl_raise(eECError, "ECDSA_verify");
UNREACHABLE;
}
static void ossl_ec_group_free(ossl_ec_group *ec_group)
......
case 0: return Qfalse;
default: ossl_raise(cEC_POINT, "EC_POINT_is_at_infinity");
}
UNREACHABLE;
}
/*
......
case 0: return Qfalse;
default: ossl_raise(cEC_POINT, "EC_POINT_is_on_curve");
}
UNREACHABLE;
}
/*
ext/fiddle/conversions.c (working copy)
default:
rb_raise(rb_eRuntimeError, "unknown type %d", type);
}
UNREACHABLE;
}
/* vim: set noet sw=4 sts=4 */
ext/socket/raddrinfo.c (working copy)
default:
rb_raise(rb_eTypeError, "neither IO nor file descriptor");
}
UNREACHABLE;
}
/*
ext/socket/socket.c (working copy)
error_exit_name:
if (res) freeaddrinfo(res);
rsock_raise_socket_error("getnameinfo", error);
UNREACHABLE;
}
/*
ext/ripper/eventids2.c (working copy)
return ripper_id_CHAR;
}
rb_raise(rb_eRuntimeError, "[Ripper FATAL] unknown token %d", tok);
UNREACHABLE;
}
cont.c (working copy)
fib->prev = Qnil;
return prev;
}
UNREACHABLE;
}
VALUE rb_fiber_transfer(VALUE fib, int argc, VALUE *argv);
dmydln.c (working copy)
dln_load(const char *file)
{
rb_loaderror("this executable file can't load extension libraries");
UNREACHABLE;
}
vm_insnhelper.c (working copy)
else {
rb_bug("vm_search_normal_superclass: should not be reach here");
}
UNREACHABLE;
}
static void
bignum.c (working copy)
goto bignum;
}
rb_bug("big_fdiv");
/* NOTREACHED */
UNREACHABLE;
}
/*
marshal.c (working copy)
return (ID)id;
}
rb_raise(rb_eArgError, "bad symbol");
UNREACHABLE;
}
static ID
......
rb_raise(rb_eArgError, "dump format error for symbol(0x%x)", type);
break;
}
UNREACHABLE;
}
static VALUE
(10-10/11)