mirror of
https://github.com/python/cpython.git
synced 2025-12-09 10:37:17 +00:00
bpo-36292: Mark unreachable code as such in long bitwise ops (GH-12333)
This commit is contained in:
parent
f7b57df0c0
commit
a10d426bab
1 changed files with 2 additions and 4 deletions
|
|
@ -4637,8 +4637,7 @@ long_bitwise(PyLongObject *a,
|
||||||
size_z = negb ? size_b : size_a;
|
size_z = negb ? size_b : size_a;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
PyErr_BadArgument();
|
Py_UNREACHABLE();
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We allow an extra digit if z is negative, to make sure that
|
/* 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];
|
z->ob_digit[i] = a->ob_digit[i] ^ b->ob_digit[i];
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
PyErr_BadArgument();
|
Py_UNREACHABLE();
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Copy any remaining digits of a, inverting if necessary. */
|
/* Copy any remaining digits of a, inverting if necessary. */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue