Skip to content

Commit

Permalink
Fixes for miscellaneous gcc/clang warnings in the test suite.
Browse files Browse the repository at this point in the history
  • Loading branch information
tinko92 committed Sep 30, 2023
1 parent 3f5c044 commit 492dd99
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion include/boost/geometry/formulas/meridian_direct.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class meridian_direct
{
result.reverse_azimuth = pi;
}
else if (result.lat2 < -half_pi &&
else if ((result.lat2 < -half_pi) &&
result.lat2 > -one_and_a_half_pi)
{
result.reverse_azimuth = c0;
Expand Down
2 changes: 1 addition & 1 deletion test/algorithms/buffer/buffer_linestring_geo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ void test_linestring()
}

settings.test_area = false;
auto const n = sizeof(testcases_aimes) / sizeof(testcases_aimes[0]);
int const n = sizeof(testcases_aimes) / sizeof(testcases_aimes[0]);

// Cases (ouf of 197) where the guessed area estimations are not met.
// If this needs to be changed, be sure to
Expand Down
8 changes: 4 additions & 4 deletions test/algorithms/buffer/buffer_piece_border.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,10 @@ void test_point(std::string const& wkt, bool expected_outside,
Point point;
bg::read_wkt(wkt, point);
border.point_on_piece(point, false, false, state);
BOOST_CHECK(expected_outside == state.count > 0);
BOOST_CHECK(expected_on_offsetted == state.count_on_offsetted > 0);
BOOST_CHECK(expected_on_edge == state.count_on_edge > 0);
BOOST_CHECK(expected_on_origin == state.count_on_origin > 0);
BOOST_CHECK(expected_outside == (state.count > 0));
BOOST_CHECK(expected_on_offsetted == (state.count_on_offsetted > 0));
BOOST_CHECK(expected_on_edge == (state.count_on_edge > 0));
BOOST_CHECK(expected_on_origin == (state.count_on_origin > 0));

#ifdef TEST_WITH_SVG
std::string style = "fill:" + color + ";stroke:rgb(0,0,0);stroke-width:1";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void test_all()
}

template <typename CoordinateType>
void test_ticket_10868(std::string const& wkt_out)
void test_ticket_10868(/*std::string const& wkt_out*/)
{
using point_type = bg::model::point<CoordinateType, 2, bg::cs::cartesian>;
using polygon_type = bg::model::polygon
Expand Down
2 changes: 1 addition & 1 deletion test/algorithms/set_operations/union/union_issues.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ void issue_1103()
bg::union_(poly1, poly2, result);

// Verify result. Before commit b1bebca the result was empty.
BOOST_CHECK_EQUAL(1, boost::size(result));
BOOST_CHECK_EQUAL(1, static_cast<int>(boost::size(result)));
BOOST_CHECK_CLOSE(2.0, bg::area(result), 0.0001);
}

Expand Down

0 comments on commit 492dd99

Please sign in to comment.