Visitar URL original
bpo-41654: Fix compiler warning in MemoryError_dealloc() by vstinner · Pull Request #22387 · python/cpython · GitHub
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
bpo-41654: Fix compiler warning in MemoryError_dealloc()
Fix warning:

Objects\exceptions.c(2324,56): warning C4098:
'MemoryError_dealloc': 'void' function returning a value
  • Loading branch information
vstinner committed Sep 23, 2020
commit 30caab00cfc32fea6eb7359a5cfb34b6e65a5d99
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