From: Julien Schueller Date: Wed, 13 Nov 2019 10:32:07 +0000 (+0100) Subject: [PATCH] Fix -Wextra warnings X-Git-Tag: V9_5_0a1~11 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=07378c0598d143c7a7fc4430a607ea03b5b28cef;p=modules%2Fgui.git [PATCH] Fix -Wextra warnings Signed-off-by: Ovidiu Mircescu --- 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: