diff options
author | stratakis <cstratak@redhat.com> | 2019-03-18 17:59:20 (GMT) |
---|---|---|
committer | Victor Stinner <vstinner@redhat.com> | 2019-03-18 17:59:20 (GMT) |
commit | a10d426bab66a4e1f20d5e1b9aee3dbb435cf309 (patch) | |
tree | b54481545686ad0b3890e2765a9346201b949ac2 /Objects | |
parent | f7b57df0c09c3a04ab27ba06eb2feb989bbb16cb (diff) | |
download | cpython-a10d426bab66a4e1f20d5e1b9aee3dbb435cf309.zip cpython-a10d426bab66a4e1f20d5e1b9aee3dbb435cf309.tar.gz cpython-a10d426bab66a4e1f20d5e1b9aee3dbb435cf309.tar.bz2 |
bpo-36292: Mark unreachable code as such in long bitwise ops (GH-12333)
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/longobject.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Objects/longobject.c b/Objects/longobject.c index 1e3445c..da697a7 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -4637,8 +4637,7 @@ long_bitwise(PyLongObject *a, size_z = negb ? size_b : size_a; break; default: - PyErr_BadArgument(); - return NULL; + Py_UNREACHABLE(); } /* We allow an extra digit if z is negative, to make sure that @@ -4665,8 +4664,7 @@ long_bitwise(PyLongObject *a, z->ob_digit[i] = a->ob_digit[i] ^ b->ob_digit[i]; break; default: - PyErr_BadArgument(); - return NULL; + Py_UNREACHABLE(); } /* Copy any remaining digits of a, inverting if necessary. */ |