diff --git a/include/boost/geometry/algorithms/detail/sections/section_functions.hpp b/include/boost/geometry/algorithms/detail/sections/section_functions.hpp index 44fb4665b..abc6de409 100644 --- a/include/boost/geometry/algorithms/detail/sections/section_functions.hpp +++ b/include/boost/geometry/algorithms/detail/sections/section_functions.hpp @@ -2,9 +2,8 @@ // Copyright (c) 2015 Barend Gehrels, Amsterdam, the Netherlands. -// This file was modified by Oracle on 2015, 2017, 2018. -// Modifications copyright (c) 2015-2018, Oracle and/or its affiliates. - +// This file was modified by Oracle on 2015-2021. +// Modifications copyright (c) 2015-2021, Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle // Use, modification and distribution is subject to the Boost Software License, @@ -132,9 +131,11 @@ static inline bool preceding(int dir, RobustPolicy const& robust_policy) { typename geometry::robust_point_type::type robust_point; - assert_coordinate_type_equal(robust_point, point_box); geometry::recalculate(robust_point, point, robust_policy); + // After recalculate() to prevent warning: 'robust_point' may be used uninitialized + assert_coordinate_type_equal(robust_point, point_box); + return preceding_check::apply(dir, robust_point, point_box, other_box); diff --git a/include/boost/geometry/algorithms/difference.hpp b/include/boost/geometry/algorithms/difference.hpp index 64df80e77..2155b9e54 100644 --- a/include/boost/geometry/algorithms/difference.hpp +++ b/include/boost/geometry/algorithms/difference.hpp @@ -161,10 +161,10 @@ struct call_intersection_insert typename Strategy > static inline OutputIterator apply(Geometry1 const& geometry1, - Geometry2 const& geometry2, - RobustPolicy const& robust_policy, + Geometry2 const& , + RobustPolicy const& , OutputIterator out, - Strategy const& strategy) + Strategy const& ) { base_t::access::get(out) = geometry::detail::convert_to_output < diff --git a/include/boost/geometry/iterators/concatenate_iterator.hpp b/include/boost/geometry/iterators/concatenate_iterator.hpp index d3266e975..42145ec25 100644 --- a/include/boost/geometry/iterators/concatenate_iterator.hpp +++ b/include/boost/geometry/iterators/concatenate_iterator.hpp @@ -86,6 +86,10 @@ public: , m_it2(other.m_it2) {} + concatenate_iterator(concatenate_iterator const& other) = default; + + concatenate_iterator& operator=(concatenate_iterator const& other) = default; + private: friend class boost::iterator_core_access; diff --git a/include/boost/geometry/iterators/flatten_iterator.hpp b/include/boost/geometry/iterators/flatten_iterator.hpp index 9b45d2efe..cfe232b4e 100644 --- a/include/boost/geometry/iterators/flatten_iterator.hpp +++ b/include/boost/geometry/iterators/flatten_iterator.hpp @@ -100,6 +100,8 @@ public: m_inner_it(other.m_inner_it) {} + flatten_iterator(flatten_iterator const& other) = default; + flatten_iterator& operator=(flatten_iterator const& other) { m_outer_it = other.m_outer_it; diff --git a/include/boost/geometry/srs/projections/factory.hpp b/include/boost/geometry/srs/projections/factory.hpp index 0fddb0a27..156fece80 100644 --- a/include/boost/geometry/srs/projections/factory.hpp +++ b/include/boost/geometry/srs/projections/factory.hpp @@ -2,8 +2,8 @@ // Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. -// This file was modified by Oracle on 2017-2020. -// Modifications copyright (c) 2017-2020, Oracle and/or its affiliates. +// This file was modified by Oracle on 2017-2021. +// Modifications copyright (c) 2017-2021, Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle // Use, modification and distribution is subject to the Boost Software License, @@ -145,7 +145,7 @@ struct factory_key { return par.id.name; } - static const char* get(const char* name, srs::dpar::value_proj id) + static const char* get(const char* name, srs::dpar::value_proj ) { return name; } @@ -160,7 +160,7 @@ struct factory_key > { return par.id.id; } - static srs::dpar::value_proj get(const char* name, srs::dpar::value_proj id) + static srs::dpar::value_proj get(const char* , srs::dpar::value_proj id) { return id; } diff --git a/include/boost/geometry/srs/projections/proj/igh.hpp b/include/boost/geometry/srs/projections/proj/igh.hpp index 385ac3031..8e01151c8 100644 --- a/include/boost/geometry/srs/projections/proj/igh.hpp +++ b/include/boost/geometry/srs/projections/proj/igh.hpp @@ -2,8 +2,8 @@ // Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. -// This file was modified by Oracle on 2017, 2018, 2019. -// Modifications copyright (c) 2017-2019, Oracle and/or its affiliates. +// This file was modified by Oracle on 2017-2021. +// Modifications copyright (c) 2017-2021, Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle. // Use, modification and distribution is subject to the Boost Software License, @@ -287,7 +287,7 @@ namespace projections // Interrupted Goode Homolosine template - inline void setup_igh(Params const& params, Parameters& par, par_igh& proj_parm) + inline void setup_igh(Params const& , Parameters& par, par_igh& proj_parm) { static const T d0 = 0; static const T d4044118 = igh::d4044118(); diff --git a/test/concepts/point_spherical_with_wrong_units.cpp b/test/concepts/point_spherical_with_wrong_units.cpp index 960db4a4d..3ee23d2ce 100644 --- a/test/concepts/point_spherical_with_wrong_units.cpp +++ b/test/concepts/point_spherical_with_wrong_units.cpp @@ -1,15 +1,17 @@ // Boost.Geometry (aka GGL, Generic Geometry Library) // Unit Test -// Copyright (c) 2014, Oracle and/or its affiliates. - +// Copyright (c) 2014-2021, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle +// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle // Licensed under the Boost Software License version 1.0. // http://www.boost.org/users/license.html #include +#include + #include #include #include @@ -22,5 +24,7 @@ int main() { bg::model::point > p; + boost::ignore_unused(p); + return 0; } diff --git a/test/core/coordinate_dimension.cpp b/test/core/coordinate_dimension.cpp index 94a90bbfd..69291738a 100644 --- a/test/core/coordinate_dimension.cpp +++ b/test/core/coordinate_dimension.cpp @@ -3,6 +3,10 @@ // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. +// This file was modified by Oracle on 2021. +// Modifications copyright (c) 2021, Oracle and/or its affiliates. +// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle + // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -31,7 +35,7 @@ BOOST_GEOMETRY_REGISTER_LINESTRING_TEMPLATED(std::vector) BOOST_GEOMETRY_REGISTER_LINESTRING_TEMPLATED(std::deque) -template +template void test_geometry() { BOOST_CHECK_EQUAL(bg::dimension::type::value, Expected); @@ -66,9 +70,9 @@ int test_main(int, char* []) test_geometry, 2>(); test_geometry, 3>(); - test_all, 2 >(); - test_all, 2 >(); - test_all, 2 >(); + test_all, 2>(); + test_all, 2>(); + test_all, 2>(); return 0; } diff --git a/test/cs_undefined/test_relops.hpp b/test/cs_undefined/test_relops.hpp index 7a366bcd6..e9e2019b5 100644 --- a/test/cs_undefined/test_relops.hpp +++ b/test/cs_undefined/test_relops.hpp @@ -1,7 +1,6 @@ // Boost.Geometry -// Copyright (c) 2019, Oracle and/or its affiliates. - +// Copyright (c) 2019-2021, Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle // Licensed under the Boost Software License version 1.0. @@ -33,7 +32,7 @@ template struct call_equals { template - static void apply(G1 const& g1, G2 const& g2, S const& s) {} + static void apply(G1 const& , G2 const& , S const& ) {} }; template @@ -56,7 +55,7 @@ template struct call_overlaps { template - static void apply(G1 const& g1, G2 const& g2, S const& s) {} + static void apply(G1 const& , G2 const& , S const& ) {} }; template @@ -89,7 +88,7 @@ template struct call_touches { template - static void apply(G1 const& g1, G2 const& g2, S const& s) {} + static void apply(G1 const& , G2 const& , S const& ) {} }; template @@ -112,14 +111,14 @@ template struct call_crosses { template - static void apply(G1 const& g1, G2 const& g2, S const& s) {} + static void apply(G1 const& , G2 const& , S const& ) {} }; template struct call_crosses { template - static void apply(G1 const& g1, G2 const& g2, S const& s) {} + static void apply(G1 const& , G2 const& , S const& ) {} }; template diff --git a/test/geometries/initialization.cpp b/test/geometries/initialization.cpp index c71ae302b..491852075 100644 --- a/test/geometries/initialization.cpp +++ b/test/geometries/initialization.cpp @@ -3,8 +3,8 @@ // Copyright (c) 2014-2015 Adam Wulkiewicz, Lodz, Poland. -// This file was modified by Oracle on 2020. -// Modifications copyright (c) 2020 Oracle and/or its affiliates. +// This file was modified by Oracle on 2020-2021. +// Modifications copyright (c) 2020-2021 Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle // Use, modification and distribution is subject to the Boost Software License, @@ -237,7 +237,7 @@ void test_sanity_check() V v = boost::assign::list_of(P(1, 1))(P(2, 2))(P(3, 3)); //v = boost::assign::list_of(P(1, 1))(P(2, 2))(P(3, 3)); - v.empty(); + //v.empty(); } } diff --git a/test/geometries/polygon.cpp b/test/geometries/polygon.cpp index bf9aeb337..a534746cf 100644 --- a/test/geometries/polygon.cpp +++ b/test/geometries/polygon.cpp @@ -3,6 +3,10 @@ // Copyright (c) 2020 Digvijay Janartha, Hamirpur, India. +// This file was modified by Oracle on 2021. +// Modifications copyright (c) 2021, Oracle and/or its affiliates. +// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle + // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -27,10 +31,6 @@ BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian) BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian) -#ifdef BOOST_NO_CXX11_HDR_INITIALIZER_LIST -#include -#endif//BOOST_NO_CXX11_HDR_INITIALIZER_LIST - template bg::model::polygon

create_polygon() { @@ -111,13 +111,11 @@ void test_all() template void test_custom_polygon(bg::model::ring

IL) { -#ifdef BOOST_NO_CXX11_HDR_INITIALIZER_LIST std::initializer_list > RIL = {IL}; bg::model::polygon

pl1(RIL); std::ostringstream out; out << bg::dsv(pl1); BOOST_CHECK_EQUAL(out.str(), "(((3, 3), (3, 0), (0, 0), (0, 3), (3, 3)))"); -#endif//BOOST_NO_CXX11_HDR_INITIALIZER_LIST } template diff --git a/test/util/algorithm.cpp b/test/util/algorithm.cpp index 0aef4ce37..dd3f35430 100644 --- a/test/util/algorithm.cpp +++ b/test/util/algorithm.cpp @@ -19,7 +19,7 @@ #include -void test_dimension(bg::util::index_constant<0> index) +void test_dimension(bg::util::index_constant<0>) { bool called = false; bg::detail::for_each_index<0>([&](auto index) { called = true; });