diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-04-22 11:59:15 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-04-22 11:59:15 +0300 |
commit | 87dcee0c0c33ab2f2a8d22e0d0b53f0289ef7a46 (patch) | |
tree | 9a1558bcb4e624fd1706be9dc460bd5fb0ba50b6 /extern/carve/lib | |
parent | d2cb0f955b25857cb4f3fd28ebc4567f997d56b2 (diff) |
Silence some annoying warnings when doing full build with strict flags
This mainly touches extern libraries and few debug-only places in intern.
Some summary:
- External libraries are not strict at all about missing declarations,
so we can rather safely remove such warning together with other strict
flags.
- Bullet has some static functions which are not used.
Those were commented out.
- Carve now has some unused debug-only functions commented out as well.
While we're on the way of getting rid of Carve, it makes sense to make
things a bit cleaner for the time being.
- In LZMA we have some parts disabled which gives some set but unused
variables which is rather correct.
- Elbeem had quite some variables set and never used because their usage
is inside of debug-only code which is commented out.
Note about patching upstream libraries: surely one might say that we
have to make local patchset against this, but own experience says it
only gives extra work trying to merge such tweaks to a new upstream
version and usually it's just faster to re-apply such fixes again after
bundling new upstream library.
Diffstat (limited to 'extern/carve/lib')
-rw-r--r-- | extern/carve/lib/geom2d.cpp | 4 | ||||
-rw-r--r-- | extern/carve/lib/geom3d.cpp | 2 | ||||
-rw-r--r-- | extern/carve/lib/intersect.cpp | 10 | ||||
-rw-r--r-- | extern/carve/lib/intersect_classify_edge.cpp | 5 | ||||
-rw-r--r-- | extern/carve/lib/intersect_face_division.cpp | 2 | ||||
-rw-r--r-- | extern/carve/lib/math.cpp | 6 | ||||
-rw-r--r-- | extern/carve/lib/mesh.cpp | 2 |
7 files changed, 25 insertions, 6 deletions
diff --git a/extern/carve/lib/geom2d.cpp b/extern/carve/lib/geom2d.cpp index 3b608238bb2..0e8f3a9377c 100644 --- a/extern/carve/lib/geom2d.cpp +++ b/extern/carve/lib/geom2d.cpp @@ -157,6 +157,7 @@ namespace carve { return pointInPoly(points, p2_adapt_ident(), p); } +#if 0 static int lineSegmentPolyIntersections(const P2Vector &points, LineSegment2 line, std::vector<PolyIntersectionInfo> &out) { @@ -224,6 +225,7 @@ namespace carve { } return count; } +#endif struct FwdSort { bool operator()(const PolyIntersectionInfo &a, @@ -239,6 +241,7 @@ namespace carve { } }; +#if 0 static int sortedLineSegmentPolyIntersections(const P2Vector &points, LineSegment2 line, std::vector<PolyIntersectionInfo> &out) { @@ -253,6 +256,7 @@ namespace carve { } return count; } +#endif bool pickContainedPoint(const std::vector<P2> &poly, P2 &result) { return pickContainedPoint(poly, p2_adapt_ident(), result); diff --git a/extern/carve/lib/geom3d.cpp b/extern/carve/lib/geom3d.cpp index e67ace51c8b..94085034f10 100644 --- a/extern/carve/lib/geom3d.cpp +++ b/extern/carve/lib/geom3d.cpp @@ -28,6 +28,7 @@ namespace carve { namespace geom3d { namespace { +#if 0 int is_same(const std::vector<const Vector *> &a, const std::vector<const Vector *> &b) { if (a.size() != b.size()) return false; @@ -52,6 +53,7 @@ not_fwd: not_rev: return 0; } +#endif } bool planeIntersection(const Plane &a, const Plane &b, Ray &r) { diff --git a/extern/carve/lib/intersect.cpp b/extern/carve/lib/intersect.cpp index e8e5d329c34..d780e08d224 100644 --- a/extern/carve/lib/intersect.cpp +++ b/extern/carve/lib/intersect.cpp @@ -236,6 +236,7 @@ namespace { +#if 0 void dump_intersections(std::ostream &out, carve::csg::Intersections &csg_intersections) { std::vector<dump_data> temp; @@ -284,13 +285,14 @@ namespace { vertices.push_back(i_pt->v); } } +#endif carve::point::PointSet points(vertices); std::string outf("/tmp/intersection-points.ply"); ::writePLY(outf, &points, true); -#endif } +#endif @@ -481,6 +483,7 @@ void carve::csg::CSG::makeVertexIntersections() { +#if 0 static carve::mesh::MeshSet<3>::vertex_t *chooseWeldPoint( const carve::csg::detail::VSet &equivalent, carve::csg::VertexPool &vertex_pool) { @@ -537,7 +540,7 @@ static const carve::mesh::MeshSet<3>::vertex_t *weld( } return weld_point; } - +#endif void carve::csg::CSG::groupIntersections() { @@ -1219,6 +1222,7 @@ void carve::csg::CSG::makeFaceEdges(carve::csg::EdgeClassification &eclass, * * @param fll */ +#if 0 static void checkFaceLoopIntegrity(carve::csg::FaceLoopList &fll) { static carve::TimingName FUNC_NAME("CSG::checkFaceLoopIntegrity()"); carve::TimingBlock block(FUNC_NAME); @@ -1245,7 +1249,7 @@ static void checkFaceLoopIntegrity(carve::csg::FaceLoopList &fll) { } } } - +#endif /** diff --git a/extern/carve/lib/intersect_classify_edge.cpp b/extern/carve/lib/intersect_classify_edge.cpp index 4f7111a83bd..23cfa21b643 100644 --- a/extern/carve/lib/intersect_classify_edge.cpp +++ b/extern/carve/lib/intersect_classify_edge.cpp @@ -139,6 +139,7 @@ namespace carve { +#if 0 static void walkGraphSegment(carve::csg::detail::VVSMap &shared_edge_graph, const carve::csg::detail::VSet &branch_points, V2 initial, @@ -215,7 +216,7 @@ namespace carve { #endif #endif } - +#endif static carve::geom3d::Vector perpendicular(const carve::geom3d::Vector &v) { @@ -383,6 +384,7 @@ namespace carve { +#if 0 static void traceIntersectionGraph(const V2Set &shared_edges, const FLGroupList & /* a_loops_grouped */, const FLGroupList & /* b_loops_grouped */, @@ -416,6 +418,7 @@ namespace carve { walkGraphSegment(shared_edge_graph, branch_points, V2(v1, v2), a_edge_map, b_edge_map, out); } } +#endif void hashByPerimeter(FLGroupList &grp, PerimMap &perim_map) { for (FLGroupList::iterator i = grp.begin(); i != grp.end(); ++i) { diff --git a/extern/carve/lib/intersect_face_division.cpp b/extern/carve/lib/intersect_face_division.cpp index 04c8bc5a79f..6554ef500ed 100644 --- a/extern/carve/lib/intersect_face_division.cpp +++ b/extern/carve/lib/intersect_face_division.cpp @@ -1409,6 +1409,7 @@ namespace { return s.str().substr(1); } +#if 0 void dumpAsGraph(carve::mesh::MeshSet<3>::face_t *face, const std::vector<carve::mesh::MeshSet<3>::vertex_t *> &base_loop, const carve::csg::V2Set &face_edges, @@ -1450,6 +1451,7 @@ namespace { } std::cerr << "};\n"; } +#endif void generateOneFaceLoop(carve::mesh::MeshSet<3>::face_t *face, const carve::csg::detail::Data &data, diff --git a/extern/carve/lib/math.cpp b/extern/carve/lib/math.cpp index 9f8d45de9ba..3b7f95193c1 100644 --- a/extern/carve/lib/math.cpp +++ b/extern/carve/lib/math.cpp @@ -43,6 +43,7 @@ namespace carve { }; namespace { +#if 0 void cplx_sqrt(double re, double im, double &re_1, double &im_1, double &re_2, double &im_2) { @@ -57,7 +58,9 @@ namespace carve { im_2 = -im_1; } } +#endif +#if 0 void cplx_cbrt(double re, double im, double &re_1, double &im_1, double &re_2, double &im_2, @@ -76,6 +79,7 @@ namespace carve { im_3 = r * sin(t + M_TWOPI * 2.0 / 3.0); } } +#endif void add_root(std::vector<Root> &roots, double root) { for (size_t i = 0; i < roots.size(); ++i) { @@ -250,6 +254,7 @@ namespace carve { e2.normalize(); } +#if 0 static void eig3(const Matrix3 &m, double l, carve::geom::vector<3> &e1, @@ -259,6 +264,7 @@ namespace carve { e2.x = 0.0; e2.y = 1.0; e2.z = 0.0; e3.x = 0.0; e3.y = 0.0; e3.z = 1.0; } +#endif void eigSolveSymmetric(const Matrix3 &m, double &l1, carve::geom::vector<3> &e1, diff --git a/extern/carve/lib/mesh.cpp b/extern/carve/lib/mesh.cpp index 34b04b9ac66..fe66927a707 100644 --- a/extern/carve/lib/mesh.cpp +++ b/extern/carve/lib/mesh.cpp @@ -774,7 +774,6 @@ namespace carve { // connectivity information in the Polyhedron. mesh::MeshSet<3> *meshFromPolyhedron(const poly::Polyhedron *poly, int manifold_id) { typedef mesh::Vertex<3> vertex_t; - typedef mesh::Vertex<3>::vector_t vector_t; typedef mesh::Edge<3> edge_t; typedef mesh::Face<3> face_t; typedef mesh::Mesh<3> mesh_t; @@ -884,7 +883,6 @@ namespace carve { // construct a Polyhedron from a MeshSet poly::Polyhedron *polyhedronFromMesh(const mesh::MeshSet<3> *mesh, int manifold_id) { - typedef poly::Polyhedron poly_t; typedef poly::Polyhedron::vertex_t vertex_t; typedef poly::Polyhedron::edge_t edge_t; typedef poly::Polyhedron::face_t face_t; |