mirror of
https://github.com/python/cpython.git
synced 2025-07-29 14:15:07 +00:00
Add assert to make Klocwork happy (#276)
This commit is contained in:
parent
8a519392d5
commit
87557cd72a
1 changed files with 1 additions and 0 deletions
|
@ -568,6 +568,7 @@ compiler_exit_scope(struct compiler *c)
|
||||||
if (n >= 0) {
|
if (n >= 0) {
|
||||||
wrapper = PyList_GET_ITEM(c->c_stack, n);
|
wrapper = PyList_GET_ITEM(c->c_stack, n);
|
||||||
c->u = (struct compiler_unit *)PyCObject_AsVoidPtr(wrapper);
|
c->u = (struct compiler_unit *)PyCObject_AsVoidPtr(wrapper);
|
||||||
|
assert(c->u);
|
||||||
/* we are deleting from a list so this really shouldn't fail */
|
/* we are deleting from a list so this really shouldn't fail */
|
||||||
if (PySequence_DelItem(c->c_stack, n) < 0)
|
if (PySequence_DelItem(c->c_stack, n) < 0)
|
||||||
Py_FatalError("compiler_exit_scope()");
|
Py_FatalError("compiler_exit_scope()");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue