From 0bba722fff2bac1bf6a03b994a0a9d516a413ab5 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Mon, 24 Nov 2003 04:02:13 +0000 Subject: [PATCH] Silence GCC warning when asserts are turned off. --- Modules/gcmodule.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c index 7976b40058d..f92358b7f40 100644 --- a/Modules/gcmodule.c +++ b/Modules/gcmodule.c @@ -533,11 +533,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 */