diff --git a/src/Mod/Fem/App/FemPostFilterPyImp.cpp b/src/Mod/Fem/App/FemPostFilterPyImp.cpp index e8f91f63ca..af92e49375 100644 --- a/src/Mod/Fem/App/FemPostFilterPyImp.cpp +++ b/src/Mod/Fem/App/FemPostFilterPyImp.cpp @@ -50,7 +50,7 @@ std::string FemPostFilterPy::representation() const } -PyObject* FemPostFilterPy::addFilterPipeline(PyObject* args) +PyObject* FemPostFilterPy::addFilterPipeline([[maybe_unused]] PyObject* args) { #ifdef FC_USE_VTK_PYTHON const char* name; @@ -84,7 +84,6 @@ PyObject* FemPostFilterPy::addFilterPipeline(PyObject* args) Py_Return; #else - (void)args; PyErr_SetString(PyExc_NotImplementedError, "VTK python wrapper not available"); return nullptr; #endif @@ -117,7 +116,7 @@ PyObject* FemPostFilterPy::getParentPostGroup(PyObject* args) Py_Return; } -PyObject* FemPostFilterPy::getInputData(PyObject* args) +PyObject* FemPostFilterPy::getInputData([[maybe_unused]] PyObject* args) { #ifdef FC_USE_VTK_PYTHON // we take no arguments @@ -146,7 +145,6 @@ PyObject* FemPostFilterPy::getInputData(PyObject* args) return py_dataset; #else - (void)args; PyErr_SetString(PyExc_NotImplementedError, "VTK python wrapper not available"); return nullptr; #endif @@ -189,7 +187,7 @@ PyObject* FemPostFilterPy::getInputScalarFields(PyObject* args) return Py::new_reference_to(list); } -PyObject* FemPostFilterPy::getOutputAlgorithm(PyObject* args) +PyObject* FemPostFilterPy::getOutputAlgorithm([[maybe_unused]] PyObject* args) { #ifdef FC_USE_VTK_PYTHON // we take no arguments @@ -203,7 +201,6 @@ PyObject* FemPostFilterPy::getOutputAlgorithm(PyObject* args) return py_algorithm; #else - (void)args; PyErr_SetString(PyExc_NotImplementedError, "VTK python wrapper not available"); return nullptr; #endif diff --git a/src/Mod/Fem/App/FemPostObjectPyImp.cpp b/src/Mod/Fem/App/FemPostObjectPyImp.cpp index 394a94c272..a573814639 100644 --- a/src/Mod/Fem/App/FemPostObjectPyImp.cpp +++ b/src/Mod/Fem/App/FemPostObjectPyImp.cpp @@ -23,7 +23,6 @@ #include - #include "FemPostObjectPy.h" #include "FemPostObjectPy.cpp" @@ -57,7 +56,7 @@ PyObject* FemPostObjectPy::writeVTK(PyObject* args) Py_Return; } -PyObject* FemPostObjectPy::getDataSet(PyObject* args) +PyObject* FemPostObjectPy::getDataSet([[maybe_unused]] PyObject* args) { #ifdef FC_USE_VTK_PYTHON // we take no arguments @@ -74,7 +73,6 @@ PyObject* FemPostObjectPy::getDataSet(PyObject* args) Py_Return; #else - (void)args; PyErr_SetString(PyExc_NotImplementedError, "VTK python wrapper not available"); return nullptr; #endif diff --git a/src/Mod/Fem/App/FemPostPipelinePyImp.cpp b/src/Mod/Fem/App/FemPostPipelinePyImp.cpp index ede97fa670..33feeb5c1b 100644 --- a/src/Mod/Fem/App/FemPostPipelinePyImp.cpp +++ b/src/Mod/Fem/App/FemPostPipelinePyImp.cpp @@ -22,15 +22,12 @@ #include - #include #include -// clang-format off #include "FemPostPipeline.h" #include "FemPostPipelinePy.h" #include "FemPostPipelinePy.cpp" -// clang-format on #ifdef FC_USE_VTK_PYTHON # include @@ -304,7 +301,7 @@ PyObject* FemPostPipelinePy::renameArrays(PyObject* args) Py_Return; } -PyObject* FemPostPipelinePy::getOutputAlgorithm(PyObject* args) +PyObject* FemPostPipelinePy::getOutputAlgorithm([[maybe_unused]] PyObject* args) { #ifdef FC_USE_VTK_PYTHON // we take no arguments @@ -318,7 +315,6 @@ PyObject* FemPostPipelinePy::getOutputAlgorithm(PyObject* args) return py_algorithm; #else - (void)args; PyErr_SetString(PyExc_NotImplementedError, "VTK python wrapper not available"); return nullptr; #endif diff --git a/src/Mod/Fem/App/FemVTKTools.cpp b/src/Mod/Fem/App/FemVTKTools.cpp index 79dd68270a..61f9311814 100644 --- a/src/Mod/Fem/App/FemVTKTools.cpp +++ b/src/Mod/Fem/App/FemVTKTools.cpp @@ -1421,18 +1421,12 @@ std::vector readElements( } // read parameter header (not used) -void readParameter(std::ifstream& ifstr, const std::string& line) -{ - // do nothing - (void)ifstr; - (void)line; -} +void readParameter([[maybe_unused]] std::ifstream& ifstr, [[maybe_unused]] const std::string& line) +{} // read first header from nodal result block -void readResultInfo(std::ifstream& ifstr, const std::string& lines, FRDResultInfo& info) +void readResultInfo([[maybe_unused]] std::ifstream& ifstr, const std::string& lines, FRDResultInfo& info) { - (void)ifstr; - std::string keyCode = " 100C"; std::string_view view {lines}; @@ -1459,14 +1453,13 @@ void readResultInfo(std::ifstream& ifstr, const std::string& lines, FRDResultInf // read result from nodal result block and add result array to grid void readResults( std::ifstream& ifstr, - const std::string& lines, + [[maybe_unused]] const std::string& lines, const std::map& mapNodes, const FRDResultInfo& info, vtkSmartPointer& grid ) { int digits = getDigits(info.indicator); - (void)lines; // get dataset info, start with " -4" std::string line; diff --git a/src/Mod/Fem/App/PropertyPostDataObject.cpp b/src/Mod/Fem/App/PropertyPostDataObject.cpp index df098cddfc..7a001d5714 100644 --- a/src/Mod/Fem/App/PropertyPostDataObject.cpp +++ b/src/Mod/Fem/App/PropertyPostDataObject.cpp @@ -185,7 +185,7 @@ PyObject* PropertyPostDataObject::getPyObject() #endif } -void PropertyPostDataObject::setPyObject(PyObject* value) +void PropertyPostDataObject::setPyObject([[maybe_unused]] PyObject* value) { #ifdef FC_USE_VTK_PYTHON vtkObjectBase* obj = vtkPythonUtil::GetPointerFromObject(value, "vtkDataObject");