From 64253458aae9ba2aeaf3e16b226f347d453ae725 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Fri, 12 Jul 2019 10:49:10 +0200 Subject: [PATCH] Fix warnings --- Algebraic_kernel_d/include/CGAL/RS/functors_1.h | 2 +- Algebraic_kernel_d/include/CGAL/RS/functors_z_1.h | 2 +- .../include/CGAL/RS/rs23_k_isolator_1.h | 2 +- Algebraic_kernel_d/include/CGAL/RS/rs2_isolator_1.h | 2 +- .../CGAL/Circulator/Safe_circulator_from_iterator.h | 3 +++ Convex_hull_d/include/CGAL/Convex_hull_d_traits_3.h | 4 ++++ Nef_2/include/CGAL/Nef_polyhedron_2.h | 2 ++ .../include/CGAL/NewKernel_d/Dimension_base.h | 6 +++++- .../determinant_of_iterator_to_points_from_points.h | 11 +++++++++++ ...eterminant_of_iterator_to_vectors_from_vectors.h | 11 +++++++++++ .../test_Concurrent_compact_container.cpp | 2 +- .../CGAL/Segment_Delaunay_graph_simple_site_2.h | 3 +++ .../Voronoi_vertex_sqrt_field_new_C2.h | 6 ++++++ .../include/CGAL/Straight_skeleton_vertex_base_2.h | 2 ++ Stream_support/include/CGAL/IO/write_3mf.h | 2 -- .../test/Stream_support/test_3mf_to_sm.cpp | 13 ++++++------- 16 files changed, 58 insertions(+), 15 deletions(-) diff --git a/Algebraic_kernel_d/include/CGAL/RS/functors_1.h b/Algebraic_kernel_d/include/CGAL/RS/functors_1.h index 790a57bf704..262d94d7100 100644 --- a/Algebraic_kernel_d/include/CGAL/RS/functors_1.h +++ b/Algebraic_kernel_d/include/CGAL/RS/functors_1.h @@ -160,7 +160,7 @@ struct Solve_1{ template OutputIterator operator()(const Polynomial_1 &p, - bool known_to_be_square_free, + bool, OutputIterator res)const{ Isolator isol(p); for(int l=0;l OutputIterator operator()(const Polynomial_1 &p, - bool known_to_be_square_free, + bool, OutputIterator res)const{ ZPolynomial_1 zp=PolConverter()(p); Isolator isol(zp); diff --git a/Algebraic_kernel_d/include/CGAL/RS/rs23_k_isolator_1.h b/Algebraic_kernel_d/include/CGAL/RS/rs23_k_isolator_1.h index 52218eff19e..c197ed1d192 100644 --- a/Algebraic_kernel_d/include/CGAL/RS/rs23_k_isolator_1.h +++ b/Algebraic_kernel_d/include/CGAL/RS/rs23_k_isolator_1.h @@ -56,7 +56,7 @@ class RS23_k_isolator_1{ template RS23_k_isolator_1:: -RS23_k_isolator_1(const Polynomial_ &p){ +RS23_k_isolator_1(const Polynomial_ &){ CGAL_error_msg("not implemented for these polynomial/bound types"); } diff --git a/Algebraic_kernel_d/include/CGAL/RS/rs2_isolator_1.h b/Algebraic_kernel_d/include/CGAL/RS/rs2_isolator_1.h index 2b37cef6f46..88d60065ede 100644 --- a/Algebraic_kernel_d/include/CGAL/RS/rs2_isolator_1.h +++ b/Algebraic_kernel_d/include/CGAL/RS/rs2_isolator_1.h @@ -51,7 +51,7 @@ class RS2_isolator_1{ template RS2_isolator_1:: -RS2_isolator_1(const Polynomial_ &p){ +RS2_isolator_1(const Polynomial_ &){ CGAL_error_msg("not implemented for these polynomial/bound types"); } diff --git a/Circulator/include/CGAL/Circulator/Safe_circulator_from_iterator.h b/Circulator/include/CGAL/Circulator/Safe_circulator_from_iterator.h index 15bab0b4fc2..cf6654a421a 100644 --- a/Circulator/include/CGAL/Circulator/Safe_circulator_from_iterator.h +++ b/Circulator/include/CGAL/Circulator/Safe_circulator_from_iterator.h @@ -33,6 +33,8 @@ #include +#include + namespace CGAL { @@ -96,6 +98,7 @@ public: // OPERATIONS bool operator==( std::nullptr_t p) const { + CGAL_USE(p); CGAL_assertion( p == nullptr); return m_empty; } diff --git a/Convex_hull_d/include/CGAL/Convex_hull_d_traits_3.h b/Convex_hull_d/include/CGAL/Convex_hull_d_traits_3.h index 89acbdd0116..4601eeef4c5 100644 --- a/Convex_hull_d/include/CGAL/Convex_hull_d_traits_3.h +++ b/Convex_hull_d/include/CGAL/Convex_hull_d_traits_3.h @@ -38,6 +38,7 @@ #include #include #include +#include namespace CGAL { @@ -62,6 +63,9 @@ template struct Convex_hull_d_traits_3 struct Orientation_d { template Orientation operator()(I s, I e) { + + CGAL_USE(e); + Point_d A[4]; CGAL_assertion(s != e); A[0] = *s; diff --git a/Nef_2/include/CGAL/Nef_polyhedron_2.h b/Nef_2/include/CGAL/Nef_polyhedron_2.h index d11ef6dd4b0..7b3bce94b5d 100644 --- a/Nef_2/include/CGAL/Nef_polyhedron_2.h +++ b/Nef_2/include/CGAL/Nef_polyhedron_2.h @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -454,6 +455,7 @@ public: Polygons, Operation op = JOIN) : Base(Nef_rep()) { CGAL_assertion(op==JOIN); + CGAL_USE(op); typedef typename std::iterator_traits::value_type iterator_pair; diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Dimension_base.h b/NewKernel_d/include/CGAL/NewKernel_d/Dimension_base.h index 439b2e2b9a7..2b68394b24e 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Dimension_base.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Dimension_base.h @@ -23,6 +23,7 @@ #include #include #include +#include namespace CGAL { struct Store_dimension_base { //TODO: add some assertions @@ -43,7 +44,10 @@ struct Dimension_base > { Dimension_base(){} Dimension_base(int CGAL_assertion_code(dim)){CGAL_assertion(dim_==dim);} int dimension()const{return dim_;} - void set_dimension(int dim){CGAL_assertion(dim_==dim);} + void set_dimension(int dim){ + CGAL_assertion(dim_==dim); + CGAL_USE(dim); + } }; } #endif diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_points.h b/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_points.h index 90b139d3d02..f77aebdacf3 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_points.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_points.h @@ -22,6 +22,7 @@ #define CGAL_VECTOR_DET_ITER_PTS_PTS_H #include #include +#include namespace CGAL { @@ -57,6 +58,7 @@ struct Add_determinant_of_iterator_to_points_from_points Vector const&a=*first; ++first; Vector const&b=*first; ++first; Vector const&c=*first; CGAL_assertion(++first==end); + CGAL_USE(end); return LA::determinant_of_points(a,b,c); } template @@ -64,6 +66,7 @@ struct Add_determinant_of_iterator_to_points_from_points Vector const&a=*first; ++first; Vector const&b=*first; ++first; Vector const&c=*first; CGAL_assertion(++first==end); + CGAL_USE(end); return LA::sign_of_determinant_of_points(a,b,c); } }; @@ -88,6 +91,7 @@ struct Add_determinant_of_iterator_to_points_from_points Vector const&b=*first; ++first; Vector const&c=*first; ++first; Vector const&d=*first; CGAL_assertion(++first==end); + CGAL_USE(end); return LA::determinant_of_points(a,b,c,d); } template @@ -96,6 +100,7 @@ struct Add_determinant_of_iterator_to_points_from_points Vector const&b=*first; ++first; Vector const&c=*first; ++first; Vector const&d=*first; CGAL_assertion(++first==end); + CGAL_USE(end); return LA::sign_of_determinant_of_points(a,b,c,d); } }; @@ -121,6 +126,7 @@ struct Add_determinant_of_iterator_to_points_from_points Vector const&c=*first; ++first; Vector const&d=*first; ++first; Vector const&e=*first; CGAL_assertion(++first==end); + CGAL_USE(end); return LA::determinant_of_points(a,b,c,d,e); } template @@ -130,6 +136,7 @@ struct Add_determinant_of_iterator_to_points_from_points Vector const&c=*first; ++first; Vector const&d=*first; ++first; Vector const&e=*first; CGAL_assertion(++first==end); + CGAL_USE(end); return LA::sign_of_determinant_of_points(a,b,c,d,e); } }; @@ -156,6 +163,7 @@ struct Add_determinant_of_iterator_to_points_from_points Vector const&d=*first; ++first; Vector const&e=*first; ++first; Vector const&f=*first; CGAL_assertion(++first==end); + CGAL_USE(end); return LA::determinant_of_points(a,b,c,d,e,f); } template @@ -166,6 +174,7 @@ struct Add_determinant_of_iterator_to_points_from_points Vector const&d=*first; ++first; Vector const&e=*first; ++first; Vector const&f=*first; CGAL_assertion(++first==end); + CGAL_USE(end); return LA::sign_of_determinant_of_points(a,b,c,d,e,f); } }; @@ -193,6 +202,7 @@ struct Add_determinant_of_iterator_to_points_from_points Vector const&e=*first; ++first; Vector const&f=*first; ++first; Vector const&g=*first; CGAL_assertion(++first==end); + CGAL_USE(end); return LA::determinant_of_points(a,b,c,d,e,f,g); } template @@ -204,6 +214,7 @@ struct Add_determinant_of_iterator_to_points_from_points Vector const&e=*first; ++first; Vector const&f=*first; ++first; Vector const&g=*first; CGAL_assertion(++first==end); + CGAL_USE(end); return LA::sign_of_determinant_of_points(a,b,c,d,e,f,g); } }; diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_vectors_from_vectors.h b/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_vectors_from_vectors.h index 44bff5dae73..14d1519bb28 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_vectors_from_vectors.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_vectors_from_vectors.h @@ -22,6 +22,7 @@ #define CGAL_VECTOR_DET_ITER_VEC_VEC_H #include #include +#include namespace CGAL { @@ -56,12 +57,14 @@ struct Add_determinant_of_iterator_to_vectors_from_vectors static NT determinant_of_iterator_to_vectors(Iter const&first, Iter const&end){ Vector const&a=*first; ++first; Vector const&b=*first; CGAL_assertion(++first==end); + CGAL_USE(end); return LA::determinant_of_vectors(a,b); } template static Sign sign_of_determinant_of_iterator_to_vectors(Iter const&first, Iter const&end){ Vector const&a=*first; ++first; Vector const&b=*first; CGAL_assertion(++first==end); + CGAL_USE(end); return LA::sign_of_determinant_of_vectors(a,b); } }; @@ -85,6 +88,7 @@ struct Add_determinant_of_iterator_to_vectors_from_vectors Vector const&a=*first; ++first; Vector const&b=*first; ++first; Vector const&c=*first; CGAL_assertion(++first==end); + CGAL_USE(end); return LA::determinant_of_vectors(a,b,c); } template @@ -92,6 +96,7 @@ struct Add_determinant_of_iterator_to_vectors_from_vectors Vector const&a=*first; ++first; Vector const&b=*first; ++first; Vector const&c=*first; CGAL_assertion(++first==end); + CGAL_USE(end); return LA::sign_of_determinant_of_vectors(a,b,c); } }; @@ -116,6 +121,7 @@ struct Add_determinant_of_iterator_to_vectors_from_vectors Vector const&b=*first; ++first; Vector const&c=*first; ++first; Vector const&d=*first; CGAL_assertion(++first==end); + CGAL_USE(end); return LA::determinant_of_vectors(a,b,c,d); } template @@ -124,6 +130,7 @@ struct Add_determinant_of_iterator_to_vectors_from_vectors Vector const&b=*first; ++first; Vector const&c=*first; ++first; Vector const&d=*first; CGAL_assertion(++first==end); + CGAL_USE(end); return LA::sign_of_determinant_of_vectors(a,b,c,d); } }; @@ -149,6 +156,7 @@ struct Add_determinant_of_iterator_to_vectors_from_vectors Vector const&c=*first; ++first; Vector const&d=*first; ++first; Vector const&e=*first; CGAL_assertion(++first==end); + CGAL_USE(end); return LA::determinant_of_vectors(a,b,c,d,e); } template @@ -158,6 +166,7 @@ struct Add_determinant_of_iterator_to_vectors_from_vectors Vector const&c=*first; ++first; Vector const&d=*first; ++first; Vector const&e=*first; CGAL_assertion(++first==end); + CGAL_USE(end); return LA::sign_of_determinant_of_vectors(a,b,c,d,e); } }; @@ -184,6 +193,7 @@ struct Add_determinant_of_iterator_to_vectors_from_vectors Vector const&d=*first; ++first; Vector const&e=*first; ++first; Vector const&f=*first; CGAL_assertion(++first==end); + CGAL_USE(end); return LA::determinant_of_vectors(a,b,c,d,e,f); } template @@ -194,6 +204,7 @@ struct Add_determinant_of_iterator_to_vectors_from_vectors Vector const&d=*first; ++first; Vector const&e=*first; ++first; Vector const&f=*first; CGAL_assertion(++first==end); + CGAL_USE(end); return LA::sign_of_determinant_of_vectors(a,b,c,d,e,f); } }; diff --git a/STL_Extension/test/STL_Extension/test_Concurrent_compact_container.cpp b/STL_Extension/test/STL_Extension/test_Concurrent_compact_container.cpp index bad8eb383b1..30e7f1106bb 100644 --- a/STL_Extension/test/STL_Extension/test_Concurrent_compact_container.cpp +++ b/STL_Extension/test/STL_Extension/test_Concurrent_compact_container.cpp @@ -241,7 +241,7 @@ void test(const Cont &) assert(check_empty(c0)); assert(check_empty(c1)); - typename Cont::allocator_type t20 = c0.get_allocator(); + c0.get_allocator(); std::cout << "Now filling some containers" << std::endl; diff --git a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_simple_site_2.h b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_simple_site_2.h index e6637b41361..0add66c280c 100644 --- a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_simple_site_2.h +++ b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_simple_site_2.h @@ -34,6 +34,7 @@ #include #include +#include namespace CGAL { @@ -141,11 +142,13 @@ public: } const Point_2& source_of_crossing_site(unsigned int i) const { + CGAL_USE(i); CGAL_precondition( is_segment() && !is_input(i) ); return p_[0]; } const Point_2& target_of_crossing_site(unsigned int i) const { + CGAL_USE(i); CGAL_precondition( is_segment() && !is_input(i) ); return p_[0]; } diff --git a/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_sqrt_field_new_C2.h b/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_sqrt_field_new_C2.h index 4166ef230a6..9ec87b2b834 100644 --- a/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_sqrt_field_new_C2.h +++ b/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_sqrt_field_new_C2.h @@ -2205,6 +2205,7 @@ private: CGAL_precondition( p.is_point() && q.is_point() && r.is_segment()); CGAL_USE(l); + CGAL_USE(r); Comparison_result compare_p(EQUAL); Comparison_result compare_q(EQUAL); @@ -2313,6 +2314,8 @@ private: CGAL_precondition( p.is_point() && q.is_segment() && r.is_segment()); CGAL_USE(l); + CGAL_USE(q); + CGAL_USE(r); Comparison_result compare_p(EQUAL); Comparison_result compare_q(EQUAL); @@ -2432,6 +2435,9 @@ private: CGAL_USE(vv); CGAL_USE(l); CGAL_USE(lref); + CGAL_USE(p); + CGAL_USE(q); + CGAL_USE(r); Comparison_result compare_p(EQUAL); Comparison_result compare_q(EQUAL); diff --git a/Straight_skeleton_2/include/CGAL/Straight_skeleton_vertex_base_2.h b/Straight_skeleton_2/include/CGAL/Straight_skeleton_vertex_base_2.h index 0952100487b..88c42fd96bb 100644 --- a/Straight_skeleton_2/include/CGAL/Straight_skeleton_vertex_base_2.h +++ b/Straight_skeleton_2/include/CGAL/Straight_skeleton_vertex_base_2.h @@ -27,6 +27,7 @@ #include #include #include +#include #include @@ -85,6 +86,7 @@ protected : bool operator==( std::nullptr_t p ) const { + CGAL_USE(p); CGAL_assertion( p == nullptr ); HalfedgeHandle null ; return mHandle == null ; diff --git a/Stream_support/include/CGAL/IO/write_3mf.h b/Stream_support/include/CGAL/IO/write_3mf.h index 8f66e342767..17d51f9a52f 100644 --- a/Stream_support/include/CGAL/IO/write_3mf.h +++ b/Stream_support/include/CGAL/IO/write_3mf.h @@ -375,8 +375,6 @@ bool write_triangle_soups_to_3mf(const std::string& file_name, const PolygonRanges& all_polygons, const std::vector& names) { - DWORD nErrorMessage; - LPCSTR pszErrorMessage; HRESULT hResult; // Create Model Instance diff --git a/Stream_support/test/Stream_support/test_3mf_to_sm.cpp b/Stream_support/test/Stream_support/test_3mf_to_sm.cpp index 5c96e769ed9..654cae33bb0 100644 --- a/Stream_support/test/Stream_support/test_3mf_to_sm.cpp +++ b/Stream_support/test/Stream_support/test_3mf_to_sm.cpp @@ -40,7 +40,7 @@ int main(int argc, char** argv) CGAL::read_3mf(file_name, meshes); if(nb_meshes <0) return 1; - for(std::size_t i = 0; i< nb_meshes; ++i) + for(int i = 0; i< nb_meshes; ++i) { Mesh mesh = meshes[i]; std::cout<