From d3afe781b15e47784273bbb82da6122bf7be999e Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Wed, 4 Dec 2013 09:27:47 +0100 Subject: 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. --- Objects/complexobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Objects/complexobject.c') diff --git a/Objects/complexobject.c b/Objects/complexobject.c index 60a388fa24..a5b76f0460 100644 --- a/Objects/complexobject.c +++ b/Objects/complexobject.c @@ -217,7 +217,7 @@ PyComplex_FromCComplex(Py_complex cval) op = (PyComplexObject *) PyObject_MALLOC(sizeof(PyComplexObject)); if (op == NULL) return PyErr_NoMemory(); - PyObject_INIT(op, &PyComplex_Type); + (void)PyObject_INIT(op, &PyComplex_Type); op->cval = cval; return (PyObject *) op; } -- cgit v1.2.1