[Python-checkins] bpo-41654: Fix compiler warning in MemoryError_dealloc() (GH-22387) (GH-24894)
vstinner
webhook-mailer at python.org
Tue Mar 16 13:36:51 EDT 2021
https://github.com/python/cpython/commit/1f0cde678406749524d11e852a16bf243cef5c5f
commit: 1f0cde678406749524d11e852a16bf243cef5c5f
branch: 3.9
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: vstinner <vstinner at python.org>
date: 2021-03-16T18:36:41+01:00
summary:
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 <vstinner at python.org>
Co-authored-by: Victor Stinner <vstinner at python.org>
files:
M Objects/exceptions.c
diff --git a/Objects/exceptions.c b/Objects/exceptions.c
index eb72de53e98c1..e67ecfab858fb 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);
More information about the Python-checkins
mailing list