From c48a9bfeadd763b72cd6c2e22fdfd28f56edaf28 Mon Sep 17 00:00:00 2001 From: wmayer Date: Fri, 23 Sep 2016 16:37:12 +0200 Subject: [PATCH] fix -Wunused-parameter --- src/Gui/Application.cpp | 1 + src/Gui/Splashscreen.cpp | 6 ++++++ src/Gui/WidgetFactory.cpp | 7 +++++++ src/Tools/generateTemplates/templateClassPyExport.py | 4 ++-- 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/Gui/Application.cpp b/src/Gui/Application.cpp index 66a159d60..8a04bf8f7 100644 --- a/src/Gui/Application.cpp +++ b/src/Gui/Application.cpp @@ -1392,6 +1392,7 @@ void messageHandler(QtMsgType type, const char *msg) #endif #else // do not stress user with Qt internals but write to log file if enabled + Q_UNUSED(type); Base::Console().Log("%s\n", msg); #endif } diff --git a/src/Gui/Splashscreen.cpp b/src/Gui/Splashscreen.cpp index 56c52f3c1..879528240 100644 --- a/src/Gui/Splashscreen.cpp +++ b/src/Gui/Splashscreen.cpp @@ -102,18 +102,24 @@ public: { #ifdef FC_DEBUG Log(s); +#else + Q_UNUSED(s); #endif } void Message(const char * s) { #ifdef FC_DEBUG Log(s); +#else + Q_UNUSED(s); #endif } void Error (const char * s) { #ifdef FC_DEBUG Log(s); +#else + Q_UNUSED(s); #endif } void Log (const char * s) diff --git a/src/Gui/WidgetFactory.cpp b/src/Gui/WidgetFactory.cpp index b17277950..31dda3ab3 100644 --- a/src/Gui/WidgetFactory.cpp +++ b/src/Gui/WidgetFactory.cpp @@ -206,6 +206,7 @@ Py::Object PythonWrapper::fromQWidget(QWidget* widget, const char* className) } throw Py::RuntimeError("Failed to wrap widget"); #else + Q_UNUSED(className); Py::Module sipmod(PyImport_AddModule((char*)"sip")); Py::Callable func = sipmod.getDict().getItem("wrapinstance"); Py::Tuple arguments(2); @@ -260,6 +261,9 @@ void PythonWrapper::createChildrenNameAttributes(PyObject* root, QObject* object } createChildrenNameAttributes(root, child); } +#else + Q_UNUSED(root); + Q_UNUSED(object); #endif } @@ -270,6 +274,9 @@ void PythonWrapper::setParent(PyObject* pyWdg, QObject* parent) Shiboken::AutoDecRef pyParent(Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QWIDGET_IDX], parent)); Shiboken::Object::setParent(pyParent, pyWdg); } +#else + Q_UNUSED(pyWdg); + Q_UNUSED(parent); #endif } diff --git a/src/Tools/generateTemplates/templateClassPyExport.py b/src/Tools/generateTemplates/templateClassPyExport.py index 0a92af2bb..292ca1eb6 100644 --- a/src/Tools/generateTemplates/templateClassPyExport.py +++ b/src/Tools/generateTemplates/templateClassPyExport.py @@ -1071,12 +1071,12 @@ void @self.export.Name@::set@i.Name@(Py::@i.Parameter.Type@ arg) - + if(self.export.CustomAttributes != None): -PyObject *@self.export.Name@::getCustomAttributes(const char* attr) const +PyObject *@self.export.Name@::getCustomAttributes(const char* /*attr*/) const { return 0; } -int @self.export.Name@::setCustomAttributes(const char* attr, PyObject *obj) +int @self.export.Name@::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) { return 0; }