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 bbeb223e9a)

Co-authored-by: Victor Stinner <vstinner@python.org>

Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
Miss Islington (bot) 2021-03-16 10:36:41 -07:00 committed by GitHub
parent 651fc30af7
commit 1f0cde6784
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);