From 1f0cde678406749524d11e852a16bf243cef5c5f Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Tue, 16 Mar 2021 10:36:41 -0700 Subject: 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 --- Objects/exceptions.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Objects/exceptions.c b/Objects/exceptions.c index eb72de5..e67ecfa 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); -- cgit v0.12