From fca0aa9ff454253e99cd342177275eb6a79c45bb Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Mon, 4 Feb 2019 22:18:59 +0100 Subject: [PATCH] [srs][strategies] Fix warnings (comparison, unused parameter). --- .../geometry/srs/projections/impl/pj_gridinfo.hpp | 14 +++++++------- .../geometry/srs/projections/proj/ob_tran.hpp | 8 ++++---- .../strategies/cartesian/side_of_intersection.hpp | 6 ++++-- .../strategies/geographic/intersection.hpp | 4 ++-- 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/include/boost/geometry/srs/projections/impl/pj_gridinfo.hpp b/include/boost/geometry/srs/projections/impl/pj_gridinfo.hpp index a2b364e12..0d297b1cb 100644 --- a/include/boost/geometry/srs/projections/impl/pj_gridinfo.hpp +++ b/include/boost/geometry/srs/projections/impl/pj_gridinfo.hpp @@ -1,8 +1,8 @@ // Boost.Geometry // This file is manually converted from PROJ4 -// This file was modified by Oracle on 2018. -// Modifications copyright (c) 2018, Oracle and/or its affiliates. +// This file was modified by Oracle on 2018, 2019. +// Modifications copyright (c) 2018-2019, 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, @@ -205,7 +205,7 @@ bool pj_gridinfo_load_ctable(IStream & is, pj_gi_load & gi) std::size_t ch_size = sizeof(pj_ctable::flp_t) * a_size; is.read(reinterpret_cast(&ct.cvs[0]), ch_size); - if (is.fail() || is.gcount() != ch_size) + if (is.fail() || std::size_t(is.gcount()) != ch_size) { ct.cvs.clear(); //ctable loading failed on fread() - binary incompatible? @@ -236,7 +236,7 @@ bool pj_gridinfo_load_ctable2(IStream & is, pj_gi_load & gi) std::size_t ch_size = sizeof(pj_ctable::flp_t) * a_size; is.read(reinterpret_cast(&ct.cvs[0]), ch_size); - if (is.fail() || is.gcount() != ch_size) + if (is.fail() || std::size_t(is.gcount()) != ch_size) { //ctable2 loading failed on fread() - binary incompatible? ct.cvs.clear(); @@ -279,7 +279,7 @@ inline bool pj_gridinfo_load_ntv1(IStream & is, pj_gi_load & gi) { is.read(reinterpret_cast(&row_buf[0]), ch_size); - if (is.fail() || is.gcount() != ch_size) + if (is.fail() || std::size_t(is.gcount()) != ch_size) { gi.ct.cvs.clear(); return false; @@ -329,7 +329,7 @@ inline bool pj_gridinfo_load_ntv2(IStream & is, pj_gi_load & gi) { is.read(reinterpret_cast(&row_buf[0]), ch_size); - if (is.fail() || is.gcount() != ch_size) + if (is.fail() || std::size_t(is.gcount()) != ch_size) { gi.ct.cvs.clear(); return false; @@ -376,7 +376,7 @@ inline bool pj_gridinfo_load_gtx(IStream & is, pj_gi_load & gi) is.read(reinterpret_cast(&gi.ct.cvs[0]), ch_size); - if (is.fail() || is.gcount() != ch_size) + if (is.fail() || std::size_t(is.gcount()) != ch_size) { gi.ct.cvs.clear(); return false; diff --git a/include/boost/geometry/srs/projections/proj/ob_tran.hpp b/include/boost/geometry/srs/projections/proj/ob_tran.hpp index f5709228f..99a7b82b1 100644 --- a/include/boost/geometry/srs/projections/proj/ob_tran.hpp +++ b/include/boost/geometry/srs/projections/proj/ob_tran.hpp @@ -2,8 +2,8 @@ // Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. -// This file was modified by Oracle on 2017, 2018. -// Modifications copyright (c) 2017-2018, Oracle and/or its affiliates. +// This file was modified by Oracle on 2017, 2018, 2019. +// Modifications copyright (c) 2017-2019, 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, @@ -128,7 +128,7 @@ namespace projections } template - inline Parameters o_proj_parameters(srs::spar::parameters const& params, + inline Parameters o_proj_parameters(srs::spar::parameters const& /*params*/, Parameters const& par) { /* copy existing header into new */ @@ -292,7 +292,7 @@ namespace projections // General Oblique Transformation template - inline T setup_ob_tran(Params const& params, Parameters & par, ProjParameters& proj_parm) + inline T setup_ob_tran(Params const& params, Parameters & /*par*/, ProjParameters& proj_parm) { static const T half_pi = detail::half_pi(); diff --git a/include/boost/geometry/strategies/cartesian/side_of_intersection.hpp b/include/boost/geometry/strategies/cartesian/side_of_intersection.hpp index db57644ad..9c0a5f0d3 100644 --- a/include/boost/geometry/strategies/cartesian/side_of_intersection.hpp +++ b/include/boost/geometry/strategies/cartesian/side_of_intersection.hpp @@ -2,8 +2,8 @@ // Copyright (c) 2015 Barend Gehrels, Amsterdam, the Netherlands. -// This file was modified by Oracle on 2015. -// Modifications copyright (c) 2015, Oracle and/or its affiliates. +// This file was modified by Oracle on 2015, 2019. +// Modifications copyright (c) 2015-2019, Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle @@ -118,6 +118,7 @@ struct multiplicable_integral return b < a; } +#ifdef BOOST_GEOMETRY_SIDE_OF_INTERSECTION_DEBUG template void check_value(CmpVal const& cmp_val) const { @@ -125,6 +126,7 @@ struct multiplicable_integral CmpVal val = CmpVal(m_sign) * (CmpVal(m_ms) * CmpVal(b) + CmpVal(m_ls)); BOOST_GEOMETRY_ASSERT(cmp_val == val); } +#endif // BOOST_GEOMETRY_SIDE_OF_INTERSECTION_DEBUG }; } // namespace detail diff --git a/include/boost/geometry/strategies/geographic/intersection.hpp b/include/boost/geometry/strategies/geographic/intersection.hpp index 0bfa2f881..6f317bb31 100644 --- a/include/boost/geometry/strategies/geographic/intersection.hpp +++ b/include/boost/geometry/strategies/geographic/intersection.hpp @@ -2,7 +2,7 @@ // Copyright (c) 2017 Adam Wulkiewicz, Lodz, Poland. -// Copyright (c) 2016-2018, Oracle and/or its affiliates. +// Copyright (c) 2016-2019, 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, @@ -649,7 +649,7 @@ private: // in order to make this independent from is_near() template static inline bool calculate_collinear_data(Point1 const& a1, Point1 const& a2, // in - Point2 const& b1, Point2 const& b2, // in + Point2 const& b1, Point2 const& /*b2*/, // in ResultInverse const& res_a1_a2, // in ResultInverse const& res_a1_b1, // in ResultInverse const& res_a1_b2, // in