diff options
author | Christian Heimes <christian@cheimes.de> | 2013-12-04 08:27:47 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2013-12-04 08:27:47 (GMT) |
commit | d3afe781b15e47784273bbb82da6122bf7be999e (patch) | |
tree | 27d82efd6f047cc0d39076cb1cd20b872a6adc1c /Objects/complexobject.c | |
parent | 47f02e5e176c87d498601657ccc43bdf92cd9edf (diff) | |
download | cpython-d3afe781b15e47784273bbb82da6122bf7be999e.zip cpython-d3afe781b15e47784273bbb82da6122bf7be999e.tar.gz cpython-d3afe781b15e47784273bbb82da6122bf7be999e.tar.bz2 |
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.
Diffstat (limited to 'Objects/complexobject.c')
-rw-r--r-- | Objects/complexobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/complexobject.c b/Objects/complexobject.c index 60a388f..a5b76f0 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; } |