Skip to content

Commit

Permalink
bpo-41654: Fix compiler warning in MemoryError_dealloc() (GH-22387) (G…
Browse files Browse the repository at this point in the history
…H-24894)

Fix warning:

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

Co-authored-by: Victor Stinner <[email protected]>

Co-authored-by: Victor Stinner <[email protected]>
  • Loading branch information
miss-islington and vstinner authored Mar 16, 2021
1 parent 651fc30 commit 1f0cde6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Objects/exceptions.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1f0cde6

Please sign in to comment.