-D CMAKE_CXX_COMPILER=g++ \
-D USE_FREETYPE=OFF \
-D CMAKE_BUILD_TYPE=Release \
- -D CMAKE_C_FLAGS="-Werror" \
- -D CMAKE_CXX_FLAGS="-Werror" ..
+ -D CMAKE_C_FLAGS="-Werror -Wno-clobbered -Wmaybe-uninitialized -Wodr -Wno-alloc-size-larger-than" \
+ -D CMAKE_CXX_FLAGS="-Werror -Wno-clobbered -Wno-dangling-pointer" ..
- name: Build OCCT
run: |
if (a_plane_finder.Found()) {
//std::cout << " a plane is found " ;
di << " a plane is found \n";
- const Handle(Geom_Geometry)& aSurf = a_plane_finder.Plane(); // to avoid ambiguity
+ const Handle(Geom_Geometry) aSurf = a_plane_finder.Plane(); // to avoid ambiguity
DrawTrSurf::Set(a[2],aSurf) ;
}
return 0 ;
else
T->Triangle (i).Get (n1,n2,n3);
- const gp_XY& xy1 = T->UVNode (n1).XY();
- const gp_XY& xy2 = T->UVNode (n2).XY();
- const gp_XY& xy3 = T->UVNode (n3).XY();
+ const gp_Pnt2d xy1 = T->UVNode (n1);
+ const gp_Pnt2d xy2 = T->UVNode (n2);
+ const gp_Pnt2d xy3 = T->UVNode (n3);
mi2d1.SetCoord((xy2.X()+xy3.X())*0.5,
(xy2.Y()+xy3.Y())*0.5);
// compiler does not keep temporary object referenced by local variable of base type;
// here compiler does not recognize that it should keep the temporary object because handle
// classes do not inherit each other and they use hard cast for references to simulate inheritance
+#if defined(__GNUC__) && (__GNUC__ > 12)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdangling-reference"
+#endif
const Handle(Geom_Curve)& aTmpRefBase (Handle(Geom_Line)::DownCast (aCurve2));
CHECK(theDI, aTmpRefBase.get() != aCurve2.get(), "local reference to temporary handle object (base type)");
+#if defined(__GNUC__) && (__GNUC__ > 12)
+#pragma GCC diagnostic pop
+#endif
// check operations with Handle_* classes
Handle(Geom_Line) hLine = aLine;
Handle_Geom_Line qhLine = cpLine; // constructor from const pointer -- could be made explicit...
// check that compiler keeps temporary object referenced by local variable
+#if defined(__GNUC__) && (__GNUC__ > 12)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdangling-reference"
+#endif
const Handle_Geom_Line& hTmpRef (Handle(Geom_Line)::DownCast (aCurve2));
CHECK(theDI, hTmpRef.get() == aCurve2.get(), "local reference to temporary object (Handle_)");
// check lifetime of temporary object referenced by local variable (base type)
const Handle_Geom_Curve& hTmpRefBase (Handle(Geom_Line)::DownCast (aCurve2));
+ #if defined(__GNUC__) && (__GNUC__ > 11)
+#pragma GCC diagnostic pop
+#endif
// here we have different behavior for MSVC 2013+ where Handle_ is a class
// (compiler creates temporary object of approprtiate type and keeps it living
// until the reference is valid) and other compilers where Handle_ is
return Standard_True;
}
// for root style returns true only if it is overridden by other root style
- const Handle(Standard_Transient)& anItem = anOverRidingStyle->ItemAP242().Value();
+ const Handle(Standard_Transient) anItem = anOverRidingStyle->ItemAP242().Value();
if(!anItem.IsNull() && anItem->IsKind(STANDARD_TYPE(StepShape_ShapeRepresentation)))
{
return Standard_True;
Handle(TopOpeBRepBuild_Pave) PV = new TopOpeBRepBuild_Pave(VPV,par,vofe);
if (hasVSD) {
PV->HasSameDomain(Standard_True);
- const TopoDS_Shape& VSD = myDataStructure->SameDomain(VPV).Value();
+ const TopoDS_Shape& VSD = myDataStructure->DS().ShapeSameDomain(VPV).First();
Standard_Integer iVSD = myDataStructure->Shape(VSD);
if (iVSD == iVRE) PV->SameDomain(VIG);
else PV->SameDomain(VSD);
Handle(TopOpeBRepBuild_Pave) PVF = new TopOpeBRepBuild_Pave(VPV,parf,vfofe);
if (hasVSD) {
PVF->HasSameDomain(Standard_True);
- const TopoDS_Shape& VSD = myDataStructure->SameDomain(VPV).Value();
+ const TopoDS_Shape& VSD = myDataStructure->DS().ShapeSameDomain(VPV).First();
Standard_Integer iVSD = myDataStructure->Shape(VSD);
if (iVSD == iVRE) PVF->SameDomain(VIG);
else PVF->SameDomain(VSD);
Handle(TopOpeBRepBuild_Pave) PVR = new TopOpeBRepBuild_Pave(VPV,parl,vrofe);
if (hasVSD) {
PVR->HasSameDomain(Standard_True);
- const TopoDS_Shape& VSD = myDataStructure->SameDomain(VPV).Value();
+ const TopoDS_Shape& VSD = myDataStructure->DS().ShapeSameDomain(VPV).First();
Standard_Integer iVSD = myDataStructure->Shape(VSD);
if (iVSD == iVRE) PVR->SameDomain(VIG);
else PVR->SameDomain(VSD);