fix several gcc warnings

This commit is contained in:
wmayer
2016-11-08 14:31:08 +01:00
parent d2d927e760
commit ff2a361928
6 changed files with 15 additions and 13 deletions

View File

@@ -116,12 +116,12 @@ PyObject* ExtensionContainerPy::hasExtension(PyObject *args) {
throw Py::Exception(Base::BaseExceptionFreeCADError,str.str());
}
if(getExtensionContainerPtr()->hasExtension(extension)) {
Py_INCREF(Py_True);
return Py_True;
bool val = false;
if (getExtensionContainerPtr()->hasExtension(extension)) {
val = true;
}
Py_INCREF(Py_False);
return Py_False;
return PyBool_FromLong(val ? 1 : 0);
}
PyObject* ExtensionContainerPy::addExtension(PyObject *args) {