diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 01d7d3467c..4221827b10 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -413,7 +413,7 @@ IF(MSVC) ENDIF() ENDFOREACH() ElSE() - add_definitions(-Wall -Wextra) + add_definitions(-Wall -Wextra -Wno-maybe-uninitialized) if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") add_definitions(-Wno-tautological-constant-out-of-range-compare) endif() diff --git a/src/ifcgeom/IfcGeomIterator.h b/src/ifcgeom/IfcGeomIterator.h index c48e934a5c..f452845b8c 100644 --- a/src/ifcgeom/IfcGeomIterator.h +++ b/src/ifcgeom/IfcGeomIterator.h @@ -155,8 +155,8 @@ namespace IfcGeom { Iterator(const IteratorSettings& settings, IfcParse::IfcFile* file, std::vector& filters) : settings(settings) , ifc_file(file) - , owns_ifc_file(false) , filters_(filters) + , owns_ifc_file(false) { _initialize(); } diff --git a/src/ifcgeom/IfcGeomWires.cpp b/src/ifcgeom/IfcGeomWires.cpp index 8fe677d4b6..884efbec35 100644 --- a/src/ifcgeom/IfcGeomWires.cpp +++ b/src/ifcgeom/IfcGeomWires.cpp @@ -128,7 +128,7 @@ namespace { Handle(Geom_Curve) crv = BRep_Tool::Curve(e, _, __); const bool is_line = crv->DynamicType() == STANDARD_TYPE(Geom_Line); const bool is_circle = crv->DynamicType() == STANDARD_TYPE(Geom_Circle); - all_linear = all_linear && all_linear; + all_linear = all_linear && is_line; single_circle = first && is_circle; } @@ -209,7 +209,7 @@ namespace { double dist = p1.Distance(p2); - // Distance is within 2p, this is fine + // Distance is within tolerance, this is fine if (dist < p_) { mw_.Add(w1); goto check; @@ -403,8 +403,6 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcCompositeCurve* l, TopoDS_Wire BRepBuilderAPI_MakeWire w; TopoDS_Vertex wire_first_vertex, wire_last_vertex, edge_first_vertex, edge_last_vertex; - const double precision_sq_2 = 2 * getValue(GV_PRECISION) * getValue(GV_PRECISION); - TopTools_ListIteratorOfListOfShape it(converted_segments); IfcEntityList::ptr profile = l->entity->getInverse(IfcSchema::Type::IfcProfileDef, -1);