diff --git a/Makefile b/Makefile index 314310d36..0ae5d4160 100755 --- a/Makefile +++ b/Makefile @@ -26,6 +26,7 @@ clean: @find ./ -name "*.dylib" -exec rm {} \; @find ./ -name "*.so" -exec rm {} \; @find ./ -name "*.o" -exec rm {} \; + @find ./ -name "*.a" -exec rm {} \; @find ./ -name "*.pyc" -exec rm {} \; @if test -e "bindings/python/mapnik/paths.py"; then rm "bindings/python/mapnik/paths.py"; fi diff --git a/SConstruct b/SConstruct index 7b3509ba1..cddcf61f1 100644 --- a/SConstruct +++ b/SConstruct @@ -1788,7 +1788,7 @@ if not preconfigured: else: # TODO - add back -fvisibility-inlines-hidden # https://github.com/mapnik/mapnik/issues/1863 - env.Append(CXXFLAGS = common_cxx_flags + '-O%s -fno-strict-aliasing -Wno-inline -Wno-parentheses -Wno-char-subscripts' % (env['OPTIMIZATION'])) + env.Append(CXXFLAGS = common_cxx_flags + '-O%s -Wextra -Wno-unknown-pragmas' % (env['OPTIMIZATION'])) if env['DEBUG_UNDEFINED']: env.Append(CXXFLAGS = '-fsanitize=undefined-trap -fsanitize-undefined-trap-on-error -ftrapv -fwrapv') diff --git a/bindings/python/mapnik_color.cpp b/bindings/python/mapnik_color.cpp index 1068fdf43..067a73d85 100644 --- a/bindings/python/mapnik_color.cpp +++ b/bindings/python/mapnik_color.cpp @@ -24,7 +24,13 @@ #include "boost_std_shared_shim.hpp" // boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" + #include +#pragma GCC diagnostic pop //mapnik #include diff --git a/bindings/python/mapnik_coord.cpp b/bindings/python/mapnik_coord.cpp index 90a6a34c5..222f5b47e 100644 --- a/bindings/python/mapnik_coord.cpp +++ b/bindings/python/mapnik_coord.cpp @@ -23,7 +23,14 @@ #include "boost_std_shared_shim.hpp" // boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" + #include +#pragma GCC diagnostic pop + // mapnik #include diff --git a/bindings/python/mapnik_datasource.cpp b/bindings/python/mapnik_datasource.cpp index 8b5a22c05..df63fe0d8 100644 --- a/bindings/python/mapnik_datasource.cpp +++ b/bindings/python/mapnik_datasource.cpp @@ -24,9 +24,15 @@ // boost #include "boost_std_shared_shim.hpp" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" + #include #include #include +#pragma GCC diagnostic pop // stl #include diff --git a/bindings/python/mapnik_datasource_cache.cpp b/bindings/python/mapnik_datasource_cache.cpp index 8ecba1ccd..d33ece83b 100644 --- a/bindings/python/mapnik_datasource_cache.cpp +++ b/bindings/python/mapnik_datasource_cache.cpp @@ -22,10 +22,16 @@ #include +// boost #include "boost_std_shared_shim.hpp" - +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" #include #include +#pragma GCC diagnostic pop + #include #include #include diff --git a/bindings/python/mapnik_envelope.cpp b/bindings/python/mapnik_envelope.cpp index bab80e332..04f18514d 100644 --- a/bindings/python/mapnik_envelope.cpp +++ b/bindings/python/mapnik_envelope.cpp @@ -22,10 +22,14 @@ #include -#include "boost_std_shared_shim.hpp" - // boost +#include "boost_std_shared_shim.hpp" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" #include +#pragma GCC diagnostic pop // mapnik #include @@ -94,7 +98,7 @@ void (box2d::*clip)(box2d const&) = &box2d::clip; void (box2d::*pad)(double) = &box2d::pad; // deepcopy -box2d box2d_deepcopy(box2d & obj, boost::python::dict memo) +box2d box2d_deepcopy(box2d & obj, boost::python::dict const&) { // FIXME::ignore memo for now box2d result(obj); diff --git a/bindings/python/mapnik_expression.cpp b/bindings/python/mapnik_expression.cpp index f9ded80ec..75f35272b 100644 --- a/bindings/python/mapnik_expression.cpp +++ b/bindings/python/mapnik_expression.cpp @@ -21,15 +21,21 @@ *****************************************************************************/ #include -#include "boost_std_shared_shim.hpp" #include "python_to_value.hpp" // boost +#include "boost_std_shared_shim.hpp" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" + #include -#include #include +#pragma GCC diagnostic pop // mapnik +#include #include #include #include diff --git a/bindings/python/mapnik_feature.cpp b/bindings/python/mapnik_feature.cpp index b12bd1570..bb6f3f33a 100644 --- a/bindings/python/mapnik_feature.cpp +++ b/bindings/python/mapnik_feature.cpp @@ -22,15 +22,20 @@ #include -#include "boost_std_shared_shim.hpp" - // boost +#include "boost_std_shared_shim.hpp" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" + #include #include #include #include #include #include +#pragma GCC diagnostic pop // mapnik #include diff --git a/bindings/python/mapnik_featureset.cpp b/bindings/python/mapnik_featureset.cpp index 7836d6f18..b6d0fe384 100644 --- a/bindings/python/mapnik_featureset.cpp +++ b/bindings/python/mapnik_featureset.cpp @@ -22,11 +22,16 @@ #include -#include "boost_std_shared_shim.hpp" - // boost +#include "boost_std_shared_shim.hpp" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" + #include #include +#pragma GCC diagnostic pop // mapnik #include diff --git a/bindings/python/mapnik_font_engine.cpp b/bindings/python/mapnik_font_engine.cpp index 5bc43a8a5..0da036f06 100644 --- a/bindings/python/mapnik_font_engine.cpp +++ b/bindings/python/mapnik_font_engine.cpp @@ -22,10 +22,16 @@ #include +// boost #include "boost_std_shared_shim.hpp" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" #include #include +#pragma GCC diagnostic pop #include #include diff --git a/bindings/python/mapnik_fontset.cpp b/bindings/python/mapnik_fontset.cpp index a7924dec8..89668a08c 100644 --- a/bindings/python/mapnik_fontset.cpp +++ b/bindings/python/mapnik_fontset.cpp @@ -21,10 +21,16 @@ *****************************************************************************/ #include -#include "boost_std_shared_shim.hpp" // boost +#include "boost_std_shared_shim.hpp" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" + #include +#pragma GCC diagnostic pop //mapnik #include diff --git a/bindings/python/mapnik_gamma_method.cpp b/bindings/python/mapnik_gamma_method.cpp index 1b3b8edde..7d82d4127 100644 --- a/bindings/python/mapnik_gamma_method.cpp +++ b/bindings/python/mapnik_gamma_method.cpp @@ -22,7 +22,15 @@ #include +// boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" + #include +#pragma GCC diagnostic pop + #include #include "mapnik_enumeration.hpp" diff --git a/bindings/python/mapnik_geometry.cpp b/bindings/python/mapnik_geometry.cpp index 1594c86a7..fb0e6da83 100644 --- a/bindings/python/mapnik_geometry.cpp +++ b/bindings/python/mapnik_geometry.cpp @@ -20,9 +20,13 @@ #include -#include "boost_std_shared_shim.hpp" - // boost +#include "boost_std_shared_shim.hpp" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" + #include #include #include @@ -30,6 +34,7 @@ #include #include #include +#pragma GCC diagnostic pop // mapnik #include diff --git a/bindings/python/mapnik_grid.cpp b/bindings/python/mapnik_grid.cpp index 18fccc1c3..2bb5f2bd3 100644 --- a/bindings/python/mapnik_grid.cpp +++ b/bindings/python/mapnik_grid.cpp @@ -24,12 +24,17 @@ #include -#include "boost_std_shared_shim.hpp" - // boost +#include "boost_std_shared_shim.hpp" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" + #include #include #include +#pragma GCC diagnostic pop // mapnik #include diff --git a/bindings/python/mapnik_grid_view.cpp b/bindings/python/mapnik_grid_view.cpp index bea5054c8..066628385 100644 --- a/bindings/python/mapnik_grid_view.cpp +++ b/bindings/python/mapnik_grid_view.cpp @@ -23,12 +23,18 @@ #if defined(GRID_RENDERER) #include -#include "boost_std_shared_shim.hpp" // boost +#include "boost_std_shared_shim.hpp" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" + #include #include #include +#pragma GCC diagnostic pop // mapnik #include diff --git a/bindings/python/mapnik_image.cpp b/bindings/python/mapnik_image.cpp index 7e4a3811c..0e16c7d5b 100644 --- a/bindings/python/mapnik_image.cpp +++ b/bindings/python/mapnik_image.cpp @@ -22,12 +22,17 @@ #include -#include "boost_std_shared_shim.hpp" - // boost +#include "boost_std_shared_shim.hpp" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" + #include #include #include +#pragma GCC diagnostic pop // mapnik #include diff --git a/bindings/python/mapnik_image_view.cpp b/bindings/python/mapnik_image_view.cpp index 32d75dbf7..d68afa2a5 100644 --- a/bindings/python/mapnik_image_view.cpp +++ b/bindings/python/mapnik_image_view.cpp @@ -22,9 +22,19 @@ #include +// boost #include "boost_std_shared_shim.hpp" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" #include +#include +#include +#pragma GCC diagnostic pop + +// mapnik #include #include #include diff --git a/bindings/python/mapnik_label_collision_detector.cpp b/bindings/python/mapnik_label_collision_detector.cpp index 015adaf21..762f92570 100644 --- a/bindings/python/mapnik_label_collision_detector.cpp +++ b/bindings/python/mapnik_label_collision_detector.cpp @@ -22,13 +22,17 @@ #include +// boost #include "boost_std_shared_shim.hpp" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" #include #include #include -#include - +#pragma GCC diagnostic pop #include #include diff --git a/bindings/python/mapnik_layer.cpp b/bindings/python/mapnik_layer.cpp index fb7054ef8..e463afe75 100644 --- a/bindings/python/mapnik_layer.cpp +++ b/bindings/python/mapnik_layer.cpp @@ -21,11 +21,17 @@ *****************************************************************************/ #include -#include "boost_std_shared_shim.hpp" // boost +#include "boost_std_shared_shim.hpp" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" + #include #include +#pragma GCC diagnostic pop // mapnik #include diff --git a/bindings/python/mapnik_logger.cpp b/bindings/python/mapnik_logger.cpp index 6e027008c..d26c2ff79 100644 --- a/bindings/python/mapnik_logger.cpp +++ b/bindings/python/mapnik_logger.cpp @@ -21,10 +21,17 @@ *****************************************************************************/ #include + +// boost #include "boost_std_shared_shim.hpp" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" #include #include +#pragma GCC diagnostic pop #include #include diff --git a/bindings/python/mapnik_map.cpp b/bindings/python/mapnik_map.cpp index 1c0b0270d..3363e53be 100644 --- a/bindings/python/mapnik_map.cpp +++ b/bindings/python/mapnik_map.cpp @@ -22,12 +22,19 @@ #include -#include "boost_std_shared_shim.hpp" // boost +#include "boost_std_shared_shim.hpp" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" + #include +#include #include #include #include +#pragma GCC diagnostic pop // mapnik #include diff --git a/bindings/python/mapnik_palette.cpp b/bindings/python/mapnik_palette.cpp index ca3bfe2ca..878ecb6b5 100644 --- a/bindings/python/mapnik_palette.cpp +++ b/bindings/python/mapnik_palette.cpp @@ -22,11 +22,16 @@ #include -#include "boost_std_shared_shim.hpp" - // boost +#include "boost_std_shared_shim.hpp" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" + #include #include +#pragma GCC diagnostic pop //mapnik #include diff --git a/bindings/python/mapnik_parameters.cpp b/bindings/python/mapnik_parameters.cpp index 8bcea8eec..7074e726e 100644 --- a/bindings/python/mapnik_parameters.cpp +++ b/bindings/python/mapnik_parameters.cpp @@ -22,10 +22,15 @@ #include -#include "boost_std_shared_shim.hpp" - // boost +#include "boost_std_shared_shim.hpp" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" + #include +#pragma GCC diagnostic pop // mapnik #include diff --git a/bindings/python/mapnik_proj_transform.cpp b/bindings/python/mapnik_proj_transform.cpp index 20079dde3..fa6f396ca 100644 --- a/bindings/python/mapnik_proj_transform.cpp +++ b/bindings/python/mapnik_proj_transform.cpp @@ -21,7 +21,18 @@ *****************************************************************************/ #include + + +// boost #include "boost_std_shared_shim.hpp" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" + +#include +#include +#pragma GCC diagnostic pop // mapnik #include @@ -29,10 +40,6 @@ #include #include -// boost -#include -#include - // stl #include diff --git a/bindings/python/mapnik_projection.cpp b/bindings/python/mapnik_projection.cpp index 54e8462c7..38cd53b3e 100644 --- a/bindings/python/mapnik_projection.cpp +++ b/bindings/python/mapnik_projection.cpp @@ -22,10 +22,15 @@ #include -#include "boost_std_shared_shim.hpp" - // boost +#include "boost_std_shared_shim.hpp" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" + #include +#pragma GCC diagnostic pop // mapnik #include diff --git a/bindings/python/mapnik_python.cpp b/bindings/python/mapnik_python.cpp index 4dd1161df..69075115a 100644 --- a/bindings/python/mapnik_python.cpp +++ b/bindings/python/mapnik_python.cpp @@ -22,7 +22,13 @@ #include +// boost #include "boost_std_shared_shim.hpp" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" + #include "python_to_value.hpp" #include // for keywords, arg, etc #include @@ -36,6 +42,7 @@ #include // for get_managed_object #include #include +#pragma GCC diagnostic pop // stl #include diff --git a/bindings/python/mapnik_query.cpp b/bindings/python/mapnik_query.cpp index e0b85390d..893d83631 100644 --- a/bindings/python/mapnik_query.cpp +++ b/bindings/python/mapnik_query.cpp @@ -22,11 +22,16 @@ #include -#include "boost_std_shared_shim.hpp" -#include "python_to_value.hpp" - // boost +#include "boost_std_shared_shim.hpp" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" + +#include "python_to_value.hpp" #include +#pragma GCC diagnostic pop // mapnik #include diff --git a/bindings/python/mapnik_raster_colorizer.cpp b/bindings/python/mapnik_raster_colorizer.cpp index f76173281..725ea166b 100644 --- a/bindings/python/mapnik_raster_colorizer.cpp +++ b/bindings/python/mapnik_raster_colorizer.cpp @@ -22,10 +22,16 @@ #include -#include "boost_std_shared_shim.hpp" // boost +#include "boost_std_shared_shim.hpp" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" + #include #include +#pragma GCC diagnostic pop // mapnik #include diff --git a/bindings/python/mapnik_rule.cpp b/bindings/python/mapnik_rule.cpp index 4d0763eea..53fa4ad21 100644 --- a/bindings/python/mapnik_rule.cpp +++ b/bindings/python/mapnik_rule.cpp @@ -22,12 +22,17 @@ #include -#include "boost_std_shared_shim.hpp" - // boost +#include "boost_std_shared_shim.hpp" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" + #include #include #include +#pragma GCC diagnostic pop // mapnik #include diff --git a/bindings/python/mapnik_scaling_method.cpp b/bindings/python/mapnik_scaling_method.cpp index 8b984dfb6..495d38007 100644 --- a/bindings/python/mapnik_scaling_method.cpp +++ b/bindings/python/mapnik_scaling_method.cpp @@ -22,7 +22,15 @@ #include + +// boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" + #include +#pragma GCC diagnostic pop void export_scaling_method() { diff --git a/bindings/python/mapnik_style.cpp b/bindings/python/mapnik_style.cpp index 30b06797c..0658f9bf9 100644 --- a/bindings/python/mapnik_style.cpp +++ b/bindings/python/mapnik_style.cpp @@ -22,11 +22,16 @@ #include -#include "boost_std_shared_shim.hpp" - // boost +#include "boost_std_shared_shim.hpp" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" + #include #include +#pragma GCC diagnostic pop // mapnik #include diff --git a/bindings/python/mapnik_symbolizer.cpp b/bindings/python/mapnik_symbolizer.cpp index fa4f4b61c..2175b595e 100644 --- a/bindings/python/mapnik_symbolizer.cpp +++ b/bindings/python/mapnik_symbolizer.cpp @@ -22,18 +22,17 @@ #include -#include "boost_std_shared_shim.hpp" // FIXME - do we need it? -// The functions in this file produce deprecation warnings. -// But as shield symbolizer doesn't fully support more than one -// placement from python yet these functions are actually the -// correct ones. - -#define NO_DEPRECATION_WARNINGS - - // boost +#include "boost_std_shared_shim.hpp" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" + #include #include +#pragma GCC diagnostic pop + // mapnik #include #include @@ -131,10 +130,12 @@ boost::python::object __getitem__(mapnik::symbolizer_base const& sym, std::strin return boost::python::object(); } +/* std::string __str__(mapnik::symbolizer const& sym) { return mapnik::util::apply_visitor(mapnik::symbolizer_to_json(), sym); } +*/ std::string get_symbolizer_type(symbolizer const& sym) { @@ -201,7 +202,7 @@ void export_symbolizer() .def("__setattr__",&__setitem__) .def("__getitem__",&__getitem__) .def("__getattr__",&__getitem__) - .def("__str__", &__str__) + //.def("__str__", &__str__) .def(self == self) // __eq__ ; } diff --git a/bindings/python/mapnik_text_placement.cpp b/bindings/python/mapnik_text_placement.cpp index ba3bc0e01..8ab723e90 100644 --- a/bindings/python/mapnik_text_placement.cpp +++ b/bindings/python/mapnik_text_placement.cpp @@ -22,11 +22,17 @@ #include +// boost #include "boost_std_shared_shim.hpp" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" #include #include #include +#pragma GCC diagnostic pop #include #include diff --git a/bindings/python/mapnik_view_transform.cpp b/bindings/python/mapnik_view_transform.cpp index 87a8aad23..d2194b1f6 100644 --- a/bindings/python/mapnik_view_transform.cpp +++ b/bindings/python/mapnik_view_transform.cpp @@ -21,8 +21,15 @@ *****************************************************************************/ #include + // boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" + #include +#pragma GCC diagnostic pop // mapnik #include diff --git a/bindings/python/python_grid_utils.cpp b/bindings/python/python_grid_utils.cpp index 13ac5d493..cbb9ad19a 100644 --- a/bindings/python/python_grid_utils.cpp +++ b/bindings/python/python_grid_utils.cpp @@ -23,8 +23,15 @@ #if defined(GRID_RENDERER) #include + // boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" + #include +#pragma GCC diagnostic pop // mapnik #include diff --git a/bindings/python/python_to_value.hpp b/bindings/python/python_to_value.hpp index 6d220b61f..da4830e8a 100644 --- a/bindings/python/python_to_value.hpp +++ b/bindings/python/python_to_value.hpp @@ -23,7 +23,12 @@ #define MAPNIK_PYTHON_BINDING_PYTHON_TO_VALUE // boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" #include +#pragma GCC diagnostic pop // mapnik #include diff --git a/deps/agg/src/agg_pixfmt_rgba.cpp b/deps/agg/src/agg_pixfmt_rgba.cpp index dff0bdb90..f07c54032 100644 --- a/deps/agg/src/agg_pixfmt_rgba.cpp +++ b/deps/agg/src/agg_pixfmt_rgba.cpp @@ -1,8 +1,14 @@ + #include "agg_pixfmt_rgba.h" + +// boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" #include #include #include -//#include +#pragma GCC diagnostic pop namespace agg { diff --git a/include/mapnik/attribute_collector.hpp b/include/mapnik/attribute_collector.hpp index 458edc142..7ed802449 100644 --- a/include/mapnik/attribute_collector.hpp +++ b/include/mapnik/attribute_collector.hpp @@ -40,7 +40,10 @@ #include // boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-local-typedef" #include +#pragma GCC diagnostic pop // stl #include diff --git a/include/mapnik/css_color_grammar.hpp b/include/mapnik/css_color_grammar.hpp index 222b8ce05..8a68de16c 100644 --- a/include/mapnik/css_color_grammar.hpp +++ b/include/mapnik/css_color_grammar.hpp @@ -27,22 +27,22 @@ #include #include -// spirit2 +// boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" #include #include - -// phoenix #include #include #include #include +#include +#pragma GCC diagnostic pop // stl #include -// fusion -#include - BOOST_FUSION_ADAPT_ADT( mapnik::color, (unsigned, unsigned, obj.red(), obj.set_red(val)) diff --git a/include/mapnik/evaluate_global_attributes.hpp b/include/mapnik/evaluate_global_attributes.hpp index f880abb5e..309c5c831 100644 --- a/include/mapnik/evaluate_global_attributes.hpp +++ b/include/mapnik/evaluate_global_attributes.hpp @@ -46,7 +46,7 @@ struct evaluate_expression : util::static_visitor explicit evaluate_expression(Attributes const& attributes) : attributes_(attributes) {} - value_type operator() (attribute const& attr) const + value_type operator() (attribute const&) const { throw std::runtime_error("can't evaluate feature attributes in this context"); } @@ -61,7 +61,7 @@ struct evaluate_expression : util::static_visitor return value_type();// throw? } - value_type operator() (geometry_type_attribute const& geom) const + value_type operator() (geometry_type_attribute const&) const { throw std::runtime_error("can't evaluate geometry_type attributes in this context"); } @@ -139,17 +139,17 @@ struct evaluate_expression : util::static_visitor evaluate_expression(boost::none_t) {} - value_type operator() (attribute const& attr) const + value_type operator() (attribute const&) const { throw std::runtime_error("can't evaluate feature attributes in this context"); } - value_type operator() (global_attribute const& attr) const + value_type operator() (global_attribute const&) const { throw std::runtime_error("can't evaluate feature attributes in this context"); } - value_type operator() (geometry_type_attribute const& geom) const + value_type operator() (geometry_type_attribute const&) const { throw std::runtime_error("can't evaluate geometry_type attributes in this context"); } @@ -287,7 +287,7 @@ struct evaluate_global_attributes : mapnik::noncopyable } template - void operator() (T const& val) const + void operator() (T const&) const { // no-op } diff --git a/include/mapnik/expression_grammar.hpp b/include/mapnik/expression_grammar.hpp index 7e80e5540..11a75bb62 100644 --- a/include/mapnik/expression_grammar.hpp +++ b/include/mapnik/expression_grammar.hpp @@ -30,13 +30,15 @@ #include #include -// spirit2 +// boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" #include #include -// phoenix #include -// fusion #include +#pragma GCC diagnostic pop BOOST_FUSION_ADAPT_STRUCT(mapnik::unary_function_call, (mapnik::unary_function_impl, fun) diff --git a/include/mapnik/geometry_container.hpp b/include/mapnik/geometry_container.hpp index c56eaa734..ae654d24b 100644 --- a/include/mapnik/geometry_container.hpp +++ b/include/mapnik/geometry_container.hpp @@ -24,7 +24,11 @@ #define MAPNIK_GEOMETRY_CONTAINER_HPP // boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" #include +#pragma GCC diagnostic pop namespace mapnik { diff --git a/include/mapnik/image_filter.hpp b/include/mapnik/image_filter.hpp index e84c49a8e..b4fe9ae93 100644 --- a/include/mapnik/image_filter.hpp +++ b/include/mapnik/image_filter.hpp @@ -29,7 +29,11 @@ #include // boost GIL +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" #include +#pragma GCC diagnostic pop // agg #include "agg_basics.h" diff --git a/include/mapnik/image_filter_grammar.hpp b/include/mapnik/image_filter_grammar.hpp index 005008e03..9f94a3b1e 100644 --- a/include/mapnik/image_filter_grammar.hpp +++ b/include/mapnik/image_filter_grammar.hpp @@ -24,8 +24,12 @@ #define MAPNIK_IMAGE_FILITER_GRAMMAR_HPP // boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" #include #include +#pragma GCC diagnostic pop // mapnik #include diff --git a/include/mapnik/image_util.hpp b/include/mapnik/image_util.hpp index fcd7dbdf3..ec946b30c 100644 --- a/include/mapnik/image_util.hpp +++ b/include/mapnik/image_util.hpp @@ -29,8 +29,11 @@ #include // boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-local-typedef" #include #include +#pragma GCC diagnostic pop // stl #include diff --git a/include/mapnik/json/error_handler.hpp b/include/mapnik/json/error_handler.hpp index dfe4c72be..f1a4f8b1e 100644 --- a/include/mapnik/json/error_handler.hpp +++ b/include/mapnik/json/error_handler.hpp @@ -34,7 +34,7 @@ struct error_handler { using result_type = void; void operator() ( - Iterator first, Iterator last, + Iterator, Iterator last, Iterator err_pos, boost::spirit::info const& what) const { std::stringstream s; diff --git a/include/mapnik/json/generic_json.hpp b/include/mapnik/json/generic_json.hpp index db01a32b6..e8baaf1eb 100644 --- a/include/mapnik/json/generic_json.hpp +++ b/include/mapnik/json/generic_json.hpp @@ -26,8 +26,13 @@ #include #include #include + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" #include #include +#pragma GCC diagnostic pop namespace mapnik { namespace json { diff --git a/include/mapnik/json/geometry_generator_grammar.hpp b/include/mapnik/json/geometry_generator_grammar.hpp index 2128b6953..543dc64d1 100644 --- a/include/mapnik/json/geometry_generator_grammar.hpp +++ b/include/mapnik/json/geometry_generator_grammar.hpp @@ -31,10 +31,14 @@ #include // for CommandType::SEG_MOVETO // boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" #include #include #include #include // for vc++ and android whose c++11 libs lack std::trunc +#pragma GCC diagnostic pop //stl #include diff --git a/include/mapnik/json/positions_grammar.hpp b/include/mapnik/json/positions_grammar.hpp index 3e4ca4c33..32b1e2a84 100644 --- a/include/mapnik/json/positions_grammar.hpp +++ b/include/mapnik/json/positions_grammar.hpp @@ -26,10 +26,17 @@ // mapnik #include #include -// spirit::qi + +// boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" #include #include #include +#pragma GCC diagnostic pop + +// stl #include namespace mapnik { namespace json { diff --git a/include/mapnik/json/topojson_grammar.hpp b/include/mapnik/json/topojson_grammar.hpp index 319eaa5f3..b36f8abc4 100644 --- a/include/mapnik/json/topojson_grammar.hpp +++ b/include/mapnik/json/topojson_grammar.hpp @@ -30,8 +30,12 @@ #include // boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" #include #include +#pragma GCC diagnostic pop // stl #include diff --git a/include/mapnik/params_impl.hpp b/include/mapnik/params_impl.hpp index cb53a13b7..7685d00f4 100644 --- a/include/mapnik/params_impl.hpp +++ b/include/mapnik/params_impl.hpp @@ -30,8 +30,12 @@ #include // boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" #include #include +#pragma GCC diagnostic pop // stl #include diff --git a/include/mapnik/path_expression_grammar.hpp b/include/mapnik/path_expression_grammar.hpp index b8fdb5234..1a0a3acb7 100644 --- a/include/mapnik/path_expression_grammar.hpp +++ b/include/mapnik/path_expression_grammar.hpp @@ -27,7 +27,11 @@ #include // boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" #include +#pragma GCC diagnostic pop // stl #include diff --git a/include/mapnik/quad_tree.hpp b/include/mapnik/quad_tree.hpp index ed716bf4d..5af4c6149 100644 --- a/include/mapnik/quad_tree.hpp +++ b/include/mapnik/quad_tree.hpp @@ -28,7 +28,11 @@ #include // boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" #include +#pragma GCC diagnostic pop // stl #include diff --git a/include/mapnik/sql_utils.hpp b/include/mapnik/sql_utils.hpp index e4377c3e7..f8ade315a 100644 --- a/include/mapnik/sql_utils.hpp +++ b/include/mapnik/sql_utils.hpp @@ -27,7 +27,11 @@ #include // for trim // boost -#include // for ireplace_all, etc +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#include +#pragma GCC diagnostic pop // stl #include diff --git a/include/mapnik/svg/geometry_svg_generator.hpp b/include/mapnik/svg/geometry_svg_generator.hpp index 98194b8fa..e0c40bbff 100644 --- a/include/mapnik/svg/geometry_svg_generator.hpp +++ b/include/mapnik/svg/geometry_svg_generator.hpp @@ -33,6 +33,9 @@ #include // boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" #include #include #include @@ -41,6 +44,7 @@ #include #include #include +#pragma GCC diagnostic pop // adapted to conform to the concepts diff --git a/include/mapnik/svg/output/svg_output_grammars.hpp b/include/mapnik/svg/output/svg_output_grammars.hpp index 2f59b1d92..428a9f780 100644 --- a/include/mapnik/svg/output/svg_output_grammars.hpp +++ b/include/mapnik/svg/output/svg_output_grammars.hpp @@ -37,9 +37,13 @@ namespace mapnik { namespace svg { }} // boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" #include #include #include +#pragma GCC diagnostic pop /*! * mapnik::svg::path_output_attributes is adapted as a fusion sequence diff --git a/include/mapnik/svg/output/svg_output_grammars_impl.hpp b/include/mapnik/svg/output/svg_output_grammars_impl.hpp index d98c90ca2..892fdf903 100644 --- a/include/mapnik/svg/output/svg_output_grammars_impl.hpp +++ b/include/mapnik/svg/output/svg_output_grammars_impl.hpp @@ -25,8 +25,14 @@ // mapnik #include + +// boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" #include #include +#pragma GCC diagnostic pop namespace mapnik { namespace svg { diff --git a/include/mapnik/svg/svg_path_commands.hpp b/include/mapnik/svg/svg_path_commands.hpp index 1195003f5..23df6ee9c 100644 --- a/include/mapnik/svg/svg_path_commands.hpp +++ b/include/mapnik/svg/svg_path_commands.hpp @@ -27,11 +27,14 @@ #include // boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" #include #include #include #include - +#pragma GCC diagnostic pop namespace mapnik { namespace svg { diff --git a/include/mapnik/svg/svg_transform_grammar.hpp b/include/mapnik/svg/svg_transform_grammar.hpp index 416e68890..5b0f4955d 100644 --- a/include/mapnik/svg/svg_transform_grammar.hpp +++ b/include/mapnik/svg/svg_transform_grammar.hpp @@ -29,12 +29,16 @@ // agg #include -// spirit +// boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" #include #include #include #include #include +#pragma GCC diagnostic pop namespace mapnik { namespace svg { diff --git a/include/mapnik/symbolizer_utils.hpp b/include/mapnik/symbolizer_utils.hpp index 37e7f6eec..614c936e9 100644 --- a/include/mapnik/symbolizer_utils.hpp +++ b/include/mapnik/symbolizer_utils.hpp @@ -140,6 +140,8 @@ inline std::string symbolizer_name(symbolizer const& sym) return type; } +// https://github.com/mapnik/mapnik/issues/2324 +/* template class symbolizer_property_value_string : public util::static_visitor @@ -194,7 +196,7 @@ public: std::ostringstream ss; if (expr) { - ss << '\"' << "FIXME" /*mapnik::to_expression_string(*expr)*/ << '\"'; + ss << '\"' << "FIXME" << '\"'; } return ss.str(); } @@ -253,6 +255,8 @@ struct symbolizer_to_json : public util::static_visitor } }; +*/ + namespace { template diff --git a/include/mapnik/util/container_adapter.hpp b/include/mapnik/util/container_adapter.hpp index 8416e6093..e67514dc8 100644 --- a/include/mapnik/util/container_adapter.hpp +++ b/include/mapnik/util/container_adapter.hpp @@ -29,7 +29,10 @@ #include // boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-local-typedef" #include +#pragma GCC diagnostic pop namespace boost { namespace spirit { namespace traits { diff --git a/include/mapnik/wkt/wkt_generator_grammar.hpp b/include/mapnik/wkt/wkt_generator_grammar.hpp index e3bf9d9a0..616ed05b0 100644 --- a/include/mapnik/wkt/wkt_generator_grammar.hpp +++ b/include/mapnik/wkt/wkt_generator_grammar.hpp @@ -30,6 +30,9 @@ #include // boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" #include #include #include @@ -38,6 +41,7 @@ #include #include #include // for vc++ and android whose c++11 libs lack std::trunc +#pragma GCC diagnostic pop // stl #include diff --git a/include/mapnik/wkt/wkt_grammar.hpp b/include/mapnik/wkt/wkt_grammar.hpp index badaa720f..ff004faa2 100644 --- a/include/mapnik/wkt/wkt_grammar.hpp +++ b/include/mapnik/wkt/wkt_grammar.hpp @@ -23,9 +23,13 @@ #ifndef MAPNIK_WKT_GRAMMAR_HPP #define MAPNIK_WKT_GRAMMAR_HPP +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" #include #include #include +#pragma GCC diagnostic pop // mapnik #include diff --git a/plugins/input/csv/csv_utils.hpp b/plugins/input/csv/csv_utils.hpp index fd9143fee..a07346268 100644 --- a/plugins/input/csv/csv_utils.hpp +++ b/plugins/input/csv/csv_utils.hpp @@ -23,9 +23,13 @@ #ifndef MAPNIK_CSV_UTILS_DATASOURCE_HPP #define MAPNIK_CSV_UTILS_DATASOURCE_HPP +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#include +#pragma GCC diagnostic pop #include -#include #include namespace csv_utils diff --git a/plugins/input/geojson/geojson_datasource.hpp b/plugins/input/geojson/geojson_datasource.hpp index 906547ee9..c5194ec76 100644 --- a/plugins/input/geojson/geojson_datasource.hpp +++ b/plugins/input/geojson/geojson_datasource.hpp @@ -35,8 +35,10 @@ // boost #include -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunused-variable" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" #include #include #include @@ -47,7 +49,7 @@ #else #include #endif -#pragma clang diagnostic pop +#pragma GCC diagnostic pop // stl #include diff --git a/plugins/input/ogr/ogr_datasource.cpp b/plugins/input/ogr/ogr_datasource.cpp index 92df1929a..3e76dd94c 100644 --- a/plugins/input/ogr/ogr_datasource.cpp +++ b/plugins/input/ogr/ogr_datasource.cpp @@ -34,7 +34,11 @@ #include // boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" #include +#pragma GCC diagnostic pop // stl #include diff --git a/plugins/input/pgraster/pgraster_datasource.cpp b/plugins/input/pgraster/pgraster_datasource.cpp index 4983dfeed..f4a8a9d12 100644 --- a/plugins/input/pgraster/pgraster_datasource.cpp +++ b/plugins/input/pgraster/pgraster_datasource.cpp @@ -39,9 +39,12 @@ #include // boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" #include #include -#include +#pragma GCC diagnostic pop // stl #include diff --git a/plugins/input/postgis/postgis_datasource.cpp b/plugins/input/postgis/postgis_datasource.cpp index c18103f7b..95cb80873 100644 --- a/plugins/input/postgis/postgis_datasource.cpp +++ b/plugins/input/postgis/postgis_datasource.cpp @@ -36,9 +36,13 @@ #include // boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" #include #include #include +#pragma GCC diagnostic pop // stl #include diff --git a/plugins/input/python/python_datasource.cpp b/plugins/input/python/python_datasource.cpp index dbc964e80..f100d67c9 100644 --- a/plugins/input/python/python_datasource.cpp +++ b/plugins/input/python/python_datasource.cpp @@ -7,10 +7,15 @@ #include // boost - +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" #include #include #include +#pragma GCC diagnostic pop + #include "python_utils.hpp" @@ -103,8 +108,6 @@ mapnik::layer_descriptor python_datasource::get_descriptor() const mapnik::datasource::datasource_t python_datasource::type() const { - using return_type = boost::optional; - try { ensure_gil lock; diff --git a/plugins/input/python/python_datasource.hpp b/plugins/input/python/python_datasource.hpp index fc9941c6b..599f4c60b 100644 --- a/plugins/input/python/python_datasource.hpp +++ b/plugins/input/python/python_datasource.hpp @@ -5,7 +5,12 @@ #include // boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" #include +#pragma GCC diagnostic pop class python_datasource : public mapnik::datasource { diff --git a/plugins/input/python/python_featureset.hpp b/plugins/input/python/python_featureset.hpp index 127086867..af024beab 100644 --- a/plugins/input/python/python_featureset.hpp +++ b/plugins/input/python/python_featureset.hpp @@ -6,8 +6,13 @@ #include // boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" #include #include +#pragma GCC diagnostic pop // mapnik #include diff --git a/plugins/input/python/python_utils.hpp b/plugins/input/python/python_utils.hpp index 745cc4199..5ddc3800b 100644 --- a/plugins/input/python/python_utils.hpp +++ b/plugins/input/python/python_utils.hpp @@ -1,7 +1,12 @@ #ifndef PYTHON_UTILS_HPP #define PYTHON_UTILS_HPP +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" #include +#pragma GCC diagnostic pop // Use RAII to acquire and release the GIL as needed. class ensure_gil diff --git a/plugins/input/shape/dbfile.cpp b/plugins/input/shape/dbfile.cpp index 9b5d20f84..cada1733b 100644 --- a/plugins/input/shape/dbfile.cpp +++ b/plugins/input/shape/dbfile.cpp @@ -29,11 +29,15 @@ #include "dbfile.hpp" // boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" #include #ifdef SHAPE_MEMORY_MAPPED_FILE #include #include #endif +#pragma GCC diagnostic pop // stl #include diff --git a/plugins/input/shape/shape_datasource.cpp b/plugins/input/shape/shape_datasource.cpp index a89ced64b..a649c75e3 100644 --- a/plugins/input/shape/shape_datasource.cpp +++ b/plugins/input/shape/shape_datasource.cpp @@ -26,7 +26,11 @@ // boost #include +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" #include +#pragma GCC diagnostic pop // mapnik #include diff --git a/plugins/input/shape/shape_utils.cpp b/plugins/input/shape/shape_utils.cpp index b62f38aaf..0f90878db 100644 --- a/plugins/input/shape/shape_utils.cpp +++ b/plugins/input/shape/shape_utils.cpp @@ -27,7 +27,11 @@ #include "shape_utils.hpp" // boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" #include +#pragma GCC diagnostic pop void setup_attributes(mapnik::context_ptr const& ctx, std::set const& names, diff --git a/plugins/input/topojson/topojson_datasource.hpp b/plugins/input/topojson/topojson_datasource.hpp index d3d51b1fd..cb7e046da 100644 --- a/plugins/input/topojson/topojson_datasource.hpp +++ b/plugins/input/topojson/topojson_datasource.hpp @@ -35,6 +35,10 @@ #include // boost #include +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" #include #include #include @@ -45,6 +49,7 @@ #else #include #endif +#pragma GCC diagnostic pop // stl #include diff --git a/plugins/input/topojson/topojson_featureset.cpp b/plugins/input/topojson/topojson_featureset.cpp index 6b660e643..b1231a04d 100644 --- a/plugins/input/topojson/topojson_featureset.cpp +++ b/plugins/input/topojson/topojson_featureset.cpp @@ -29,14 +29,19 @@ #include #include #include + // boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" #include #include -// boost.geometry #include #include #include #include +#pragma GCC diagnostic pop #include "topojson_featureset.hpp" diff --git a/src/box2d.cpp b/src/box2d.cpp index ca73f5551..209fdece4 100644 --- a/src/box2d.cpp +++ b/src/box2d.cpp @@ -30,11 +30,13 @@ #include // boost -// fusion +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" #include -// spirit #include #include +#pragma GCC diagnostic pop // agg #include "agg_trans_affine.h" diff --git a/src/color.cpp b/src/color.cpp index 1b8a87d73..5cc33b72b 100644 --- a/src/color.cpp +++ b/src/color.cpp @@ -29,13 +29,17 @@ #include "agg_color_rgba.h" // boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" #include #include #include #include #include #include - +#pragma GCC diagnostic pop + // stl #include diff --git a/src/conversions.cpp b/src/conversions.cpp index 7fce22904..da79ae0de 100644 --- a/src/conversions.cpp +++ b/src/conversions.cpp @@ -27,18 +27,21 @@ #include #include -#include - -#if _MSC_VER -#define snprintf _snprintf -#endif - // karma is used by default #define MAPNIK_KARMA_TO_STRING +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#include #ifdef MAPNIK_KARMA_TO_STRING #include #endif +#pragma GCC diagnostic pop + +#if _MSC_VER +#define snprintf _snprintf +#endif namespace mapnik { diff --git a/src/dasharray_parser.cpp b/src/dasharray_parser.cpp index 47eeb8f99..6d432dea6 100644 --- a/src/dasharray_parser.cpp +++ b/src/dasharray_parser.cpp @@ -22,11 +22,16 @@ // mapnik #include + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" #include #include #include #include #include +#pragma GCC diagnostic pop namespace mapnik { diff --git a/src/datasource_cache.cpp b/src/datasource_cache.cpp index 95c9425b6..cafb8c978 100644 --- a/src/datasource_cache.cpp +++ b/src/datasource_cache.cpp @@ -31,9 +31,13 @@ #include // boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" #include #include #include +#pragma GCC diagnostic pop // stl #include diff --git a/src/image_compositing.cpp b/src/image_compositing.cpp index f971a5c23..3c71bc8b2 100644 --- a/src/image_compositing.cpp +++ b/src/image_compositing.cpp @@ -25,8 +25,12 @@ #include // boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wredeclared-class-member" #include #include +#pragma GCC diagnostic pop // agg #include "agg_rendering_buffer.h" diff --git a/src/image_filter_types.cpp b/src/image_filter_types.cpp index 93c7e05c2..702c56672 100644 --- a/src/image_filter_types.cpp +++ b/src/image_filter_types.cpp @@ -25,7 +25,12 @@ #include // boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" #include +#pragma GCC diagnostic pop // stl #include diff --git a/src/image_scaling.cpp b/src/image_scaling.cpp index 0bb7adfed..c122e89c3 100644 --- a/src/image_scaling.cpp +++ b/src/image_scaling.cpp @@ -27,8 +27,12 @@ //#include // boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wredeclared-class-member" #include #include +#pragma GCC diagnostic pop // agg #include "agg_image_accessors.h" diff --git a/src/jpeg_reader.cpp b/src/jpeg_reader.cpp index 4292f01b8..af2d40083 100644 --- a/src/jpeg_reader.cpp +++ b/src/jpeg_reader.cpp @@ -31,9 +31,12 @@ extern "C" } // boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-local-typedef" #include #include #include +#pragma GCC diagnostic pop // std #include diff --git a/src/load_map.cpp b/src/load_map.cpp index 38a58acd9..74f7b3824 100644 --- a/src/load_map.cpp +++ b/src/load_map.cpp @@ -61,11 +61,14 @@ // boost #include -#include #include #include #include #include +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#include +#pragma GCC diagnostic pop // agg #include "agg_trans_affine.h" diff --git a/src/png_reader.cpp b/src/png_reader.cpp index 0a93e1c35..80a8ec957 100644 --- a/src/png_reader.cpp +++ b/src/png_reader.cpp @@ -29,10 +29,12 @@ extern "C" #include } // boost -// iostreams +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-local-typedef" #include #include #include +#pragma GCC diagnostic pop // stl #include diff --git a/src/save_map.cpp b/src/save_map.cpp index d987877a2..27eb75518 100644 --- a/src/save_map.cpp +++ b/src/save_map.cpp @@ -46,8 +46,12 @@ #include #include #include + // boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-local-typedef" #include +#pragma GCC diagnostic pop #include #include #include diff --git a/src/simplify.cpp b/src/simplify.cpp index 0e7bcc10c..e50136781 100644 --- a/src/simplify.cpp +++ b/src/simplify.cpp @@ -2,8 +2,12 @@ #include // boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wredeclared-class-member" #include #include +#pragma GCC diagnostic pop namespace mapnik { diff --git a/src/svg/svg_parser.cpp b/src/svg/svg_parser.cpp index 56767c390..b1ec83bfe 100644 --- a/src/svg/svg_parser.cpp +++ b/src/svg/svg_parser.cpp @@ -31,11 +31,15 @@ #include "agg_span_gradient.h" #include "agg_color_rgba.h" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" #include #include #include #include #include +#pragma GCC diagnostic pop #include #include diff --git a/src/text/font_feature_settings.cpp b/src/text/font_feature_settings.cpp index 897e2c891..67473b509 100644 --- a/src/text/font_feature_settings.cpp +++ b/src/text/font_feature_settings.cpp @@ -25,8 +25,13 @@ #include // boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" #include #include +#pragma GCC diagnostic pop // stl #include diff --git a/src/text/placements/simple.cpp b/src/text/placements/simple.cpp index d0c36f9c3..edcdad236 100644 --- a/src/text/placements/simple.cpp +++ b/src/text/placements/simple.cpp @@ -27,10 +27,15 @@ #include // boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" #include #include #include #include +#pragma GCC diagnostic pop #include diff --git a/src/tiff_reader.cpp b/src/tiff_reader.cpp index 003dc6ebd..bb73712be 100644 --- a/src/tiff_reader.cpp +++ b/src/tiff_reader.cpp @@ -24,19 +24,22 @@ #include #include -// boost -#include - -// iostreams -#include -#include -#include - extern "C" { #include } +// boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#include +#include +#include +#pragma GCC diagnostic pop + +// stl +#include + namespace mapnik { namespace impl { static toff_t tiff_seek_proc(thandle_t fd, toff_t off, int whence) diff --git a/src/webp_reader.cpp b/src/webp_reader.cpp index bd618f222..bd34d2355 100644 --- a/src/webp_reader.cpp +++ b/src/webp_reader.cpp @@ -35,9 +35,13 @@ extern "C" #pragma clang diagnostic pop // boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-local-typedef" #include #include #include +#pragma GCC diagnostic pop + // stl #include diff --git a/tests/cpp_tests/conversions_test.cpp b/tests/cpp_tests/conversions_test.cpp index a837dbf57..bb86f7138 100644 --- a/tests/cpp_tests/conversions_test.cpp +++ b/tests/cpp_tests/conversions_test.cpp @@ -290,7 +290,7 @@ int main(int argc, char** argv) values_container vc; mapnik::value val2(1); vc[val2] = 1; - BOOST_TEST_EQ( vc[1], 1 ); + BOOST_TEST_EQ( (int)vc[1], (int)1 ); } catch (std::exception const & ex) diff --git a/utils/nik2img/nik2img.cpp b/utils/nik2img/nik2img.cpp index b58a5994e..2d4acebc2 100644 --- a/utils/nik2img/nik2img.cpp +++ b/utils/nik2img/nik2img.cpp @@ -7,8 +7,15 @@ #include #include #include + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#include #include #include +#pragma GCC diagnostic pop + #include int main (int argc,char** argv) diff --git a/utils/shapeindex/shapeindex.cpp b/utils/shapeindex/shapeindex.cpp index d135b52d6..0161ea8cc 100644 --- a/utils/shapeindex/shapeindex.cpp +++ b/utils/shapeindex/shapeindex.cpp @@ -25,13 +25,18 @@ #include #include #include -#include -#include -#include #include "quadtree.hpp" #include "shapefile.hpp" #include "shape_io.hpp" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#include +#include +#include +#pragma GCC diagnostic pop + const int DEFAULT_DEPTH = 8; const double DEFAULT_RATIO=0.55; diff --git a/utils/svg2png/svg2png.cpp b/utils/svg2png/svg2png.cpp index 7fe3da601..796cd273b 100644 --- a/utils/svg2png/svg2png.cpp +++ b/utils/svg2png/svg2png.cpp @@ -35,8 +35,12 @@ #include #include +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" #include #include +#pragma GCC diagnostic pop #include "agg_rasterizer_scanline_aa.h" #include "agg_basics.h"