diff --git a/src/App/Application.cpp b/src/App/Application.cpp index c169cf7caf..75d9d621ee 100644 --- a/src/App/Application.cpp +++ b/src/App/Application.cpp @@ -1214,8 +1214,7 @@ void segmentation_fault_handler(int sig) std::cerr << "Program received signal SIGSEGV, Segmentation fault.\n"; printBacktrace(2); exit(1); -#endif - +#else switch (sig) { case SIGSEGV: std::cerr << "Illegal storage access..." << std::endl; @@ -1233,6 +1232,7 @@ void segmentation_fault_handler(int sig) std::cerr << "Unknown error occurred..." << std::endl; break; } +#endif // FC_OS_LINUX } void unhandled_exception_handler() diff --git a/src/Mod/Part/App/AttachExtension.cpp b/src/Mod/Part/App/AttachExtension.cpp index bb7a87163e..0e6929b41a 100644 --- a/src/Mod/Part/App/AttachExtension.cpp +++ b/src/Mod/Part/App/AttachExtension.cpp @@ -110,13 +110,11 @@ bool AttachExtension::changeAttacherType(const char* typeName) AttachEngine* pNewAttacher = static_cast(Base::Type::createInstanceByName(typeName)); this->setAttacher(pNewAttacher); return true; - } else { - std::stringstream errMsg; - errMsg << "Object if this type is not derived from AttachEngine: " << typeName; - throw AttachEngineException(errMsg.str()); } - assert(false);//exec shouldn't ever get here - return false; + + std::stringstream errMsg; + errMsg << "Object if this type is not derived from AttachEngine: " << typeName; + throw AttachEngineException(errMsg.str()); } bool AttachExtension::positionBySupport() diff --git a/src/Mod/Part/App/GeometryCurvePyImp.cpp b/src/Mod/Part/App/GeometryCurvePyImp.cpp index 4745268038..f104bad405 100644 --- a/src/Mod/Part/App/GeometryCurvePyImp.cpp +++ b/src/Mod/Part/App/GeometryCurvePyImp.cpp @@ -819,9 +819,6 @@ PyObject* GeometryCurvePy::intersectCC(PyObject *args) PyErr_SetString(PyExc_RuntimeError, e.what()); return 0; } - - PyErr_SetString(PyExc_TypeError, "Geometry is not a curve"); - return 0; } // General intersection function diff --git a/src/Mod/Sketcher/App/SketchObject.cpp b/src/Mod/Sketcher/App/SketchObject.cpp index 3d7aa28677..240886c669 100644 --- a/src/Mod/Sketcher/App/SketchObject.cpp +++ b/src/Mod/Sketcher/App/SketchObject.cpp @@ -2810,15 +2810,13 @@ bool SketchObject::isExternalAllowed(App::Document *pDoc, App::DocumentObject *p *rsn = rlOtherBody; return false; } - } else { + } + else { // cross-part link. Disallow, should be done via shapebinders only if (rsn) *rsn = rlOtherPart; return false; } - - assert(0); - return true; } bool SketchObject::isCarbonCopyAllowed(App::Document *pDoc, App::DocumentObject *pObj, bool & xinv, bool & yinv, eReasonList* rsn) const