From 07378c0598d143c7a7fc4430a607ea03b5b28cef Mon Sep 17 00:00:00 2001 From: Julien Schueller Date: Wed, 13 Nov 2019 11:32:07 +0100 Subject: [PATCH] [PATCH] Fix -Wextra warnings Signed-off-by: Ovidiu Mircescu --- tools/PyInterp/src/PyInterp_Interp.cxx | 6 +++--- tools/PyInterp/src/PyInterp_RefCounterObj.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/PyInterp/src/PyInterp_Interp.cxx b/tools/PyInterp/src/PyInterp_Interp.cxx index b589f80e0..e741cce27 100644 --- a/tools/PyInterp/src/PyInterp_Interp.cxx +++ b/tools/PyInterp/src/PyInterp_Interp.cxx @@ -72,7 +72,7 @@ PyStdOut_write(PyStdOut *self, PyObject *args) } static PyObject* -PyStdOut_flush(PyStdOut *self) +PyStdOut_flush(PyStdOut * /*self*/, PyObject * /*args*/) { Py_INCREF(Py_None); return Py_None; @@ -81,13 +81,13 @@ PyStdOut_flush(PyStdOut *self) static PyMethodDef PyStdOut_methods[] = { {"write", (PyCFunction)PyStdOut_write, METH_VARARGS, PyDoc_STR("write(string) -> None")}, {"flush", (PyCFunction)PyStdOut_flush, METH_NOARGS, PyDoc_STR("flush() -> None")}, - {NULL, NULL} /* sentinel */ + {NULL, (PyCFunction)NULL, 0, NULL} /* sentinel */ }; static PyMemberDef PyStdOut_memberlist[] = { {(char*)"softspace", T_INT, offsetof(PyStdOut, softspace), 0, (char*)"flag indicating that a space needs to be printed; used by print"}, - {NULL} /* Sentinel */ + {NULL, 0, 0, 0, NULL} /* Sentinel */ }; static PyTypeObject PyStdOut_Type = { diff --git a/tools/PyInterp/src/PyInterp_RefCounterObj.h b/tools/PyInterp/src/PyInterp_RefCounterObj.h index c430b01f0..00f2c1a9d 100644 --- a/tools/PyInterp/src/PyInterp_RefCounterObj.h +++ b/tools/PyInterp/src/PyInterp_RefCounterObj.h @@ -58,7 +58,7 @@ class PYINTERP_EXPORT PyInterp_RefCounterObj { protected: PyInterp_RefCounterObj():_cnt(1) { } - PyInterp_RefCounterObj(const PyInterp_RefCounterObj& other):_cnt(1) { } + PyInterp_RefCounterObj(const PyInterp_RefCounterObj& /*other*/):_cnt(1) { } public: bool decrRef() const { @@ -70,7 +70,7 @@ class PYINTERP_EXPORT PyInterp_RefCounterObj void incrRef() const { _cnt++; } int getRCValue() const { return _cnt; } // copies using operator= should not copy the ref counter of \a other - PyInterp_RefCounterObj& operator=(const PyInterp_RefCounterObj& other) { return *this; } + PyInterp_RefCounterObj& operator=(const PyInterp_RefCounterObj& /*other*/) { return *this; } protected: virtual ~PyInterp_RefCounterObj() { } private: -- 2.39.2