]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Silence GCC warning when asserts are turned off.
authorGuido van Rossum <guido@python.org>
Mon, 24 Nov 2003 04:02:31 +0000 (04:02 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 24 Nov 2003 04:02:31 +0000 (04:02 +0000)
Modules/gcmodule.c

index ada1f8ec360803fc50e87e5183e658cabd5c7b79..274adee8bbb9a03b4554ecd2d95cccabcd9815c2 100644 (file)
@@ -514,11 +514,10 @@ release_weakrefs(PyGC_Head *wr_callbacks, PyGC_Head *old)
        while (! gc_list_is_empty(wr_callbacks)) {
                PyGC_Head *gc = wr_callbacks->gc.gc_next;
                PyObject *op = FROM_GC(gc);
-               PyWeakReference *wr = (PyWeakReference *)op;
 
                assert(IS_REACHABLE(op));
                assert(PyWeakref_Check(op));
-               assert(wr->wr_callback != NULL);
+               assert(((PyWeakReference *)op)->wr_callback != NULL);
                Py_DECREF(op);
                if (wr_callbacks->gc.gc_next == gc) {
                        /* object is still alive -- move it */