]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-41654: Fix compiler warning in MemoryError_dealloc() (GH-22387)
authorVictor Stinner <vstinner@python.org>
Wed, 23 Sep 2020 21:25:40 +0000 (23:25 +0200)
committerGitHub <noreply@github.com>
Wed, 23 Sep 2020 21:25:40 +0000 (23:25 +0200)
Fix warning:

Objects\exceptions.c(2324,56): warning C4098:
'MemoryError_dealloc': 'void' function returning a value

Objects/exceptions.c

index b08cbdd6aed3572d4026ff2acb7694ae3a216090..b14da20db0c4e76429d8ef55498087cb31ada691 100644 (file)
@@ -2321,7 +2321,8 @@ MemoryError_dealloc(PyBaseExceptionObject *self)
     /* If this is a subclass of MemoryError, we don't need to
      * do anything in the free-list*/
     if (!Py_IS_TYPE(self, (PyTypeObject *) PyExc_MemoryError)) {
-        return Py_TYPE(self)->tp_free((PyObject *)self);
+        Py_TYPE(self)->tp_free((PyObject *)self);
+        return;
     }
 
     _PyObject_GC_UNTRACK(self);