]> granicus.if.org Git - python/commitdiff
Add assert to make Klocwork happy (#276)
authorNeal Norwitz <nnorwitz@gmail.com>
Mon, 21 Aug 2006 18:01:30 +0000 (18:01 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Mon, 21 Aug 2006 18:01:30 +0000 (18:01 +0000)
Python/compile.c

index 067c04d12af55eda346afb4615264c37dcc07284..5aaf809cd48799f4d7e548be12a0c3daf8cb9cd5 100644 (file)
@@ -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()");