PVS: V779 Unreachable code detected. It is possible that an error is present.

This commit is contained in:
wmayer
2019-02-17 20:12:56 +01:00
parent 239c20b71f
commit 1e343d339f
4 changed files with 8 additions and 15 deletions

View File

@@ -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()

View File

@@ -110,13 +110,11 @@ bool AttachExtension::changeAttacherType(const char* typeName)
AttachEngine* pNewAttacher = static_cast<Attacher::AttachEngine*>(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()

View File

@@ -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

View File

@@ -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