Merge pull request #5822 from yandex/fix-build-gcc9

fix build on macosx and gcc9
This commit is contained in:
alexey-milovidov 2019-07-01 23:16:11 +03:00 committed by GitHub
commit 6890c5e3b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -224,9 +224,16 @@ void PointInPolygonWithGrid<CoordinateType>::calcGridAttributes(
const Point & min_corner = box.min_corner();
const Point & max_corner = box.max_corner();
#pragma GCC diagnostic push
#if !__clang__
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
cell_width = (max_corner.x() - min_corner.x()) / grid_size;
cell_height = (max_corner.y() - min_corner.y()) / grid_size;
#pragma GCC diagnostic pop
if (cell_width == 0 || cell_height == 0)
{
has_empty_bound = true;