Skip to content

Commit

Permalink
bpo-41654: Fix compiler warning in MemoryError_dealloc() (pythonGH-22387
Browse files Browse the repository at this point in the history
)

Fix warning:

Objects\exceptions.c(2324,56): warning C4098:
'MemoryError_dealloc': 'void' function returning a value
  • Loading branch information
vstinner authored Sep 23, 2020
1 parent 98c16c9 commit bbeb223
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 @@ -2321,7 +2321,8 @@ MemoryError_dealloc(PyBaseExceptionObject *self)
/* If this is a subclass of MemoryError, we don't need to
* do anything in the free-list*/
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 bbeb223

Please sign in to comment.