mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Silence expression result unused warnings with clang.
The PyObject_INIT() macros returns obj: ../cpython/Objects/methodobject.c:32:23: warning: expression result unused [-Wunused-value] PyObject_INIT(op, &PyCFunction_Type); ^~ ../cpython/Include/objimpl.h:139:69: note: expanded from macro 'PyObject_INIT' ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) ^ 1 warning generated.
This commit is contained in:
parent
47f02e5e17
commit
d3afe781b1
7 changed files with 9 additions and 9 deletions
|
@ -52,7 +52,7 @@ PyMethod_New(PyObject *func, PyObject *self)
|
|||
im = free_list;
|
||||
if (im != NULL) {
|
||||
free_list = (PyMethodObject *)(im->im_self);
|
||||
PyObject_INIT(im, &PyMethod_Type);
|
||||
(void)PyObject_INIT(im, &PyMethod_Type);
|
||||
numfree--;
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue