[srs][strategies] Fix warnings (comparison, unused parameter).

This commit is contained in:
Adam Wulkiewicz
2019-02-04 22:18:59 +01:00
parent 7e5021a532
commit fca0aa9ff4
4 changed files with 17 additions and 15 deletions

View File

@@ -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<char*>(&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<char*>(&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<char*>(&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<char*>(&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<char*>(&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;

View File

@@ -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 <BOOST_GEOMETRY_PROJECTIONS_DETAIL_TYPENAME_PX, typename Parameters>
inline Parameters o_proj_parameters(srs::spar::parameters<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX> const& params,
inline Parameters o_proj_parameters(srs::spar::parameters<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX> const& /*params*/,
Parameters const& par)
{
/* copy existing header into new */
@@ -292,7 +292,7 @@ namespace projections
// General Oblique Transformation
template <typename T, typename Params, typename Parameters, typename ProjParameters>
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<T>();

View File

@@ -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 <typename CmpVal>
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

View File

@@ -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 <typename Point1, typename Point2, typename ResultInverse, typename CalcT>
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