[gdal-dev] osx compile failure
Even Rouault
even.rouault at spatialys.com
Tue Dec 18 13:20:01 PST 2018
Alan,
your environment is correct, it is just that there are different versions of
libjson-c where function signatures have changed. We have had similar issues
in the past.
>
> I doing 'git clone' of master from OSGeo/gdal and running the
> gdal/ci/travis/osx scripts. The install.sh script terminates because of:
>
> plmosaicdataset.cpp:1111:30: error: implicit conversion loses integer
> precision: 'size_t' (aka 'unsigned long') to 'const int'
> [-Werror,-Wshorten-64-to-32] const int nMosaics =
> json_object_array_length(poMosaics);
Could be fixed for all versions by using: const auto
> ~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> plmosaicdataset.cpp:1419:30: error: comparison of integers of different
> signs: 'int' and 'size_t' (aka 'unsigned long') [-Werror,-Wsign-compare]
> for(int i = 0; i < json_object_array_length(poItems); i++ ) ~ ^
I would do
const auto nItemsLength = json_object_array_length(poItems);
for( decltype(nItemsLength) i = 0; i < nItemsLength; i++ )
Can you submit a pull request with something like the above ?
Even
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the gdal-dev
mailing list