diff --git a/Algebraic_foundations/include/CGAL/Test/_test_algebraic_structure.h b/Algebraic_foundations/include/CGAL/Test/_test_algebraic_structure.h index 581a955b94f..3bb75c865c6 100644 --- a/Algebraic_foundations/include/CGAL/Test/_test_algebraic_structure.h +++ b/Algebraic_foundations/include/CGAL/Test/_test_algebraic_structure.h @@ -614,6 +614,9 @@ class Test_is_square { typedef typename Is_square::first_argument_type First_argument_type; typedef typename Is_square::second_argument_type Second_argument_type; typedef typename Is_square::result_type Result_type; + CGAL_USE_TYPE(First_argument_type); + CGAL_USE_TYPE(Second_argument_type); + CGAL_static_assertion( ( ::boost::is_same< AS , First_argument_type>::value)); CGAL_static_assertion( @@ -647,6 +650,8 @@ public: void operator() (const Sqrt& sqrt) { typedef typename Sqrt::argument_type Argument_type; typedef typename Sqrt::result_type Result_type; + CGAL_USE_TYPE(Argument_type); + CGAL_USE_TYPE(Result_type); CGAL_static_assertion(( ::boost::is_same< AS , Argument_type>::value)); CGAL_static_assertion(( ::boost::is_same< AS , Result_type>::value)); typedef Algebraic_structure_traits AST; @@ -670,6 +675,9 @@ public: typedef typename Root::first_argument_type First_argument_type; typedef typename Root::second_argument_type Second_argument_type; typedef typename Root::result_type Result_type; + CGAL_USE_TYPE(First_argument_type); + CGAL_USE_TYPE(Second_argument_type); + CGAL_USE_TYPE(Result_type); CGAL_static_assertion( ( ::boost::is_same::value)); CGAL_static_assertion( diff --git a/Bounding_volumes/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_support_set_impl.h b/Bounding_volumes/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_support_set_impl.h index 8e7c92d69ab..d8878a89ab4 100644 --- a/Bounding_volumes/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_support_set_impl.h +++ b/Bounding_volumes/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_support_set_impl.h @@ -165,6 +165,9 @@ namespace CGAL_MINIBALL_NAMESPACE { for (int i=m-1; i>0; --i) { gamma[i] = beta[i]; + // the next for won't do anything fori=m-1 + // which triggers a warning with g++-4.8 + // but it makes no sense to add an if(i!=m-1) for (int j=i+1; j #include -#include #include #ifdef CGAL_HAS_DEFAULT_ARITHMETIC_KERNEL @@ -17,7 +16,6 @@ int main() // Set wrong rounding mode to test modular arithmetic CGAL::Protect_FPU_rounding pfr(CGAL_FE_UPWARD); - typedef CGAL::Arithmetic_kernel AK; { // Enforce IEEE double precision and to nearest before diff --git a/Polynomial/test/Polynomial/test_polynomial.h b/Polynomial/test/Polynomial/test_polynomial.h index 7612fb16e18..59ab631b23e 100644 --- a/Polynomial/test/Polynomial/test_polynomial.h +++ b/Polynomial/test/Polynomial/test_polynomial.h @@ -1,6 +1,6 @@ #include - +#include #include #include @@ -19,13 +19,13 @@ #define CGAL_DEFINE_TYPES_FROM_AK(AK) \ typedef typename AK::Integer Integer; \ typedef typename AK::Rational Rational; \ - typedef typename AK::Field_with_sqrt Field_with_sqrt; \ + typedef typename AK::Field_with_sqrt Field_with_sqrt; CGAL_USE_TYPE(Field_with_sqrt); \ typedef CGAL::Polynomial Poly_int1; \ typedef CGAL::Polynomial Poly_int2; \ - typedef CGAL::Polynomial Poly_int3; \ + typedef CGAL::Polynomial Poly_int3; CGAL_USE_TYPE(Poly_int3); \ typedef CGAL::Polynomial Poly_rat1; \ typedef CGAL::Polynomial Poly_rat2; \ - typedef CGAL::Polynomial Poly_rat3; + typedef CGAL::Polynomial Poly_rat3; CGAL_USE_TYPE(Poly_rat3); // TODO: copied from number_type_utils.h diff --git a/Polytope_distance_d/include/CGAL/Polytope_distance_d.h b/Polytope_distance_d/include/CGAL/Polytope_distance_d.h index 5eed9812674..cd5c4aa1a35 100644 --- a/Polytope_distance_d/include/CGAL/Polytope_distance_d.h +++ b/Polytope_distance_d/include/CGAL/Polytope_distance_d.h @@ -574,8 +574,8 @@ public: insert( InputIterator1 p_first, InputIterator1 p_last, InputIterator2 q_first, InputIterator2 q_last) { - int old_r = static_cast(p_points.size()); - int old_s = static_cast(q_points.size()); + CGAL_optimisation_precondition_code(int old_r = static_cast(p_points.size())); + CGAL_optimisation_precondition_code(int old_s = static_cast(q_points.size())); p_points.insert( p_points.end(), p_first, p_last); q_points.insert( q_points.end(), q_first, q_last); set_dimension(); @@ -590,7 +590,7 @@ public: void insert_p( InputIterator p_first, InputIterator p_last) { - int old_r = static_cast(p_points.size()); + CGAL_optimisation_precondition_code(int old_r = static_cast(p_points.size())); p_points.insert( p_points.end(), p_first, p_last); set_dimension(); CGAL_optimisation_precondition_msg @@ -603,7 +603,7 @@ public: void insert_q( InputIterator q_first, InputIterator q_last) { - int old_s = static_cast(q_points.size()); + CGAL_optimisation_precondition_code( int old_s = static_cast(q_points.size())); q_points.insert( q_points.end(), q_first, q_last); set_dimension(); CGAL_optimisation_precondition_msg diff --git a/Straight_skeleton_2/include/CGAL/create_offset_polygons_2.h b/Straight_skeleton_2/include/CGAL/create_offset_polygons_2.h index e70f934b66f..652d19d9ee2 100644 --- a/Straight_skeleton_2/include/CGAL/create_offset_polygons_2.h +++ b/Straight_skeleton_2/include/CGAL/create_offset_polygons_2.h @@ -171,7 +171,7 @@ create_offset_polygons_2 ( FT const& aOffset, Skeleton const& aSs, K const& /*k* template Skeleton const& dereference ( boost::shared_ptr const& ss ) { - CGAL_precondition(ss!= NULL); + CGAL_precondition(ss.get() != 0); return *ss; } diff --git a/Surface_mesh_parameterization/include/CGAL/Fixed_border_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Fixed_border_parameterizer_3.h index fc8bacfdd4d..d9a020f759f 100644 --- a/Surface_mesh_parameterization/include/CGAL/Fixed_border_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Fixed_border_parameterizer_3.h @@ -574,7 +574,7 @@ is_one_to_one_mapping(const Adaptor& mesh, const Vector& , const Vector& ) { - Vector_3 first_triangle_normal; + Vector_3 first_triangle_normal = NULL_VECTOR; // initialize to avoid warning for (Facet_const_iterator facetIt = mesh.mesh_facets_begin(); facetIt != mesh.mesh_facets_end();