From: Neal Norwitz Date: Mon, 21 Aug 2006 18:01:30 +0000 (+0000) Subject: Add assert to make Klocwork happy (#276) X-Git-Tag: v2.6a1~2762 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=87557cd72a75ee3d7e8c6a53ee01bab0bc6ec73a;p=python Add assert to make Klocwork happy (#276) --- diff --git a/Python/compile.c b/Python/compile.c index 067c04d12a..5aaf809cd4 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -568,6 +568,7 @@ compiler_exit_scope(struct compiler *c) if (n >= 0) { wrapper = PyList_GET_ITEM(c->c_stack, n); c->u = (struct compiler_unit *)PyCObject_AsVoidPtr(wrapper); + assert(c->u); /* we are deleting from a list so this really shouldn't fail */ if (PySequence_DelItem(c->c_stack, n) < 0) Py_FatalError("compiler_exit_scope()");