From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Tue, 16 Mar 2021 17:36:41 +0000 (-0700) Subject: bpo-41654: Fix compiler warning in MemoryError_dealloc() (GH-22387) (GH-24894) X-Git-Tag: v3.9.3~34 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1f0cde678406749524d11e852a16bf243cef5c5f;p=thirdparty%2FPython%2Fcpython.git bpo-41654: Fix compiler warning in MemoryError_dealloc() (GH-22387) (GH-24894) Fix warning: Objects\exceptions.c(2324,56): warning C4098: 'MemoryError_dealloc': 'void' function returning a value (cherry picked from commit bbeb223e9a5e9f9374df384efa386b4068a65c0e) Co-authored-by: Victor Stinner Co-authored-by: Victor Stinner --- diff --git a/Objects/exceptions.c b/Objects/exceptions.c index eb72de53e98c..e67ecfab858f 100644 --- a/Objects/exceptions.c +++ b/Objects/exceptions.c @@ -2310,7 +2310,8 @@ MemoryError_dealloc(PyBaseExceptionObject *self) BaseException_clear(self); 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);