From: Guido van Rossum Date: Mon, 24 Nov 2003 04:02:31 +0000 (+0000) Subject: Silence GCC warning when asserts are turned off. X-Git-Tag: v2.3.3c1~39 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5c20156349dfcae361f7565871c8590d2a30a1a6;p=thirdparty%2FPython%2Fcpython.git Silence GCC warning when asserts are turned off. --- diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c index ada1f8ec3608..274adee8bbb9 100644 --- a/Modules/gcmodule.c +++ b/Modules/gcmodule.c @@ -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 */