diff --git a/deps/agg/src/agg_pixfmt_rgba.cpp b/deps/agg/src/agg_pixfmt_rgba.cpp index 645ae55d2..58222272e 100644 --- a/deps/agg/src/agg_pixfmt_rgba.cpp +++ b/deps/agg/src/agg_pixfmt_rgba.cpp @@ -1,6 +1,7 @@ #include "agg_pixfmt_rgba.h" -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #if BOOST_VERSION >= 106900 @@ -13,7 +14,7 @@ #include #endif -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace agg { diff --git a/deps/boost/gil/extension/toolbox/hsl.hpp b/deps/boost/gil/extension/toolbox/hsl.hpp index 5715e7254..fd5ad57a6 100644 --- a/deps/boost/gil/extension/toolbox/hsl.hpp +++ b/deps/boost/gil/extension/toolbox/hsl.hpp @@ -14,7 +14,8 @@ /// \author Christian Henning \n //////////////////////////////////////////////////////////////////////////////////////// -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #if BOOST_VERSION >= 106900 #include @@ -22,7 +23,7 @@ #include #endif -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace boost { namespace gil { diff --git a/deps/boost/gil/extension/toolbox/hsv.hpp b/deps/boost/gil/extension/toolbox/hsv.hpp index 0d0a754d6..94850acb6 100644 --- a/deps/boost/gil/extension/toolbox/hsv.hpp +++ b/deps/boost/gil/extension/toolbox/hsv.hpp @@ -14,7 +14,8 @@ /// \author Christian Henning \n //////////////////////////////////////////////////////////////////////////////////////// -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #if BOOST_VERSION >= 106900 #include @@ -22,7 +23,7 @@ #include #endif -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace boost { namespace gil { diff --git a/include/mapnik/adaptive_smooth.hpp b/include/mapnik/adaptive_smooth.hpp index e2d5004ef..274f42891 100644 --- a/include/mapnik/adaptive_smooth.hpp +++ b/include/mapnik/adaptive_smooth.hpp @@ -3,10 +3,11 @@ #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_conv_smooth_poly1.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/include/mapnik/agg/render_polygon_pattern.hpp b/include/mapnik/agg/render_polygon_pattern.hpp index 412788006..ea4175c35 100644 --- a/include/mapnik/agg/render_polygon_pattern.hpp +++ b/include/mapnik/agg/render_polygon_pattern.hpp @@ -31,7 +31,8 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_basics.h" #include "agg_rendering_buffer.h" @@ -44,7 +45,7 @@ #include "agg_span_pattern_rgba.h" #include "agg_image_accessors.h" #include "agg_conv_clip_polygon.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/include/mapnik/agg_helpers.hpp b/include/mapnik/agg_helpers.hpp index 38ddb9334..adcc304f4 100644 --- a/include/mapnik/agg_helpers.hpp +++ b/include/mapnik/agg_helpers.hpp @@ -26,10 +26,11 @@ // mapnik #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_gamma_functions.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/include/mapnik/agg_pattern_source.hpp b/include/mapnik/agg_pattern_source.hpp index 0300f4787..9d6064fa2 100644 --- a/include/mapnik/agg_pattern_source.hpp +++ b/include/mapnik/agg_pattern_source.hpp @@ -27,10 +27,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_color_rgba.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/include/mapnik/agg_rasterizer.hpp b/include/mapnik/agg_rasterizer.hpp index 745d3a64f..0c0675838 100644 --- a/include/mapnik/agg_rasterizer.hpp +++ b/include/mapnik/agg_rasterizer.hpp @@ -27,10 +27,11 @@ #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_rasterizer_scanline_aa.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/include/mapnik/agg_render_marker.hpp b/include/mapnik/agg_render_marker.hpp index 6deed308c..efc99682a 100644 --- a/include/mapnik/agg_render_marker.hpp +++ b/include/mapnik/agg_render_marker.hpp @@ -33,7 +33,8 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_color_rgba.h" #include "agg_renderer_base.h" @@ -47,7 +48,7 @@ #include "agg_pixfmt_rgba.h" #include "agg_span_image_filter_rgba.h" #include "agg_span_interpolator_linear.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/include/mapnik/attribute_collector.hpp b/include/mapnik/attribute_collector.hpp index 593234a4c..4d6fa9edd 100644 --- a/include/mapnik/attribute_collector.hpp +++ b/include/mapnik/attribute_collector.hpp @@ -39,10 +39,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/include/mapnik/cairo/cairo_context.hpp b/include/mapnik/cairo/cairo_context.hpp index 1629ecc40..4460afb27 100644 --- a/include/mapnik/cairo/cairo_context.hpp +++ b/include/mapnik/cairo/cairo_context.hpp @@ -38,20 +38,22 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_basics.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/include/mapnik/color.hpp b/include/mapnik/color.hpp index ffdc0d325..a19d2c79a 100644 --- a/include/mapnik/color.hpp +++ b/include/mapnik/color.hpp @@ -27,10 +27,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/include/mapnik/coord.hpp b/include/mapnik/coord.hpp index 81deb5bf9..54d0a8020 100644 --- a/include/mapnik/coord.hpp +++ b/include/mapnik/coord.hpp @@ -23,10 +23,11 @@ #ifndef MAPNIK_COORD_HPP #define MAPNIK_COORD_HPP -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { template diff --git a/include/mapnik/css/css_color_grammar_x3.hpp b/include/mapnik/css/css_color_grammar_x3.hpp index 9e24fc55b..b6eb582a8 100644 --- a/include/mapnik/css/css_color_grammar_x3.hpp +++ b/include/mapnik/css/css_color_grammar_x3.hpp @@ -25,10 +25,11 @@ #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/include/mapnik/css/css_color_grammar_x3_def.hpp b/include/mapnik/css/css_color_grammar_x3_def.hpp index 173ae09cd..ffc26cc9c 100644 --- a/include/mapnik/css/css_color_grammar_x3_def.hpp +++ b/include/mapnik/css/css_color_grammar_x3_def.hpp @@ -29,12 +29,13 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP BOOST_FUSION_ADAPT_STRUCT ( mapnik::color, @@ -429,7 +430,8 @@ auto const css_color_def = hsla_color ; -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include BOOST_SPIRIT_DEFINE( css_color, @@ -440,7 +442,7 @@ BOOST_SPIRIT_DEFINE( rgb_color_percent, rgba_color_percent ); -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP } // ns } //ns mapnik diff --git a/include/mapnik/css/css_grammar_x3.hpp b/include/mapnik/css/css_grammar_x3.hpp index c7386839a..761ae9c58 100644 --- a/include/mapnik/css/css_grammar_x3.hpp +++ b/include/mapnik/css/css_grammar_x3.hpp @@ -25,10 +25,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/include/mapnik/css/css_grammar_x3_def.hpp b/include/mapnik/css/css_grammar_x3_def.hpp index 57d839b91..626bd3eec 100644 --- a/include/mapnik/css/css_grammar_x3_def.hpp +++ b/include/mapnik/css/css_grammar_x3_def.hpp @@ -27,10 +27,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP /* @@ -198,7 +199,8 @@ auto const css_skipper_def = space | "/*" >> *(char_ - "*/") >> "*/"; auto const css_classes_def = +lexeme[ident]; -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include BOOST_SPIRIT_DEFINE( ident, @@ -212,7 +214,7 @@ BOOST_SPIRIT_DEFINE( css_skipper ); -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP } //css_grammar } //mapnik diff --git a/include/mapnik/csv/csv_grammar_x3_def.hpp b/include/mapnik/csv/csv_grammar_x3_def.hpp index 63a3cf0ab..49abefa10 100644 --- a/include/mapnik/csv/csv_grammar_x3_def.hpp +++ b/include/mapnik/csv/csv_grammar_x3_def.hpp @@ -23,10 +23,11 @@ #ifndef MAPNIK_CSV_GRAMMAR_X3_DEF_HPP #define MAPNIK_CSV_GRAMMAR_X3_DEF_HPP -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { namespace grammar { diff --git a/include/mapnik/enumeration.hpp b/include/mapnik/enumeration.hpp index 38a1b2065..f72ec662f 100644 --- a/include/mapnik/enumeration.hpp +++ b/include/mapnik/enumeration.hpp @@ -32,6 +32,8 @@ #include #include +#include + namespace mapnik { class illegal_enum_value : public std::exception @@ -188,12 +190,13 @@ public: } for (unsigned i = 0; i < THE_MAX; ++i) { -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wunknown-pragmas" // clang+gcc -#pragma GCC diagnostic ignored "-Wpragmas" // gcc -#pragma GCC diagnostic ignored "-Wundefined-var-template" + +MAPNIK_DISABLE_WARNING_PUSH +MAPNIK_DISABLE_WARNING_UNKNOWN_PRAGMAS +MAPNIK_DISABLE_WARNING_PRAGMAS +MAPNIK_DISABLE_LONG_LONG if (str_copy == our_strings_[i]) -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP { value_ = static_cast(i); if (deprecated) @@ -203,24 +206,24 @@ public: return; } } -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wunknown-pragmas" // clang+gcc -#pragma GCC diagnostic ignored "-Wpragmas" // gcc -#pragma GCC diagnostic ignored "-Wundefined-var-template" +MAPNIK_DISABLE_WARNING_PUSH +MAPNIK_DISABLE_WARNING_UNKNOWN_PRAGMAS +MAPNIK_DISABLE_WARNING_PRAGMAS +MAPNIK_DISABLE_LONG_LONG throw illegal_enum_value(std::string("Illegal enumeration value '") + str + "' for enum " + our_name_); -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP } /** Returns the current value as a string identifier. */ std::string as_string() const { -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wunknown-pragmas" // clang+gcc -#pragma GCC diagnostic ignored "-Wpragmas" // gcc -#pragma GCC diagnostic ignored "-Wundefined-var-template" +MAPNIK_DISABLE_WARNING_PUSH +MAPNIK_DISABLE_WARNING_UNKNOWN_PRAGMAS +MAPNIK_DISABLE_WARNING_PRAGMAS +MAPNIK_DISABLE_LONG_LONG return our_strings_[value_]; -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP } /** Static helper function to iterate over valid identifiers. */ diff --git a/include/mapnik/expression_grammar_x3.hpp b/include/mapnik/expression_grammar_x3.hpp index 5bdd72ae3..1a8ee04c1 100644 --- a/include/mapnik/expression_grammar_x3.hpp +++ b/include/mapnik/expression_grammar_x3.hpp @@ -25,10 +25,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { namespace grammar { diff --git a/include/mapnik/expression_grammar_x3_def.hpp b/include/mapnik/expression_grammar_x3_def.hpp index 5b889b927..9479de821 100644 --- a/include/mapnik/expression_grammar_x3_def.hpp +++ b/include/mapnik/expression_grammar_x3_def.hpp @@ -29,13 +29,14 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP BOOST_FUSION_ADAPT_STRUCT(mapnik::unary_function_call, (mapnik::unary_function_impl, fun) diff --git a/include/mapnik/extend_converter.hpp b/include/mapnik/extend_converter.hpp index a96b2965f..841f73cd9 100644 --- a/include/mapnik/extend_converter.hpp +++ b/include/mapnik/extend_converter.hpp @@ -25,14 +25,15 @@ #include -#pragma GCC diagnostic push -#pragma clang diagnostic ignored "-Wunused-variable" +#include +MAPNIK_DISABLE_WARNING_PUSH +MAPNIK_DISABLE_UNUSED_VARIABLE #include #include #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/include/mapnik/feature_kv_iterator.hpp b/include/mapnik/feature_kv_iterator.hpp index d26ed3eae..4f89477d6 100644 --- a/include/mapnik/feature_kv_iterator.hpp +++ b/include/mapnik/feature_kv_iterator.hpp @@ -28,13 +28,14 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/include/mapnik/feature_type_style.hpp b/include/mapnik/feature_type_style.hpp index e98bfd23f..f0265e7db 100644 --- a/include/mapnik/feature_type_style.hpp +++ b/include/mapnik/feature_type_style.hpp @@ -29,10 +29,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/include/mapnik/geom_util.hpp b/include/mapnik/geom_util.hpp index bdae5b156..ca9a0eaac 100755 --- a/include/mapnik/geom_util.hpp +++ b/include/mapnik/geom_util.hpp @@ -36,10 +36,11 @@ #include // boost -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/include/mapnik/geometry/boost_adapters.hpp b/include/mapnik/geometry/boost_adapters.hpp index a0d8b9f8e..644447c2f 100644 --- a/include/mapnik/geometry/boost_adapters.hpp +++ b/include/mapnik/geometry/boost_adapters.hpp @@ -27,7 +27,8 @@ #include // undef B0 to workaround https://svn.boost.org/trac/boost/ticket/10467 -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #undef B0 #if BOOST_VERSION == 106400 @@ -37,7 +38,7 @@ #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // mapnik #include #include diff --git a/include/mapnik/geometry/box2d.hpp b/include/mapnik/geometry/box2d.hpp index 1894978c1..dc5fd4666 100644 --- a/include/mapnik/geometry/box2d.hpp +++ b/include/mapnik/geometry/box2d.hpp @@ -27,10 +27,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // agg // forward declare so that apps using mapnik do not need agg headers diff --git a/include/mapnik/geometry/box2d_impl.hpp b/include/mapnik/geometry/box2d_impl.hpp index 1b65058ae..9d84d6332 100644 --- a/include/mapnik/geometry/box2d_impl.hpp +++ b/include/mapnik/geometry/box2d_impl.hpp @@ -31,11 +31,12 @@ #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // agg #include "agg_trans_affine.h" diff --git a/include/mapnik/geometry/correct.hpp b/include/mapnik/geometry/correct.hpp index b94eb9fb3..a3312bc20 100644 --- a/include/mapnik/geometry/correct.hpp +++ b/include/mapnik/geometry/correct.hpp @@ -27,10 +27,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP #include diff --git a/include/mapnik/gradient.hpp b/include/mapnik/gradient.hpp index f7a095899..344937557 100644 --- a/include/mapnik/gradient.hpp +++ b/include/mapnik/gradient.hpp @@ -23,10 +23,11 @@ #ifndef MAPNIK_GRADIENT_HPP #define MAPNIK_GRADIENT_HPP -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // mapnik #include diff --git a/include/mapnik/grid/grid_pixfmt.hpp b/include/mapnik/grid/grid_pixfmt.hpp index ea4580ea5..4a60decb2 100644 --- a/include/mapnik/grid/grid_pixfmt.hpp +++ b/include/mapnik/grid/grid_pixfmt.hpp @@ -26,11 +26,12 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_basics.h" #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/include/mapnik/grid/grid_rasterizer.hpp b/include/mapnik/grid/grid_rasterizer.hpp index da0f0d943..2fc7264a0 100644 --- a/include/mapnik/grid/grid_rasterizer.hpp +++ b/include/mapnik/grid/grid_rasterizer.hpp @@ -25,10 +25,11 @@ #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_rasterizer_scanline_aa.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/include/mapnik/grid/grid_render_marker.hpp b/include/mapnik/grid/grid_render_marker.hpp index 3c2fb0ca1..b9e288eb7 100644 --- a/include/mapnik/grid/grid_render_marker.hpp +++ b/include/mapnik/grid/grid_render_marker.hpp @@ -26,7 +26,8 @@ // mapnik #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_renderer_scanline.h" #include "agg_scanline_bin.h" @@ -35,7 +36,7 @@ #include "agg_span_allocator.h" #include "agg_image_accessors.h" #include "agg_span_image_filter_gray.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/include/mapnik/grid/grid_renderer_base.hpp b/include/mapnik/grid/grid_renderer_base.hpp index 63b24d836..655b6303c 100644 --- a/include/mapnik/grid/grid_renderer_base.hpp +++ b/include/mapnik/grid/grid_renderer_base.hpp @@ -23,12 +23,13 @@ #ifndef MAPNIK_GRID_RENDERER_BASE_HPP #define MAPNIK_GRID_RENDERER_BASE_HPP -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include #include "agg_renderer_base.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/include/mapnik/grid/grid_rendering_buffer.hpp b/include/mapnik/grid/grid_rendering_buffer.hpp index c912b5bb0..7cbce7d25 100644 --- a/include/mapnik/grid/grid_rendering_buffer.hpp +++ b/include/mapnik/grid/grid_rendering_buffer.hpp @@ -25,10 +25,11 @@ #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_rendering_buffer.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/include/mapnik/image_compositing.hpp b/include/mapnik/image_compositing.hpp index da76829cf..65a03f1f4 100644 --- a/include/mapnik/image_compositing.hpp +++ b/include/mapnik/image_compositing.hpp @@ -26,10 +26,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/include/mapnik/image_filter.hpp b/include/mapnik/image_filter.hpp index 3777732ab..0e12508e1 100644 --- a/include/mapnik/image_filter.hpp +++ b/include/mapnik/image_filter.hpp @@ -28,16 +28,18 @@ #include #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #if BOOST_VERSION >= 106900 #include #else #include #endif -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_basics.h" #include "agg_rendering_buffer.h" @@ -46,7 +48,7 @@ #include "agg_scanline_u.h" #include "agg_blur.h" #include "agg_gradient_lut.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/include/mapnik/image_filter_grammar_x3.hpp b/include/mapnik/image_filter_grammar_x3.hpp index 25f386d00..2d0626212 100644 --- a/include/mapnik/image_filter_grammar_x3.hpp +++ b/include/mapnik/image_filter_grammar_x3.hpp @@ -25,10 +25,11 @@ #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/include/mapnik/image_filter_grammar_x3_def.hpp b/include/mapnik/image_filter_grammar_x3_def.hpp index e1c6f64ae..ca64ccb6a 100644 --- a/include/mapnik/image_filter_grammar_x3_def.hpp +++ b/include/mapnik/image_filter_grammar_x3_def.hpp @@ -28,13 +28,14 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include #include #include // spirit support -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP BOOST_FUSION_ADAPT_STRUCT( @@ -220,7 +221,8 @@ auto const colorize_alpha_filter_def = lit("colorize-alpha") auto const color_to_alpha_filter_def = lit("color-to-alpha") > lit('(') > -css_color > lit(')'); -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include BOOST_SPIRIT_DEFINE( @@ -245,7 +247,7 @@ BOOST_SPIRIT_DEFINE( offset, color_to_alpha_filter ); -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP } // image_filter } //ns mapnik diff --git a/include/mapnik/image_options.hpp b/include/mapnik/image_options.hpp index c8c59d32c..7c29ab708 100644 --- a/include/mapnik/image_options.hpp +++ b/include/mapnik/image_options.hpp @@ -26,10 +26,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/include/mapnik/image_reader.hpp b/include/mapnik/image_reader.hpp index 0a719188f..fe71159c0 100644 --- a/include/mapnik/image_reader.hpp +++ b/include/mapnik/image_reader.hpp @@ -30,10 +30,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/include/mapnik/image_scaling.hpp b/include/mapnik/image_scaling.hpp index 0a3fca81f..420d7477b 100644 --- a/include/mapnik/image_scaling.hpp +++ b/include/mapnik/image_scaling.hpp @@ -30,10 +30,11 @@ // stl #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik diff --git a/include/mapnik/image_scaling_traits.hpp b/include/mapnik/image_scaling_traits.hpp index 788bf8227..0b33a5c0e 100644 --- a/include/mapnik/image_scaling_traits.hpp +++ b/include/mapnik/image_scaling_traits.hpp @@ -28,7 +28,8 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_image_accessors.h" #include "agg_pixfmt_rgba.h" @@ -37,7 +38,7 @@ #include "agg_span_image_filter_gray.h" #include "agg_span_image_filter_rgba.h" #include "agg_span_interpolator_linear.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { namespace detail { diff --git a/include/mapnik/image_util.hpp b/include/mapnik/image_util.hpp index 5345b7830..31adae1d5 100644 --- a/include/mapnik/image_util.hpp +++ b/include/mapnik/image_util.hpp @@ -28,11 +28,12 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/include/mapnik/json/extract_bounding_boxes_x3_config.hpp b/include/mapnik/json/extract_bounding_boxes_x3_config.hpp index 40455423d..7300371fe 100644 --- a/include/mapnik/json/extract_bounding_boxes_x3_config.hpp +++ b/include/mapnik/json/extract_bounding_boxes_x3_config.hpp @@ -26,10 +26,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP //auto feature_collection_impl = x3::with(std::ref(bracket_counter)) // [x3::with(std::ref(keys)) diff --git a/include/mapnik/json/feature_grammar_x3.hpp b/include/mapnik/json/feature_grammar_x3.hpp index 2a7b6ac1c..1044e77de 100644 --- a/include/mapnik/json/feature_grammar_x3.hpp +++ b/include/mapnik/json/feature_grammar_x3.hpp @@ -25,10 +25,11 @@ #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { namespace json { namespace grammar { diff --git a/include/mapnik/json/feature_grammar_x3_def.hpp b/include/mapnik/json/feature_grammar_x3_def.hpp index b3e78e627..cb8ae9945 100644 --- a/include/mapnik/json/feature_grammar_x3_def.hpp +++ b/include/mapnik/json/feature_grammar_x3_def.hpp @@ -283,7 +283,8 @@ auto const feature_rule_def = lit('{') > feature_part % lit(',') > lit('}'); auto const geometry_rule_def = (lit('{') > geometry_tuple[create_geometry] > lit('}')) | lit("null"); -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include BOOST_SPIRIT_DEFINE( @@ -298,7 +299,7 @@ BOOST_SPIRIT_DEFINE( geometry_rule, geometry_collection ); -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP }}} diff --git a/include/mapnik/json/generic_json_grammar_x3.hpp b/include/mapnik/json/generic_json_grammar_x3.hpp index dec94a3bf..4cefba91a 100644 --- a/include/mapnik/json/generic_json_grammar_x3.hpp +++ b/include/mapnik/json/generic_json_grammar_x3.hpp @@ -24,10 +24,11 @@ #define MAPNIK_JSON_GENERIC_JSON_GRAMMAR_X3_HPP #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP #include diff --git a/include/mapnik/json/generic_json_grammar_x3_def.hpp b/include/mapnik/json/generic_json_grammar_x3_def.hpp index dff39273a..533074f29 100644 --- a/include/mapnik/json/generic_json_grammar_x3_def.hpp +++ b/include/mapnik/json/generic_json_grammar_x3_def.hpp @@ -103,7 +103,8 @@ auto const number_def = json_double[assign] | lit("null")[make_null] ; -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include BOOST_SPIRIT_DEFINE( @@ -114,7 +115,7 @@ BOOST_SPIRIT_DEFINE( number ); -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP }}} diff --git a/include/mapnik/json/geojson_grammar_x3.hpp b/include/mapnik/json/geojson_grammar_x3.hpp index 9a9ffaad8..3f44d1066 100644 --- a/include/mapnik/json/geojson_grammar_x3.hpp +++ b/include/mapnik/json/geojson_grammar_x3.hpp @@ -28,10 +28,11 @@ #include #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP #include diff --git a/include/mapnik/json/geojson_grammar_x3_def.hpp b/include/mapnik/json/geojson_grammar_x3_def.hpp index 57e0724f3..31e4d1b11 100644 --- a/include/mapnik/json/geojson_grammar_x3_def.hpp +++ b/include/mapnik/json/geojson_grammar_x3_def.hpp @@ -143,7 +143,8 @@ auto const number_def = geojson_double[assign] | lit("null")[make_null] ; -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include BOOST_SPIRIT_DEFINE( @@ -157,7 +158,7 @@ BOOST_SPIRIT_DEFINE( number ); -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP }}} diff --git a/include/mapnik/json/geometry_generator_grammar.hpp b/include/mapnik/json/geometry_generator_grammar.hpp index f4b62f958..764165b71 100644 --- a/include/mapnik/json/geometry_generator_grammar.hpp +++ b/include/mapnik/json/geometry_generator_grammar.hpp @@ -27,12 +27,13 @@ #include #include // boost -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include // for vc++ and android whose c++11 libs lack std::trunc #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { namespace json { diff --git a/include/mapnik/json/json_grammar_config.hpp b/include/mapnik/json/json_grammar_config.hpp index 82a21ff20..27711f382 100644 --- a/include/mapnik/json/json_grammar_config.hpp +++ b/include/mapnik/json/json_grammar_config.hpp @@ -25,14 +25,15 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP #include namespace mapnik { namespace json { diff --git a/include/mapnik/json/positions_grammar_x3.hpp b/include/mapnik/json/positions_grammar_x3.hpp index 8bdb09af7..2b218ab85 100644 --- a/include/mapnik/json/positions_grammar_x3.hpp +++ b/include/mapnik/json/positions_grammar_x3.hpp @@ -23,10 +23,11 @@ #ifndef MAPNIK_JSON_POSITIONS_GRAMMAR_X3_HPP #define MAPNIK_JSON_POSITIONS_GRAMMAR_X3_HPP -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // mapnik #include diff --git a/include/mapnik/json/properties_generator_grammar.hpp b/include/mapnik/json/properties_generator_grammar.hpp index 2788ee06a..cb4cac297 100644 --- a/include/mapnik/json/properties_generator_grammar.hpp +++ b/include/mapnik/json/properties_generator_grammar.hpp @@ -26,12 +26,13 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP #include #include diff --git a/include/mapnik/json/properties_generator_grammar_impl.hpp b/include/mapnik/json/properties_generator_grammar_impl.hpp index ca4ca4453..9e16aab94 100644 --- a/include/mapnik/json/properties_generator_grammar_impl.hpp +++ b/include/mapnik/json/properties_generator_grammar_impl.hpp @@ -23,11 +23,12 @@ #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { namespace json { diff --git a/include/mapnik/json/topojson_grammar_x3.hpp b/include/mapnik/json/topojson_grammar_x3.hpp index f11ea3112..0c5d112a0 100644 --- a/include/mapnik/json/topojson_grammar_x3.hpp +++ b/include/mapnik/json/topojson_grammar_x3.hpp @@ -26,10 +26,11 @@ // mapnik #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { namespace json { namespace grammar { diff --git a/include/mapnik/json/topojson_grammar_x3_def.hpp b/include/mapnik/json/topojson_grammar_x3_def.hpp index 8386a09b3..ed1ca3c2e 100644 --- a/include/mapnik/json/topojson_grammar_x3_def.hpp +++ b/include/mapnik/json/topojson_grammar_x3_def.hpp @@ -27,11 +27,12 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP BOOST_FUSION_ADAPT_STRUCT( mapnik::topojson::coordinate, diff --git a/include/mapnik/json/topology.hpp b/include/mapnik/json/topology.hpp index 3f8379b16..08894c2ca 100644 --- a/include/mapnik/json/topology.hpp +++ b/include/mapnik/json/topology.hpp @@ -26,10 +26,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP #include #include diff --git a/include/mapnik/json/unicode_string_grammar_x3.hpp b/include/mapnik/json/unicode_string_grammar_x3.hpp index d710432b2..2ee2fb1b0 100644 --- a/include/mapnik/json/unicode_string_grammar_x3.hpp +++ b/include/mapnik/json/unicode_string_grammar_x3.hpp @@ -23,10 +23,11 @@ #ifndef MAPNIK_JSON_UNICODE_STRING_GRAMMAR_X3_HPP #define MAPNIK_JSON_UNICODE_STRING_GRAMMAR_X3_HPP -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { namespace json { namespace grammar { diff --git a/include/mapnik/json/unicode_string_grammar_x3_def.hpp b/include/mapnik/json/unicode_string_grammar_x3_def.hpp index 216d3beda..f8fe1d548 100644 --- a/include/mapnik/json/unicode_string_grammar_x3_def.hpp +++ b/include/mapnik/json/unicode_string_grammar_x3_def.hpp @@ -134,7 +134,8 @@ static auto const escaped_def = lit('\\') > ; static auto const double_quoted_def = lit('"') > no_skip[*(escaped[append] | (~char_('"'))[append])] > lit('"'); -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include BOOST_SPIRIT_DEFINE( @@ -145,7 +146,7 @@ BOOST_SPIRIT_DEFINE( utf16_string ); -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP }}} diff --git a/include/mapnik/label_collision_detector.hpp b/include/mapnik/label_collision_detector.hpp index 0c6d5b796..f446a1342 100644 --- a/include/mapnik/label_collision_detector.hpp +++ b/include/mapnik/label_collision_detector.hpp @@ -28,10 +28,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/include/mapnik/map.hpp b/include/mapnik/map.hpp index e362b29be..f14127a65 100644 --- a/include/mapnik/map.hpp +++ b/include/mapnik/map.hpp @@ -34,10 +34,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/include/mapnik/mapped_memory_cache.hpp b/include/mapnik/mapped_memory_cache.hpp index 1395cc453..a53e6b773 100644 --- a/include/mapnik/mapped_memory_cache.hpp +++ b/include/mapnik/mapped_memory_cache.hpp @@ -32,10 +32,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace boost { namespace interprocess { class mapped_region; } } diff --git a/include/mapnik/marker_helpers.hpp b/include/mapnik/marker_helpers.hpp index d5dace3c7..127cfd554 100644 --- a/include/mapnik/marker_helpers.hpp +++ b/include/mapnik/marker_helpers.hpp @@ -38,10 +38,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_trans_affine.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/include/mapnik/markers_placements/basic.hpp b/include/mapnik/markers_placements/basic.hpp index 3bc8c27ba..106ccb446 100644 --- a/include/mapnik/markers_placements/basic.hpp +++ b/include/mapnik/markers_placements/basic.hpp @@ -29,11 +29,12 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_basics.h" #include "agg_trans_affine.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/include/mapnik/palette.hpp b/include/mapnik/palette.hpp index bf7a19ec7..3a09c570f 100644 --- a/include/mapnik/palette.hpp +++ b/include/mapnik/palette.hpp @@ -30,7 +30,8 @@ #define USE_DENSE_HASH_MAP -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #ifdef USE_DENSE_HASH_MAP #include @@ -39,7 +40,7 @@ using rgba_hash_table = google::dense_hash_map; #include using rgba_hash_table = std::unordered_map; #endif -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/include/mapnik/params.hpp b/include/mapnik/params.hpp index e5ff47815..36487bab8 100644 --- a/include/mapnik/params.hpp +++ b/include/mapnik/params.hpp @@ -28,10 +28,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/include/mapnik/params_impl.hpp b/include/mapnik/params_impl.hpp index 53bfdfb9c..a0c78eff7 100644 --- a/include/mapnik/params_impl.hpp +++ b/include/mapnik/params_impl.hpp @@ -29,11 +29,12 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/include/mapnik/path_expression_grammar_x3.hpp b/include/mapnik/path_expression_grammar_x3.hpp index aa41564fa..b6e6b7c6d 100644 --- a/include/mapnik/path_expression_grammar_x3.hpp +++ b/include/mapnik/path_expression_grammar_x3.hpp @@ -26,10 +26,11 @@ // mapnik #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { namespace grammar { diff --git a/include/mapnik/png_io.hpp b/include/mapnik/png_io.hpp index 2e96c8271..d27d58a2c 100644 --- a/include/mapnik/png_io.hpp +++ b/include/mapnik/png_io.hpp @@ -29,7 +29,8 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include // zlib @@ -40,7 +41,7 @@ extern "C" #include } #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP #define MAX_OCTREE_LEVELS 4 diff --git a/include/mapnik/proj_strategy.hpp b/include/mapnik/proj_strategy.hpp index 4664868da..2de95bc74 100644 --- a/include/mapnik/proj_strategy.hpp +++ b/include/mapnik/proj_strategy.hpp @@ -28,12 +28,13 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/include/mapnik/projection.hpp b/include/mapnik/projection.hpp index a5b2f69b1..38e4b4672 100644 --- a/include/mapnik/projection.hpp +++ b/include/mapnik/projection.hpp @@ -27,10 +27,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/include/mapnik/ptree_helpers.hpp b/include/mapnik/ptree_helpers.hpp index 50feb51aa..4d3e2907a 100644 --- a/include/mapnik/ptree_helpers.hpp +++ b/include/mapnik/ptree_helpers.hpp @@ -26,10 +26,11 @@ // stl #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/include/mapnik/raster.hpp b/include/mapnik/raster.hpp index 26d952431..fb2544386 100644 --- a/include/mapnik/raster.hpp +++ b/include/mapnik/raster.hpp @@ -29,10 +29,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/include/mapnik/raster_colorizer.hpp b/include/mapnik/raster_colorizer.hpp index debe9c2bf..ebda129eb 100644 --- a/include/mapnik/raster_colorizer.hpp +++ b/include/mapnik/raster_colorizer.hpp @@ -42,10 +42,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP #include #include diff --git a/include/mapnik/renderer_common/process_building_symbolizer.hpp b/include/mapnik/renderer_common/process_building_symbolizer.hpp index 589107dcf..86563f994 100644 --- a/include/mapnik/renderer_common/process_building_symbolizer.hpp +++ b/include/mapnik/renderer_common/process_building_symbolizer.hpp @@ -28,10 +28,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_conv_transform.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/include/mapnik/renderer_common/process_raster_symbolizer.hpp b/include/mapnik/renderer_common/process_raster_symbolizer.hpp index ce8a2b1f5..0eec9ff77 100644 --- a/include/mapnik/renderer_common/process_raster_symbolizer.hpp +++ b/include/mapnik/renderer_common/process_raster_symbolizer.hpp @@ -32,7 +32,8 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_rendering_buffer.h" #include "agg_pixfmt_rgba.h" @@ -40,7 +41,7 @@ #include "agg_rasterizer_scanline_aa.h" #include "agg_scanline_u.h" #include "agg_renderer_scanline.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/include/mapnik/simplify.hpp b/include/mapnik/simplify.hpp index dd75fcf2d..57e77eb5b 100644 --- a/include/mapnik/simplify.hpp +++ b/include/mapnik/simplify.hpp @@ -7,10 +7,11 @@ // stl #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/include/mapnik/span_image_filter.hpp b/include/mapnik/span_image_filter.hpp index b9b83b208..ab4ac374d 100644 --- a/include/mapnik/span_image_filter.hpp +++ b/include/mapnik/span_image_filter.hpp @@ -25,16 +25,18 @@ #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_span_image_filter_gray.h" #include "agg_span_image_filter_rgba.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP #include diff --git a/include/mapnik/sql_utils.hpp b/include/mapnik/sql_utils.hpp index b8fb9cade..25bf9d28d 100644 --- a/include/mapnik/sql_utils.hpp +++ b/include/mapnik/sql_utils.hpp @@ -27,10 +27,11 @@ #include // for trim // boost -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/include/mapnik/svg/geometry_svg_generator.hpp b/include/mapnik/svg/geometry_svg_generator.hpp index 7ab983af4..dc308c308 100644 --- a/include/mapnik/svg/geometry_svg_generator.hpp +++ b/include/mapnik/svg/geometry_svg_generator.hpp @@ -33,14 +33,15 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP #include diff --git a/include/mapnik/svg/output/svg_output_grammars.hpp b/include/mapnik/svg/output/svg_output_grammars.hpp index da4dda013..fc92d273f 100644 --- a/include/mapnik/svg/output/svg_output_grammars.hpp +++ b/include/mapnik/svg/output/svg_output_grammars.hpp @@ -36,11 +36,12 @@ namespace mapnik { namespace svg { struct root_output_attributes; }} -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { namespace svg { diff --git a/include/mapnik/svg/output/svg_output_grammars_impl.hpp b/include/mapnik/svg/output/svg_output_grammars_impl.hpp index fb04c80e1..386688105 100644 --- a/include/mapnik/svg/output/svg_output_grammars_impl.hpp +++ b/include/mapnik/svg/output/svg_output_grammars_impl.hpp @@ -26,12 +26,13 @@ // mapnik #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP /*! * mapnik::svg::path_output_attributes is adapted as a fusion sequence diff --git a/include/mapnik/svg/svg_converter.hpp b/include/mapnik/svg/svg_converter.hpp index 2eaeb676c..352ad5702 100644 --- a/include/mapnik/svg/svg_converter.hpp +++ b/include/mapnik/svg/svg_converter.hpp @@ -29,7 +29,8 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_path_storage.h" #include "agg_conv_transform.h" @@ -38,7 +39,7 @@ #include "agg_conv_curve.h" #include "agg_color_rgba.h" #include "agg_bounding_rect.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/include/mapnik/svg/svg_grammar_config_x3.hpp b/include/mapnik/svg/svg_grammar_config_x3.hpp index c89388c1f..a2717f747 100644 --- a/include/mapnik/svg/svg_grammar_config_x3.hpp +++ b/include/mapnik/svg/svg_grammar_config_x3.hpp @@ -25,10 +25,11 @@ #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { namespace svg { namespace grammar { diff --git a/include/mapnik/svg/svg_path_adapter.hpp b/include/mapnik/svg/svg_path_adapter.hpp index d3df61b04..0c06bf157 100644 --- a/include/mapnik/svg/svg_path_adapter.hpp +++ b/include/mapnik/svg/svg_path_adapter.hpp @@ -28,12 +28,13 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_math.h" #include "agg_array.h" #include "agg_bezier_arc.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/include/mapnik/svg/svg_path_attributes.hpp b/include/mapnik/svg/svg_path_attributes.hpp index cc521d8c2..d2ff42284 100644 --- a/include/mapnik/svg/svg_path_attributes.hpp +++ b/include/mapnik/svg/svg_path_attributes.hpp @@ -27,12 +27,13 @@ #include #include // dash_array -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_math_stroke.h" #include "agg_color_rgba.h" #include "agg_trans_affine.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { namespace svg { diff --git a/include/mapnik/svg/svg_path_commands.hpp b/include/mapnik/svg/svg_path_commands.hpp index e232d27ce..5fa43eab0 100644 --- a/include/mapnik/svg/svg_path_commands.hpp +++ b/include/mapnik/svg/svg_path_commands.hpp @@ -27,10 +27,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { namespace svg { diff --git a/include/mapnik/svg/svg_path_grammar_x3_def.hpp b/include/mapnik/svg/svg_path_grammar_x3_def.hpp index b4dc73d23..0f4472277 100644 --- a/include/mapnik/svg/svg_path_grammar_x3_def.hpp +++ b/include/mapnik/svg/svg_path_grammar_x3_def.hpp @@ -28,10 +28,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { namespace svg { namespace grammar { @@ -191,13 +192,14 @@ auto const cmd = x3::rule {} = M > *drawto_cmd ; auto const svg_path_def = +cmd; -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include BOOST_SPIRIT_DEFINE( svg_path, svg_points ); -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP }}} diff --git a/include/mapnik/svg/svg_renderer_agg.hpp b/include/mapnik/svg/svg_renderer_agg.hpp index 2d4b6b036..c7919dd41 100644 --- a/include/mapnik/svg/svg_renderer_agg.hpp +++ b/include/mapnik/svg/svg_renderer_agg.hpp @@ -31,13 +31,15 @@ #include #if defined(GRID_RENDERER) -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP #endif -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_path_storage.h" #include "agg_conv_transform.h" @@ -58,7 +60,7 @@ #include "agg_gradient_lut.h" #include "agg_gamma_lut.h" #include "agg_span_interpolator_linear.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { namespace svg { diff --git a/include/mapnik/svg/svg_transform_grammar_x3_def.hpp b/include/mapnik/svg/svg_transform_grammar_x3_def.hpp index 5d34a8b44..d9adfd627 100644 --- a/include/mapnik/svg/svg_transform_grammar_x3_def.hpp +++ b/include/mapnik/svg/svg_transform_grammar_x3_def.hpp @@ -27,15 +27,17 @@ #include // boost::fusion -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // agg -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { namespace svg { namespace grammar { @@ -148,12 +150,13 @@ auto const transform = x3::rule {} = matrix | rotate | tran auto const svg_transform_def = +transform ; -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include BOOST_SPIRIT_DEFINE( svg_transform ); -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP }}} diff --git a/include/mapnik/symbolizer.hpp b/include/mapnik/symbolizer.hpp index 68e516146..349ef1875 100644 --- a/include/mapnik/symbolizer.hpp +++ b/include/mapnik/symbolizer.hpp @@ -51,10 +51,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/include/mapnik/text/color_font_renderer.hpp b/include/mapnik/text/color_font_renderer.hpp index 3495d1945..5a1eb200b 100644 --- a/include/mapnik/text/color_font_renderer.hpp +++ b/include/mapnik/text/color_font_renderer.hpp @@ -23,13 +23,15 @@ #ifndef MAPNIK_COLOR_FONT_RENDERER_HPP #define MAPNIK_COLOR_FONT_RENDERER_HPP -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // freetype2 extern "C" @@ -39,7 +41,7 @@ extern "C" #include FT_STROKER_H } -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP #include #include diff --git a/include/mapnik/text/face.hpp b/include/mapnik/text/face.hpp index bac78a6f4..5c66b820a 100644 --- a/include/mapnik/text/face.hpp +++ b/include/mapnik/text/face.hpp @@ -27,7 +27,8 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include extern "C" @@ -37,7 +38,7 @@ extern "C" #include FT_STROKER_H } -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP //stl #include diff --git a/include/mapnik/text/font_feature_settings.hpp b/include/mapnik/text/font_feature_settings.hpp index cfab87db0..a2e73eaad 100644 --- a/include/mapnik/text/font_feature_settings.hpp +++ b/include/mapnik/text/font_feature_settings.hpp @@ -32,10 +32,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // EqualityComparable inline bool operator==(hb_feature_t const& lhs, hb_feature_t const& rhs) @@ -89,10 +90,11 @@ inline bool operator==(font_feature_settings const& lhs, font_feature_settings c constexpr unsigned int font_feature_range_global_start = 0u; static const unsigned int font_feature_range_global_end = std::numeric_limits::max(); -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include constexpr hb_feature_t font_feature_liga_off = { HB_TAG('l', 'i', 'g', 'a'), 0, font_feature_range_global_start, font_feature_range_global_end }; -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP } // mapnik namespace diff --git a/include/mapnik/text/formatting/layout.hpp b/include/mapnik/text/formatting/layout.hpp index f68432c45..86c85e3f6 100644 --- a/include/mapnik/text/formatting/layout.hpp +++ b/include/mapnik/text/formatting/layout.hpp @@ -26,10 +26,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { namespace formatting { diff --git a/include/mapnik/text/glyph_positions.hpp b/include/mapnik/text/glyph_positions.hpp index 457d65f32..e4cc06921 100644 --- a/include/mapnik/text/glyph_positions.hpp +++ b/include/mapnik/text/glyph_positions.hpp @@ -30,10 +30,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_trans_affine.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP //stl #include diff --git a/include/mapnik/text/harfbuzz_shaper.hpp b/include/mapnik/text/harfbuzz_shaper.hpp index d60e8b7d8..5c965b74f 100644 --- a/include/mapnik/text/harfbuzz_shaper.hpp +++ b/include/mapnik/text/harfbuzz_shaper.hpp @@ -36,13 +36,14 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { namespace detail { diff --git a/include/mapnik/text/icu_shaper.hpp b/include/mapnik/text/icu_shaper.hpp index 89a6460d7..57a2495c6 100644 --- a/include/mapnik/text/icu_shaper.hpp +++ b/include/mapnik/text/icu_shaper.hpp @@ -36,12 +36,13 @@ // stl #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/include/mapnik/text/itemizer.hpp b/include/mapnik/text/itemizer.hpp index 515ee1f59..9d051a80f 100644 --- a/include/mapnik/text/itemizer.hpp +++ b/include/mapnik/text/itemizer.hpp @@ -34,12 +34,13 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/include/mapnik/text/properties_util.hpp b/include/mapnik/text/properties_util.hpp index 9628a1efe..c3893a780 100644 --- a/include/mapnik/text/properties_util.hpp +++ b/include/mapnik/text/properties_util.hpp @@ -29,11 +29,12 @@ #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { namespace detail { diff --git a/include/mapnik/text/renderer.hpp b/include/mapnik/text/renderer.hpp index 9a81de6e4..9d5df502f 100644 --- a/include/mapnik/text/renderer.hpp +++ b/include/mapnik/text/renderer.hpp @@ -31,14 +31,16 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_pixfmt_rgba.h" #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // freetype2 extern "C" @@ -48,7 +50,7 @@ extern "C" #include FT_STROKER_H } -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/include/mapnik/text/scrptrun.hpp b/include/mapnik/text/scrptrun.hpp index 2e687c1da..59b6e2765 100644 --- a/include/mapnik/text/scrptrun.hpp +++ b/include/mapnik/text/scrptrun.hpp @@ -18,12 +18,13 @@ #define __SCRPTRUN_H #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP #include struct ScriptRecord diff --git a/include/mapnik/text/text_properties.hpp b/include/mapnik/text/text_properties.hpp index 74d5fdcb6..c72e34dd0 100644 --- a/include/mapnik/text/text_properties.hpp +++ b/include/mapnik/text/text_properties.hpp @@ -36,11 +36,12 @@ // stl #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/include/mapnik/tiff_io.hpp b/include/mapnik/tiff_io.hpp index 9dab8e2b4..271f3d45f 100644 --- a/include/mapnik/tiff_io.hpp +++ b/include/mapnik/tiff_io.hpp @@ -28,7 +28,8 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include extern "C" @@ -38,7 +39,7 @@ extern "C" #define RealTIFFClose TIFFClose } -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP //std diff --git a/include/mapnik/transform/transform_expression.hpp b/include/mapnik/transform/transform_expression.hpp index 18c5ac092..5e55f6250 100644 --- a/include/mapnik/transform/transform_expression.hpp +++ b/include/mapnik/transform/transform_expression.hpp @@ -31,12 +31,13 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/include/mapnik/transform/transform_expression_grammar_x3.hpp b/include/mapnik/transform/transform_expression_grammar_x3.hpp index 3feb2a256..ff4264264 100644 --- a/include/mapnik/transform/transform_expression_grammar_x3.hpp +++ b/include/mapnik/transform/transform_expression_grammar_x3.hpp @@ -25,10 +25,11 @@ #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/include/mapnik/transform/transform_expression_grammar_x3_def.hpp b/include/mapnik/transform/transform_expression_grammar_x3_def.hpp index d31d34853..b6cb4a2a5 100644 --- a/include/mapnik/transform/transform_expression_grammar_x3_def.hpp +++ b/include/mapnik/transform/transform_expression_grammar_x3_def.hpp @@ -27,11 +27,12 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // skewX BOOST_FUSION_ADAPT_STRUCT(mapnik::skewX_node, diff --git a/include/mapnik/transform/transform_processor.hpp b/include/mapnik/transform/transform_processor.hpp index 164e490dc..aaef97f61 100644 --- a/include/mapnik/transform/transform_processor.hpp +++ b/include/mapnik/transform/transform_processor.hpp @@ -31,10 +31,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/include/mapnik/unicode.hpp b/include/mapnik/unicode.hpp index 798bfcb4e..5d20f2b98 100644 --- a/include/mapnik/unicode.hpp +++ b/include/mapnik/unicode.hpp @@ -33,10 +33,11 @@ #include // icu #if (U_ICU_VERSION_MAJOR_NUM >= 59) -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP #endif struct UConverter; diff --git a/include/mapnik/util/const_rendering_buffer.hpp b/include/mapnik/util/const_rendering_buffer.hpp index a456eafb9..1a63e63ee 100644 --- a/include/mapnik/util/const_rendering_buffer.hpp +++ b/include/mapnik/util/const_rendering_buffer.hpp @@ -25,10 +25,11 @@ #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_basics.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP #include diff --git a/include/mapnik/util/container_adapter.hpp b/include/mapnik/util/container_adapter.hpp index cd3b1c084..e8330f603 100644 --- a/include/mapnik/util/container_adapter.hpp +++ b/include/mapnik/util/container_adapter.hpp @@ -26,10 +26,11 @@ // mapnik #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace boost { namespace spirit { namespace traits { diff --git a/include/mapnik/util/geometry_to_ds_type.hpp b/include/mapnik/util/geometry_to_ds_type.hpp index 95793d35c..c58ec0110 100644 --- a/include/mapnik/util/geometry_to_ds_type.hpp +++ b/include/mapnik/util/geometry_to_ds_type.hpp @@ -29,12 +29,13 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { namespace util { diff --git a/include/mapnik/util/path_iterator.hpp b/include/mapnik/util/path_iterator.hpp index d6e6a2cf8..f6f9cc527 100644 --- a/include/mapnik/util/path_iterator.hpp +++ b/include/mapnik/util/path_iterator.hpp @@ -27,10 +27,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/include/mapnik/value.hpp b/include/mapnik/value.hpp index ac032b097..4734d8e35 100644 --- a/include/mapnik/value.hpp +++ b/include/mapnik/value.hpp @@ -28,7 +28,7 @@ #include #include #include - +#include namespace mapnik { @@ -138,9 +138,10 @@ struct is_null_visitor namespace std { -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wpragmas" -#pragma GCC diagnostic ignored "-Wmismatched-tags" + +MAPNIK_DISABLE_WARNING_PUSH +MAPNIK_DISABLE_WARNING_PRAGMAS +MAPNIK_DISABLE_MISMATCHED_TAGS template <> struct hash @@ -151,7 +152,7 @@ struct hash } }; -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP } diff --git a/include/mapnik/value/hash.hpp b/include/mapnik/value/hash.hpp index 0dbac1b7b..b94e85db4 100644 --- a/include/mapnik/value/hash.hpp +++ b/include/mapnik/value/hash.hpp @@ -29,11 +29,12 @@ // stl #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/include/mapnik/value/types.hpp b/include/mapnik/value/types.hpp index cc874805d..f0ce306b1 100644 --- a/include/mapnik/value/types.hpp +++ b/include/mapnik/value/types.hpp @@ -29,10 +29,11 @@ #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include // for U_NAMESPACE_QUALIFIER -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/include/mapnik/vertex_cache.hpp b/include/mapnik/vertex_cache.hpp index 41c9609f7..a9f96c477 100644 --- a/include/mapnik/vertex_cache.hpp +++ b/include/mapnik/vertex_cache.hpp @@ -28,10 +28,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_basics.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/include/mapnik/vertex_converters.hpp b/include/mapnik/vertex_converters.hpp index c0b2b03c2..3b83157cf 100644 --- a/include/mapnik/vertex_converters.hpp +++ b/include/mapnik/vertex_converters.hpp @@ -39,7 +39,8 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_math_stroke.h" #include "agg_trans_affine.h" @@ -49,7 +50,7 @@ #include "agg_conv_stroke.h" #include "agg_conv_dash.h" #include "agg_conv_transform.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/include/mapnik/warning.hpp b/include/mapnik/warning.hpp new file mode 100644 index 000000000..1bd941b8d --- /dev/null +++ b/include/mapnik/warning.hpp @@ -0,0 +1,135 @@ +#ifndef MAPNIK_WARNING_HPP +#define MAPNIK_WARNING_HPP + +#if defined(_MSC_VER) + #define MAPNIK_DISABLE_WARNING_PUSH __pragma(warning( push )) + #define MAPNIK_DISABLE_WARNING_POP __pragma(warning( pop )) + #define MAPNIK_DISABLE_WARNING(warningNumber) __pragma(warning( disable : warningNumber )) + + // add warnings to deactivate here + // example: #define DISABLE_WARNING_UNREFERENCED_FORMAL_PARAMETER DISABLE_WARNING(4100) + #define MAPNIK_DISABLE_WARNING_UNKNOWN_PRAGMAS MAPNIK_DISABLE_WARNING(4068) + #define MAPNIK_DISABLE_WARNING_PRAGMAS //MAPNIK_DISABLE_WARNING(??) + #define MAPNIK_DISABLE_WARNING_PRAGMA_MESSAGES //MAPNIK_DISABLE_WARNING(??) + #define MAPNIK_DISABLE_WARNING_UNSEQUENCED //MAPNIK_DISABLE_WARNING(??) + #define MAPNIK_DISABLE_WARNING_UNUSED_FUNCTION //MAPNIK_DISABLE_WARNING(??) + #define MAPNIK_DISABLE_WARNING_UNUSED_PARAMETER //MAPNIK_DISABLE_WARNING(??) + #define MAPNIK_DISABLE_WARNING_REDECLARED_CLASS_MEMBER //MAPNIK_DISABLE_WARNING(??) + #define MAPNIK_DISABLE_WARNING_UNUSED_LOCAL_TYPEDEF //MAPNIK_DISABLE_WARNING(??) + #define MAPNIK_DISABLE_WARNING_UNUSED_LOCAL_TYPEDEFS //MAPNIK_DISABLE_WARNING(??) + #define MAPNIK_DISABLE_WARNING_SHADOW //MAPNIK_DISABLE_WARNING(??) + #define MAPNIK_DISABLE_WARNING_CPP11_NARROWING //MAPNIK_DISABLE_WARNING(??) + #define MAPNIK_DISABLE_WARNING_SIGN_CONVERSION //MAPNIK_DISABLE_WARNING(??) + #define MAPNIK_DISABLE_WARNING_SIGN_COMPARE //MAPNIK_DISABLE_WARNING(??) + #define MAPNIK_DISABLE_WARNING_CONVERSION //MAPNIK_DISABLE_WARNING(??) + #define MAPNIK_DISABLE_WARNING_CPP_98_COMPAT_PEDANTIC //MAPNIK_DISABLE_WARNING(??) + #define MAPNIK_DISABLE_WARNING_DISABLE_MACRO_EXPANSION //MAPNIK_DISABLE_WARNING(??) + #define MAPNIK_DISABLE_WARNING_OLD_STYLE_CAST //MAPNIK_DISABLE_WARNING(??) + #define MAPNIK_DISABLE_WARNING_DOCUMENTATION //MAPNIK_DISABLE_WARNING(??) + #define MAPNIK_DISABLE_WARNING_DOCUMENTATION_UNKNOWN_COMMAND //MAPNIK_DISABLE_WARNING(??) + #define MAPNIK_DISABLE_WARNING_UNDEF //MAPNIK_DISABLE_WARNING(??) + #define MAPNIK_DISABLE_WARNING_DEPRECATED //MAPNIK_DISABLE_WARNING(??) + #define MAPNIK_DISABLE_WARNING_PADDED //MAPNIK_DISABLE_WARNING(??) + #define MAPNIK_DISABLE_WARNING_CPP_98_COMPAT //MAPNIK_DISABLE_WARNING(??) + #define MAPNIK_DISABLE_WARNING_RESERVED_ID_MACRO //MAPNIK_DISABLE_WARNING(??) + #define MAPNIK_DISABLE_WARNING_WEAK_VTABLE //MAPNIK_DISABLE_WARNING(??) + #define MAPNIK_DISABLE_WARNING_EXTRA_SEMI //MAPNIK_DISABLE_WARNING(??) + #define MAPNIK_DISABLE_WARNING_GLOBAL_CONSTRUCTORS //MAPNIK_DISABLE_WARNING(??) + #define MAPNIK_DISABLE_WARNING_HEADER_HYGIENE //MAPNIK_DISABLE_WARNING(??) + #define MAPNIK_DISABLE_WARNING_EXIT_TIME_DESTRUCTORS //MAPNIK_DISABLE_WARNING(??) + #define MAPNIK_DISABLE_WARNING_SWITCH_ENUM //MAPNIK_DISABLE_WARNING(??) + #define MAPNIK_DISABLE_WARNING_MISSING_NORETURN //MAPNIK_DISABLE_WARNING(??) + #define MAPNIK_DISABLE_WARNING_COVERED_SWITCH_DEFAULT //MAPNIK_DISABLE_WARNING(??) + #define MAPNIK_DISABLE_WARNING_FLOAT_EQUAL //MAPNIK_DISABLE_WARNING(??) + #define MAPNIK_DISABLE_LONG_LONG //MAPNIK_DISABLE_WARNING(??) + #define MAPNIK_DISABLE_UNDEFINED_VAR_TEMPLATE //MAPNIK_DISABLE_WARNING(??) + #define MAPNIK_DISABLE_UNUSED_VARIABLE MAPNIK_DISABLE_WARNING(C4101) + #define MAPNIK_DISABLE_MISMATCHED_TAGS //MAPNIK_DISABLE_WARNING(??) + +#elif defined(__GNUC__) || defined(__clang__) + #define MAPNIK_DO_PRAGMA(X) _Pragma(#X) + #define MAPNIK_DISABLE_WARNING_PUSH MAPNIK_DO_PRAGMA(GCC diagnostic push) + #define MAPNIK_DISABLE_WARNING_POP MAPNIK_DO_PRAGMA(GCC diagnostic pop) + #define MAPNIK_DISABLE_WARNING(warningName) MAPNIK_DO_PRAGMA(GCC diagnostic ignored #warningName) + // add warnings to deactivate here + // example: #define DISABLE_WARNING_UNREFERENCED_FORMAL_PARAMETER DISABLE_WARNING(-Wunused-parameter) + #define MAPNIK_DISABLE_WARNING_UNKNOWN_PRAGMAS MAPNIK_DISABLE_WARNING(-Wunknown-pragmas) + #define MAPNIK_DISABLE_WARNING_PRAGMAS MAPNIK_DISABLE_WARNING(-Wpragmas) + #define MAPNIK_DISABLE_WARNING_PRAGMA_MESSAGES MAPNIK_DISABLE_WARNING(-W#pragma-messages) + #define MAPNIK_DISABLE_WARNING_UNSEQUENCED MAPNIK_DISABLE_WARNING(-Wunsequenced) + #define MAPNIK_DISABLE_WARNING_UNUSED_FUNCTION MAPNIK_DISABLE_WARNING(-Wunused-function) + #define MAPNIK_DISABLE_WARNING_UNUSED_PARAMETER MAPNIK_DISABLE_WARNING(-Wunused-parameter) + #define MAPNIK_DISABLE_WARNING_REDECLARED_CLASS_MEMBER MAPNIK_DISABLE_WARNING(-Wredeclared-class-member) + #define MAPNIK_DISABLE_WARNING_UNUSED_LOCAL_TYPEDEF MAPNIK_DISABLE_WARNING(-Wunused-local-typedef) + #define MAPNIK_DISABLE_WARNING_UNUSED_LOCAL_TYPEDEFS MAPNIK_DISABLE_WARNING(-Wunused-local-typedefs) + #define MAPNIK_DISABLE_WARNING_SHADOW MAPNIK_DISABLE_WARNING(-Wshadow) + #define MAPNIK_DISABLE_WARNING_CPP11_NARROWING MAPNIK_DISABLE_WARNING(-Wc++11-narrowing) + #define MAPNIK_DISABLE_WARNING_SIGN_CONVERSION MAPNIK_DISABLE_WARNING(-Wsign-conversion) + #define MAPNIK_DISABLE_WARNING_SIGN_COMPARE MAPNIK_DISABLE_WARNING(-Wsign-compare) + #define MAPNIK_DISABLE_WARNING_CONVERSION MAPNIK_DISABLE_WARNING(-Wconversion) + #define MAPNIK_DISABLE_WARNING_CPP_98_COMPAT_PEDANTIC MAPNIK_DISABLE_WARNING(-Wc++98-compat-pedantic) + #define MAPNIK_DISABLE_WARNING_DISABLE_MACRO_EXPANSION MAPNIK_DISABLE_WARNING(-Wdisabled-macro-expansion) + #define MAPNIK_DISABLE_WARNING_OLD_STYLE_CAST MAPNIK_DISABLE_WARNING(-Wold-style-cast) + #define MAPNIK_DISABLE_WARNING_DOCUMENTATION MAPNIK_DISABLE_WARNING(-Wdocumentation) + #define MAPNIK_DISABLE_WARNING_DOCUMENTATION_UNKNOWN_COMMAND MAPNIK_DISABLE_WARNING(-Wdocumentation-unknown-command) + #define MAPNIK_DISABLE_WARNING_UNDEF MAPNIK_DISABLE_WARNING(-Wundef) + #define MAPNIK_DISABLE_WARNING_DEPRECATED MAPNIK_DISABLE_WARNING(-Wdeprecated) + #define MAPNIK_DISABLE_WARNING_PADDED MAPNIK_DISABLE_WARNING(-Wpadded) + #define MAPNIK_DISABLE_WARNING_CPP_98_COMPAT MAPNIK_DISABLE_WARNING(-Wc++98-compat) + #define MAPNIK_DISABLE_WARNING_RESERVED_ID_MACRO MAPNIK_DISABLE_WARNING(-Wreserved-id-macro) + #define MAPNIK_DISABLE_WARNING_WEAK_VTABLE MAPNIK_DISABLE_WARNING(-Wweak-vtables) + #define MAPNIK_DISABLE_WARNING_EXTRA_SEMI MAPNIK_DISABLE_WARNING(-Wextra-semi) + #define MAPNIK_DISABLE_WARNING_GLOBAL_CONSTRUCTORS MAPNIK_DISABLE_WARNING(-Wglobal-constructors) + #define MAPNIK_DISABLE_WARNING_HEADER_HYGIENE MAPNIK_DISABLE_WARNING(-Wheader-hygiene) + #define MAPNIK_DISABLE_WARNING_EXIT_TIME_DESTRUCTORS MAPNIK_DISABLE_WARNING(-Wexit-time-destructors) + #define MAPNIK_DISABLE_WARNING_SWITCH_ENUM MAPNIK_DISABLE_WARNING(-Wswitch-enum) + #define MAPNIK_DISABLE_WARNING_MISSING_NORETURN MAPNIK_DISABLE_WARNING(-Wmissing-noreturn) + #define MAPNIK_DISABLE_WARNING_COVERED_SWITCH_DEFAULT MAPNIK_DISABLE_WARNING(-Wcovered-switch-default) + #define MAPNIK_DISABLE_WARNING_FLOAT_EQUAL MAPNIK_DISABLE_WARNING(-Wfloat-equal) + #define MAPNIK_DISABLE_LONG_LONG MAPNIK_DISABLE_WARNING(-Wlong-long) + #define MAPNIK_DISABLE_UNDEFINED_VAR_TEMPLATE MAPNIK_DISABLE_WARNING(-Wundefined-var-template) + #define MAPNIK_DISABLE_UNUSED_VARIABLE MAPNIK_DISABLE_WARNING(-Wunused-variable) + #define MAPNIK_DISABLE_MISMATCHED_TAGS MAPNIK_DISABLE_WARNING(-Wmismatched-tags) +#else + #define MAPNIK_MAPNIK_DISABLE_WARNING_PUSH + #define MAPNIK_MAPNIK_DISABLE_WARNING_POP + // add all of the above warnings here (will be used if unknown compiler) + #define MAPNIK_DISABLE_WARNING_UNKNOWN_PRAGMAS + #define MAPNIK_DISABLE_WARNING_PRAGMAS + #define MAPNIK_DISABLE_WARNING_PRAGMA_MESSAGES + #define MAPNIK_DISABLE_WARNING_UNSEQUENCED + #define MAPNIK_DISABLE_WARNING_UNUSED_FUNCTION + #define MAPNIK_DISABLE_WARNING_UNUSED_PARAMETER + #define MAPNIK_DISABLE_WARNING_REDECLARED_CLASS_MEMBER + #define MAPNIK_DISABLE_WARNING_UNUSED_LOCAL_TYPEDEF + #define MAPNIK_DISABLE_WARNING_UNUSED_LOCAL_TYPEDEFS + #define MAPNIK_DISABLE_WARNING_SHADOW + #define MAPNIK_DISABLE_WARNING_CPP11_NARROWING + #define MAPNIK_DISABLE_WARNING_SIGN_CONVERSION + #define MAPNIK_DISABLE_WARNING_SIGN_COMPARE + #define MAPNIK_DISABLE_WARNING_CONVERSION + #define MAPNIK_DISABLE_WARNING_CPP_98_COMPAT_PEDANTIC + #define MAPNIK_DISABLE_WARNING_DISABLE_MACRO_EXPANSION + #define MAPNIK_DISABLE_WARNING_OLD_STYLE_CAST + #define MAPNIK_DISABLE_WARNING_DOCUMENTATION + #define MAPNIK_DISABLE_WARNING_DOCUMENTATION_UNKNOWN_COMMAND + #define MAPNIK_DISABLE_WARNING_UNDEF + #define MAPNIK_DISABLE_WARNING_DEPRECATED + #define MAPNIK_DISABLE_WARNING_PADDED + #define MAPNIK_DISABLE_WARNING_CPP_98_COMPAT + #define MAPNIK_DISABLE_WARNING_RESERVED_ID_MACRO + #define MAPNIK_DISABLE_WARNING_WEAK_VTABLE + #define MAPNIK_DISABLE_WARNING_EXTRA_SEMI + #define MAPNIK_DISABLE_WARNING_GLOBAL_CONSTRUCTORS + #define MAPNIK_DISABLE_WARNING_HEADER_HYGIENE + #define MAPNIK_DISABLE_WARNING_EXIT_TIME_DESTRUCTORS + #define MAPNIK_DISABLE_WARNING_SWITCH_ENUM + #define MAPNIK_DISABLE_WARNING_MISSING_NORETURN + #define MAPNIK_DISABLE_WARNING_COVERED_SWITCH_DEFAULT + #define MAPNIK_DISABLE_WARNING_FLOAT_EQUAL + #define MAPNIK_DISABLE_LONG_LONG + #define MAPNIK_DISABLE_UNDEFINED_VAR_TEMPLATE + #define MAPNIK_DISABLE_UNUSED_VARIABLE + #define MAPNIK_DISABLE_MISMATCHED_TAGS +#endif +#endif \ No newline at end of file diff --git a/include/mapnik/warning_ignore.hpp b/include/mapnik/warning_ignore.hpp index 276664929..b68e463e3 100644 --- a/include/mapnik/warning_ignore.hpp +++ b/include/mapnik/warning_ignore.hpp @@ -19,38 +19,38 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ +#include "warning.h" - -#pragma GCC diagnostic ignored "-Wunknown-pragmas" // clang+gcc -#pragma GCC diagnostic ignored "-Wpragmas" // gcc -#pragma GCC diagnostic ignored "-W#pragma-messages" -#pragma GCC diagnostic ignored "-Wunsequenced" -#pragma GCC diagnostic ignored "-Wunused-function" -#pragma GCC diagnostic ignored "-Wunused-parameter" -#pragma GCC diagnostic ignored "-Wredeclared-class-member" -#pragma GCC diagnostic ignored "-Wunused-local-typedef" -#pragma GCC diagnostic ignored "-Wunused-local-typedefs" // gcc5 -#pragma GCC diagnostic ignored "-Wshadow" -#pragma GCC diagnostic ignored "-Wc++11-narrowing" -#pragma GCC diagnostic ignored "-Wsign-conversion" -#pragma GCC diagnostic ignored "-Wsign-compare" -#pragma GCC diagnostic ignored "-Wconversion" -#pragma GCC diagnostic ignored "-Wc++98-compat-pedantic" -#pragma GCC diagnostic ignored "-Wdisabled-macro-expansion" -#pragma GCC diagnostic ignored "-Wold-style-cast" -#pragma GCC diagnostic ignored "-Wdocumentation" -#pragma GCC diagnostic ignored "-Wdocumentation-unknown-command" -#pragma GCC diagnostic ignored "-Wundef" -#pragma GCC diagnostic ignored "-Wdeprecated" -#pragma GCC diagnostic ignored "-Wpadded" -#pragma GCC diagnostic ignored "-Wc++98-compat" -#pragma GCC diagnostic ignored "-Wreserved-id-macro" -#pragma GCC diagnostic ignored "-Wweak-vtables" -#pragma GCC diagnostic ignored "-Wextra-semi" -#pragma GCC diagnostic ignored "-Wglobal-constructors" -#pragma GCC diagnostic ignored "-Wheader-hygiene" -#pragma GCC diagnostic ignored "-Wexit-time-destructors" -#pragma GCC diagnostic ignored "-Wswitch-enum" -#pragma GCC diagnostic ignored "-Wmissing-noreturn" -#pragma GCC diagnostic ignored "-Wcovered-switch-default" -#pragma GCC diagnostic ignored "-Wfloat-equal" +MAPNIK_DISABLE_WARNING_UNKNOWN_PRAGMAS // clang+gcc +MAPNIK_DISABLE_WARNING_PRAGMAS // gcc +MAPNIK_DISABLE_WARNING_PRAGMA_MESSAGES +MAPNIK_DISABLE_WARNING_UNSEQUENCED +MAPNIK_DISABLE_WARNING_UNUSED_FUNCTION +MAPNIK_DISABLE_WARNING_UNUSED_PARAMETER +MAPNIK_DISABLE_WARNING_REDECLARED_CLASS_MEMBER +MAPNIK_DISABLE_WARNING_UNUSED_LOCAL_TYPEDEF +MAPNIK_DISABLE_WARNING_UNUSED_LOCAL_TYPEDEFS // gcc5 +MAPNIK_DISABLE_WARNING_SHADOW +MAPNIK_DISABLE_WARNING_CPP11_NARROWING +MAPNIK_DISABLE_WARNING_SIGN_CONVERSION +MAPNIK_DISABLE_WARNING_SIGN_COMPARE +MAPNIK_DISABLE_WARNING_CONVERSION +MAPNIK_DISABLE_WARNING_CPP_98_COMPAT_PEDANTIC +MAPNIK_DISABLE_WARNING_DISABLE_MACRO_EXPANSION +MAPNIK_DISABLE_WARNING_OLD_STYLE_CAST +MAPNIK_DISABLE_WARNING_DOCUMENTATION +MAPNIK_DISABLE_WARNING_DOCUMENTATION_UNKNOWN_COMMAND +MAPNIK_DISABLE_WARNING_UNDEF +MAPNIK_DISABLE_WARNING_DEPRECATED +MAPNIK_DISABLE_WARNING_PADDED +MAPNIK_DISABLE_WARNING_CPP_98_COMPAT +MAPNIK_DISABLE_WARNING_RESERVED_ID_MACRO +MAPNIK_DISABLE_WARNING_WEAK_VTABLE +MAPNIK_DISABLE_WARNING_EXTRA_SEMI +MAPNIK_DISABLE_WARNING_GLOBAL_CONSTRUCTORS +MAPNIK_DISABLE_WARNING_HEADER_HYGIENE +MAPNIK_DISABLE_WARNING_EXIT_TIME_DESTRUCTORS +MAPNIK_DISABLE_WARNING_SWITCH_ENUM +MAPNIK_DISABLE_WARNING_MISSING_NORETURN +MAPNIK_DISABLE_WARNING_COVERED_SWITCH_DEFAULT +MAPNIK_DISABLE_WARNING_FLOAT_EQUAL \ No newline at end of file diff --git a/include/mapnik/warning_ignore_agg.hpp b/include/mapnik/warning_ignore_agg.hpp index d883d1ed8..3398b4aec 100644 --- a/include/mapnik/warning_ignore_agg.hpp +++ b/include/mapnik/warning_ignore_agg.hpp @@ -19,14 +19,14 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ +#include "warning.hpp" - -#pragma GCC diagnostic ignored "-Wunknown-pragmas" // clang+gcc -#pragma GCC diagnostic ignored "-Wpragmas" // gcc -#pragma GCC diagnostic ignored "-Wsign-conversion" -#pragma GCC diagnostic ignored "-Wsign-compare" -#pragma GCC diagnostic ignored "-Wconversion" -#pragma GCC diagnostic ignored "-Wpadded" -#pragma GCC diagnostic ignored "-Wold-style-cast" -#pragma GCC diagnostic ignored "-Wshadow" +MAPNIK_DISABLE_WARNING_UNKNOWN_PRAGMAS // clang+gcc +MAPNIK_DISABLE_WARNING_PRAGMAS // gcc +MAPNIK_DISABLE_WARNING_SIGN_CONVERSION +MAPNIK_DISABLE_WARNING_SIGN_COMPARE +MAPNIK_DISABLE_WARNING_CONVERSION +MAPNIK_DISABLE_WARNING_PADDED +MAPNIK_DISABLE_WARNING_OLD_STYLE_CAST +MAPNIK_DISABLE_WARNING_SHADOW diff --git a/include/mapnik/webp_io.hpp b/include/mapnik/webp_io.hpp index d1e82d9e0..67fd54a05 100644 --- a/include/mapnik/webp_io.hpp +++ b/include/mapnik/webp_io.hpp @@ -27,13 +27,14 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include extern "C" { #include } -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/include/mapnik/well_known_srs.hpp b/include/mapnik/well_known_srs.hpp index 9225a0859..dc255374d 100644 --- a/include/mapnik/well_known_srs.hpp +++ b/include/mapnik/well_known_srs.hpp @@ -28,10 +28,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/include/mapnik/wkt/wkt_generator_grammar.hpp b/include/mapnik/wkt/wkt_generator_grammar.hpp index cb64807dc..f5c18da55 100644 --- a/include/mapnik/wkt/wkt_generator_grammar.hpp +++ b/include/mapnik/wkt/wkt_generator_grammar.hpp @@ -27,12 +27,13 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include // for vc++ and android whose c++11 libs lack std::trunc #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { namespace wkt { diff --git a/include/mapnik/wkt/wkt_grammar_x3.hpp b/include/mapnik/wkt/wkt_grammar_x3.hpp index 275cc19b6..cf9af4f8b 100644 --- a/include/mapnik/wkt/wkt_grammar_x3.hpp +++ b/include/mapnik/wkt/wkt_grammar_x3.hpp @@ -23,10 +23,11 @@ #ifndef MAPNIK_WKT_GRAMMAR_X3_HPP #define MAPNIK_WKT_GRAMMAR_X3_HPP -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP #include diff --git a/include/mapnik/xml_attribute_cast.hpp b/include/mapnik/xml_attribute_cast.hpp index 8ed6988e0..a5ea83502 100644 --- a/include/mapnik/xml_attribute_cast.hpp +++ b/include/mapnik/xml_attribute_cast.hpp @@ -36,10 +36,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/include/mapnik/xml_node.hpp b/include/mapnik/xml_node.hpp index 4411f17d1..bdf77f4ee 100644 --- a/include/mapnik/xml_node.hpp +++ b/include/mapnik/xml_node.hpp @@ -26,10 +26,11 @@ //mapnik #include // for MAPNIK_DECL -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP //stl #include diff --git a/plugins/input/csv/csv_datasource.cpp b/plugins/input/csv/csv_datasource.cpp index 69b61e9ff..76cac634f 100644 --- a/plugins/input/csv/csv_datasource.cpp +++ b/plugins/input/csv/csv_datasource.cpp @@ -46,11 +46,12 @@ #include #include #if defined(MAPNIK_MEMORY_MAPPED_FILE) -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP #include #endif diff --git a/plugins/input/csv/csv_datasource.hpp b/plugins/input/csv/csv_datasource.hpp index a33716547..04a9b432e 100644 --- a/plugins/input/csv/csv_datasource.hpp +++ b/plugins/input/csv/csv_datasource.hpp @@ -34,12 +34,13 @@ #include #include "csv_utils.hpp" -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/plugins/input/csv/csv_featureset.hpp b/plugins/input/csv/csv_featureset.hpp index f04c47dd3..460d00102 100644 --- a/plugins/input/csv/csv_featureset.hpp +++ b/plugins/input/csv/csv_featureset.hpp @@ -30,11 +30,12 @@ #include #if defined(MAPNIK_MEMORY_MAPPED_FILE) -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP #include #endif diff --git a/plugins/input/csv/csv_index_featureset.hpp b/plugins/input/csv/csv_index_featureset.hpp index 24231c7ab..6a48d2867 100644 --- a/plugins/input/csv/csv_index_featureset.hpp +++ b/plugins/input/csv/csv_index_featureset.hpp @@ -31,11 +31,12 @@ #include "csv_datasource.hpp" #if defined(MAPNIK_MEMORY_MAPPED_FILE) -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP #include #endif diff --git a/plugins/input/geobuf/geobuf_datasource.hpp b/plugins/input/geobuf/geobuf_datasource.hpp index d7a3c5d9a..a18ee95d0 100644 --- a/plugins/input/geobuf/geobuf_datasource.hpp +++ b/plugins/input/geobuf/geobuf_datasource.hpp @@ -34,12 +34,13 @@ #include // boost #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/plugins/input/geojson/geojson_datasource.cpp b/plugins/input/geojson/geojson_datasource.cpp index 614621102..0f23770b1 100644 --- a/plugins/input/geojson/geojson_datasource.cpp +++ b/plugins/input/geojson/geojson_datasource.cpp @@ -27,10 +27,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // mapnik #include @@ -56,10 +57,11 @@ #include #if defined(MAPNIK_MEMORY_MAPPED_FILE) -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP #include #endif diff --git a/plugins/input/geojson/geojson_datasource.hpp b/plugins/input/geojson/geojson_datasource.hpp index cd7a576da..1ed17eed9 100644 --- a/plugins/input/geojson/geojson_datasource.hpp +++ b/plugins/input/geojson/geojson_datasource.hpp @@ -33,12 +33,13 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/plugins/input/geojson/geojson_index_featureset.hpp b/plugins/input/geojson/geojson_index_featureset.hpp index 27b46bc50..dafa2c147 100644 --- a/plugins/input/geojson/geojson_index_featureset.hpp +++ b/plugins/input/geojson/geojson_index_featureset.hpp @@ -29,11 +29,12 @@ #include #if defined(MAPNIK_MEMORY_MAPPED_FILE) -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP #include #endif diff --git a/plugins/input/ogr/ogr_converter.cpp b/plugins/input/ogr/ogr_converter.cpp index 97126a0fe..94cf17532 100644 --- a/plugins/input/ogr/ogr_converter.cpp +++ b/plugins/input/ogr/ogr_converter.cpp @@ -25,12 +25,13 @@ #include // ogr -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "ogr_converter.hpp" #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP mapnik::geometry::geometry ogr_converter::convert_geometry(OGRGeometry* ogr_geom) { diff --git a/plugins/input/ogr/ogr_datasource.cpp b/plugins/input/ogr/ogr_datasource.cpp index e9433d969..37d8eb93b 100644 --- a/plugins/input/ogr/ogr_datasource.cpp +++ b/plugins/input/ogr/ogr_datasource.cpp @@ -34,10 +34,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/plugins/input/ogr/ogr_datasource.hpp b/plugins/input/ogr/ogr_datasource.hpp index f959e50b1..76efe6891 100644 --- a/plugins/input/ogr/ogr_datasource.hpp +++ b/plugins/input/ogr/ogr_datasource.hpp @@ -40,10 +40,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP #include "ogr_layer_ptr.hpp" class ogr_datasource : public mapnik::datasource diff --git a/plugins/input/ogr/ogr_featureset.hpp b/plugins/input/ogr/ogr_featureset.hpp index e91c5ce78..e2a928452 100644 --- a/plugins/input/ogr/ogr_featureset.hpp +++ b/plugins/input/ogr/ogr_featureset.hpp @@ -29,10 +29,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP class ogr_featureset : public mapnik::Featureset { diff --git a/plugins/input/ogr/ogr_index_featureset.cpp b/plugins/input/ogr/ogr_index_featureset.cpp index 2eed43b14..11be970bc 100644 --- a/plugins/input/ogr/ogr_index_featureset.cpp +++ b/plugins/input/ogr/ogr_index_featureset.cpp @@ -35,11 +35,12 @@ // boost #if defined(MAPNIK_MEMORY_MAPPED_FILE) #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP #endif // ogr diff --git a/plugins/input/pgraster/pgraster_datasource.cpp b/plugins/input/pgraster/pgraster_datasource.cpp index c7ec2b1f2..b21639f81 100644 --- a/plugins/input/pgraster/pgraster_datasource.cpp +++ b/plugins/input/pgraster/pgraster_datasource.cpp @@ -38,10 +38,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include // FLT_MAX diff --git a/plugins/input/postgis/postgis_datasource.cpp b/plugins/input/postgis/postgis_datasource.cpp index 48301047b..96b6afab7 100644 --- a/plugins/input/postgis/postgis_datasource.cpp +++ b/plugins/input/postgis/postgis_datasource.cpp @@ -35,10 +35,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include // FLT_MAX diff --git a/plugins/input/raster/raster_featureset.cpp b/plugins/input/raster/raster_featureset.cpp index 7c2dae1b0..c57b88588 100644 --- a/plugins/input/raster/raster_featureset.cpp +++ b/plugins/input/raster/raster_featureset.cpp @@ -30,11 +30,12 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP #include "raster_featureset.hpp" diff --git a/plugins/input/shape/dbfile.cpp b/plugins/input/shape/dbfile.cpp index 59d7c62b4..90924c14b 100644 --- a/plugins/input/shape/dbfile.cpp +++ b/plugins/input/shape/dbfile.cpp @@ -28,14 +28,15 @@ #include "dbfile.hpp" -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #if defined(MAPNIK_MEMORY_MAPPED_FILE) #include #include #endif -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/plugins/input/shape/dbfile.hpp b/plugins/input/shape/dbfile.hpp index 0d91196c6..fdd53ef10 100644 --- a/plugins/input/shape/dbfile.hpp +++ b/plugins/input/shape/dbfile.hpp @@ -30,10 +30,11 @@ #if defined(MAPNIK_MEMORY_MAPPED_FILE) #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP #endif // stl diff --git a/plugins/input/shape/shape_datasource.cpp b/plugins/input/shape/shape_datasource.cpp index d6a722bca..0ff03d379 100644 --- a/plugins/input/shape/shape_datasource.cpp +++ b/plugins/input/shape/shape_datasource.cpp @@ -24,11 +24,12 @@ #include "shape_featureset.hpp" #include "shape_index_featureset.hpp" -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // mapnik #include diff --git a/plugins/input/shape/shape_index_featureset.cpp b/plugins/input/shape/shape_index_featureset.cpp index 2bc8d9399..d0212a830 100644 --- a/plugins/input/shape/shape_index_featureset.cpp +++ b/plugins/input/shape/shape_index_featureset.cpp @@ -27,13 +27,14 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #if defined(MAPNIK_MEMORY_MAPPED_FILE) #include #endif -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP #include "shape_index_featureset.hpp" #include "shape_utils.hpp" diff --git a/plugins/input/shape/shape_utils.cpp b/plugins/input/shape/shape_utils.cpp index 24ef94065..7e5c73a37 100644 --- a/plugins/input/shape/shape_utils.cpp +++ b/plugins/input/shape/shape_utils.cpp @@ -26,10 +26,11 @@ #include #include "shape_utils.hpp" -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP void setup_attributes(mapnik::context_ptr const& ctx, std::set const& names, diff --git a/plugins/input/shape/shapefile.hpp b/plugins/input/shape/shapefile.hpp index c956532c4..70f708a9f 100644 --- a/plugins/input/shape/shapefile.hpp +++ b/plugins/input/shape/shapefile.hpp @@ -35,11 +35,12 @@ #include #if defined(MAPNIK_MEMORY_MAPPED_FILE) -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP #include #endif #include diff --git a/plugins/input/sqlite/sqlite_connection.hpp b/plugins/input/sqlite/sqlite_connection.hpp index 4f24e7680..5d8993589 100644 --- a/plugins/input/sqlite/sqlite_connection.hpp +++ b/plugins/input/sqlite/sqlite_connection.hpp @@ -32,10 +32,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // sqlite extern "C" { diff --git a/plugins/input/sqlite/sqlite_utils.hpp b/plugins/input/sqlite/sqlite_utils.hpp index 102ec15f2..a65ecb6c9 100644 --- a/plugins/input/sqlite/sqlite_utils.hpp +++ b/plugins/input/sqlite/sqlite_utils.hpp @@ -38,10 +38,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // sqlite extern "C" { diff --git a/plugins/input/topojson/topojson_datasource.hpp b/plugins/input/topojson/topojson_datasource.hpp index 7d1981825..900e16a51 100644 --- a/plugins/input/topojson/topojson_datasource.hpp +++ b/plugins/input/topojson/topojson_datasource.hpp @@ -34,14 +34,15 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/plugins/input/topojson/topojson_featureset.cpp b/plugins/input/topojson/topojson_featureset.cpp index 9a74596a4..b27f02670 100644 --- a/plugins/input/topojson/topojson_featureset.cpp +++ b/plugins/input/topojson/topojson_featureset.cpp @@ -28,10 +28,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP #include "topojson_featureset.hpp" diff --git a/src/agg/agg_renderer.cpp b/src/agg/agg_renderer.cpp index 3734a4552..47fee4819 100644 --- a/src/agg/agg_renderer.cpp +++ b/src/agg/agg_renderer.cpp @@ -44,7 +44,8 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_rendering_buffer.h" #include "agg_pixfmt_rgba.h" @@ -55,12 +56,13 @@ #include "agg_span_allocator.h" #include "agg_image_accessors.h" #include "agg_span_image_filter_rgba.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/src/agg/process_building_symbolizer.cpp b/src/agg/process_building_symbolizer.cpp index 97f1e5479..00953bf3d 100644 --- a/src/agg/process_building_symbolizer.cpp +++ b/src/agg/process_building_symbolizer.cpp @@ -36,7 +36,8 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_basics.h" #include "agg_rendering_buffer.h" @@ -46,7 +47,7 @@ #include "agg_scanline_u.h" #include "agg_renderer_scanline.h" #include "agg_conv_stroke.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/src/agg/process_debug_symbolizer.cpp b/src/agg/process_debug_symbolizer.cpp index be6ab0d85..a5ca589c7 100644 --- a/src/agg/process_debug_symbolizer.cpp +++ b/src/agg/process_debug_symbolizer.cpp @@ -33,7 +33,8 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_basics.h" #include "agg_rendering_buffer.h" @@ -42,7 +43,7 @@ #include "agg_scanline_u.h" #include "agg_renderer_scanline.h" #include "agg_conv_stroke.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/src/agg/process_dot_symbolizer.cpp b/src/agg/process_dot_symbolizer.cpp index 7e46187cc..9028d00fc 100644 --- a/src/agg/process_dot_symbolizer.cpp +++ b/src/agg/process_dot_symbolizer.cpp @@ -33,7 +33,8 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_ellipse.h" #include "agg_rendering_buffer.h" @@ -42,7 +43,7 @@ #include "agg_renderer_scanline.h" #include "agg_color_rgba.h" #include "agg_renderer_base.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { namespace detail { diff --git a/src/agg/process_group_symbolizer.cpp b/src/agg/process_group_symbolizer.cpp index c7e7f4331..ec47ab0b8 100644 --- a/src/agg/process_group_symbolizer.cpp +++ b/src/agg/process_group_symbolizer.cpp @@ -35,10 +35,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_trans_affine.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/src/agg/process_line_pattern_symbolizer.cpp b/src/agg/process_line_pattern_symbolizer.cpp index 2538b256a..817762a8d 100644 --- a/src/agg/process_line_pattern_symbolizer.cpp +++ b/src/agg/process_line_pattern_symbolizer.cpp @@ -39,7 +39,8 @@ #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_basics.h" #include "agg_pixfmt_rgba.h" @@ -54,7 +55,7 @@ #include "agg_span_pattern_rgba.h" #include "agg_renderer_outline_image.h" #include "agg_image_accessors.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/src/agg/process_line_symbolizer.cpp b/src/agg/process_line_symbolizer.cpp index df8c5ee2c..0b43d61a4 100644 --- a/src/agg/process_line_symbolizer.cpp +++ b/src/agg/process_line_symbolizer.cpp @@ -33,7 +33,8 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_basics.h" #include "agg_rendering_buffer.h" @@ -47,7 +48,7 @@ #include "agg_conv_dash.h" #include "agg_renderer_outline_aa.h" #include "agg_rasterizer_outline_aa.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/src/agg/process_markers_symbolizer.cpp b/src/agg/process_markers_symbolizer.cpp index 2c47bf515..8f4bc7fed 100644 --- a/src/agg/process_markers_symbolizer.cpp +++ b/src/agg/process_markers_symbolizer.cpp @@ -33,7 +33,8 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_basics.h" #include "agg_renderer_base.h" @@ -45,7 +46,7 @@ #include "agg_scanline_u.h" #include "agg_path_storage.h" #include "agg_conv_transform.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/src/agg/process_point_symbolizer.cpp b/src/agg/process_point_symbolizer.cpp index df8d21b43..440c7bde3 100644 --- a/src/agg/process_point_symbolizer.cpp +++ b/src/agg/process_point_symbolizer.cpp @@ -34,10 +34,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_trans_affine.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/src/agg/process_polygon_pattern_symbolizer.cpp b/src/agg/process_polygon_pattern_symbolizer.cpp index 0e95317ec..ffcec4615 100644 --- a/src/agg/process_polygon_pattern_symbolizer.cpp +++ b/src/agg/process_polygon_pattern_symbolizer.cpp @@ -38,7 +38,8 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_basics.h" #include "agg_rendering_buffer.h" @@ -52,7 +53,7 @@ #include "agg_span_pattern_rgba.h" #include "agg_image_accessors.h" #include "agg_conv_clip_polygon.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/src/agg/process_polygon_symbolizer.cpp b/src/agg/process_polygon_symbolizer.cpp index 84b64326c..9f94b2212 100644 --- a/src/agg/process_polygon_symbolizer.cpp +++ b/src/agg/process_polygon_symbolizer.cpp @@ -33,7 +33,8 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_basics.h" #include "agg_rendering_buffer.h" @@ -42,7 +43,7 @@ #include "agg_renderer_scanline.h" #include "agg_rasterizer_scanline_aa.h" #include "agg_scanline_u.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/src/agg/process_raster_symbolizer.cpp b/src/agg/process_raster_symbolizer.cpp index dd8f1280f..2991588ec 100644 --- a/src/agg/process_raster_symbolizer.cpp +++ b/src/agg/process_raster_symbolizer.cpp @@ -38,11 +38,12 @@ // stl #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_rendering_buffer.h" #include "agg_pixfmt_rgba.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/src/color.cpp b/src/color.cpp index 620b90bc0..0001ecd53 100644 --- a/src/color.cpp +++ b/src/color.cpp @@ -25,10 +25,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/src/conversions_numeric.cpp b/src/conversions_numeric.cpp index 411803c59..920b348ce 100644 --- a/src/conversions_numeric.cpp +++ b/src/conversions_numeric.cpp @@ -26,10 +26,11 @@ #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { namespace util { diff --git a/src/conversions_string.cpp b/src/conversions_string.cpp index e2f918f4b..9dd845dd0 100644 --- a/src/conversions_string.cpp +++ b/src/conversions_string.cpp @@ -30,12 +30,13 @@ // karma is used by default #define MAPNIK_KARMA_TO_STRING -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #ifdef MAPNIK_KARMA_TO_STRING #include #endif -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP #if _MSC_VER #define snprintf _snprintf diff --git a/src/dasharray_parser.cpp b/src/dasharray_parser.cpp index 9a540968b..d03f9cb9a 100644 --- a/src/dasharray_parser.cpp +++ b/src/dasharray_parser.cpp @@ -23,10 +23,11 @@ // mapnik #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/src/datasource_cache.cpp b/src/datasource_cache.cpp index 8f90826f5..6d4167a4a 100644 --- a/src/datasource_cache.cpp +++ b/src/datasource_cache.cpp @@ -29,11 +29,12 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/src/expression_node.cpp b/src/expression_node.cpp index aeba16dfe..ffec6a818 100644 --- a/src/expression_node.cpp +++ b/src/expression_node.cpp @@ -25,14 +25,15 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #if defined(BOOST_REGEX_HAS_ICU) #include #else #include #endif -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/src/feature_kv_iterator.cpp b/src/feature_kv_iterator.cpp index ae7698214..95c83703d 100644 --- a/src/feature_kv_iterator.cpp +++ b/src/feature_kv_iterator.cpp @@ -23,10 +23,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/src/font_engine_freetype.cpp b/src/font_engine_freetype.cpp index e8bb492a0..4e4817eb6 100644 --- a/src/font_engine_freetype.cpp +++ b/src/font_engine_freetype.cpp @@ -29,7 +29,8 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include @@ -42,7 +43,7 @@ extern "C" #include FT_STROKER_H #include FT_MODULE_H } -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/src/fs.cpp b/src/fs.cpp index 417847f48..4964a2dc0 100644 --- a/src/fs.cpp +++ b/src/fs.cpp @@ -25,11 +25,12 @@ #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include // for absolute, exists, etc #include // for path, operator/ -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/src/generate_image_filters.cpp b/src/generate_image_filters.cpp index a2902c62f..4a42cafbe 100644 --- a/src/generate_image_filters.cpp +++ b/src/generate_image_filters.cpp @@ -23,10 +23,11 @@ // mapnik #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/src/geometry/interior.cpp b/src/geometry/interior.cpp index c59b0846a..77ea03fba 100644 --- a/src/geometry/interior.cpp +++ b/src/geometry/interior.cpp @@ -31,10 +31,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { namespace geometry { diff --git a/src/grid/grid_renderer.cpp b/src/grid/grid_renderer.cpp index b51c06855..09b73ee80 100644 --- a/src/grid/grid_renderer.cpp +++ b/src/grid/grid_renderer.cpp @@ -47,15 +47,17 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_trans_affine.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/src/grid/process_building_symbolizer.cpp b/src/grid/process_building_symbolizer.cpp index 940e648ca..abfa00914 100644 --- a/src/grid/process_building_symbolizer.cpp +++ b/src/grid/process_building_symbolizer.cpp @@ -38,13 +38,14 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_rasterizer_scanline_aa.h" #include "agg_renderer_scanline.h" #include "agg_scanline_bin.h" #include "agg_conv_stroke.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/src/grid/process_group_symbolizer.cpp b/src/grid/process_group_symbolizer.cpp index bf7fa64fe..fd703bd7b 100644 --- a/src/grid/process_group_symbolizer.cpp +++ b/src/grid/process_group_symbolizer.cpp @@ -37,10 +37,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_trans_affine.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/src/grid/process_line_pattern_symbolizer.cpp b/src/grid/process_line_pattern_symbolizer.cpp index 5491539db..c426e2578 100644 --- a/src/grid/process_line_pattern_symbolizer.cpp +++ b/src/grid/process_line_pattern_symbolizer.cpp @@ -36,14 +36,15 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_rasterizer_scanline_aa.h" #include "agg_renderer_scanline.h" #include "agg_scanline_bin.h" #include "agg_conv_stroke.h" #include "agg_conv_dash.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/src/grid/process_line_symbolizer.cpp b/src/grid/process_line_symbolizer.cpp index ccfb15bd3..3de01cefb 100644 --- a/src/grid/process_line_symbolizer.cpp +++ b/src/grid/process_line_symbolizer.cpp @@ -33,14 +33,15 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_rasterizer_scanline_aa.h" #include "agg_renderer_scanline.h" #include "agg_scanline_bin.h" #include "agg_conv_stroke.h" #include "agg_conv_dash.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/src/grid/process_markers_symbolizer.cpp b/src/grid/process_markers_symbolizer.cpp index d61cfaac7..4bc19de4b 100644 --- a/src/grid/process_markers_symbolizer.cpp +++ b/src/grid/process_markers_symbolizer.cpp @@ -55,12 +55,13 @@ porting notes --> #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_basics.h" #include "agg_rendering_buffer.h" #include "agg_rasterizer_scanline_aa.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/src/grid/process_point_symbolizer.cpp b/src/grid/process_point_symbolizer.cpp index bf8eff407..4c2b7a958 100644 --- a/src/grid/process_point_symbolizer.cpp +++ b/src/grid/process_point_symbolizer.cpp @@ -36,10 +36,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_trans_affine.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/src/grid/process_polygon_pattern_symbolizer.cpp b/src/grid/process_polygon_pattern_symbolizer.cpp index eea25148b..d5135b578 100644 --- a/src/grid/process_polygon_pattern_symbolizer.cpp +++ b/src/grid/process_polygon_pattern_symbolizer.cpp @@ -36,12 +36,13 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_rasterizer_scanline_aa.h" #include "agg_renderer_scanline.h" #include "agg_scanline_bin.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/src/grid/process_polygon_symbolizer.cpp b/src/grid/process_polygon_symbolizer.cpp index 21c6e843f..92c42e0c6 100644 --- a/src/grid/process_polygon_symbolizer.cpp +++ b/src/grid/process_polygon_symbolizer.cpp @@ -34,12 +34,13 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_rasterizer_scanline_aa.h" #include "agg_renderer_scanline.h" #include "agg_scanline_bin.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/src/grid/process_shield_symbolizer.cpp b/src/grid/process_shield_symbolizer.cpp index 6d8ec48e8..5a3f5bfd7 100644 --- a/src/grid/process_shield_symbolizer.cpp +++ b/src/grid/process_shield_symbolizer.cpp @@ -33,11 +33,12 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_trans_affine.h" #include "agg_gamma_functions.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/src/image_compositing.cpp b/src/image_compositing.cpp index a81f38be4..fc9d738cc 100644 --- a/src/image_compositing.cpp +++ b/src/image_compositing.cpp @@ -27,13 +27,15 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_rendering_buffer.h" #include "agg_rasterizer_scanline_aa.h" @@ -42,7 +44,7 @@ #include "agg_pixfmt_rgba.h" #include "agg_pixfmt_gray.h" #include "agg_color_rgba.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/src/image_options.cpp b/src/image_options.cpp index c97c621da..1f73fcc9a 100644 --- a/src/image_options.cpp +++ b/src/image_options.cpp @@ -22,11 +22,12 @@ #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP #if defined(HAVE_PNG) extern "C" diff --git a/src/image_scaling.cpp b/src/image_scaling.cpp index 7a0913df5..426467b23 100644 --- a/src/image_scaling.cpp +++ b/src/image_scaling.cpp @@ -26,13 +26,15 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_image_accessors.h" #include "agg_pixfmt_rgba.h" @@ -48,7 +50,7 @@ #include "agg_span_interpolator_linear.h" #include "agg_trans_affine.h" #include "agg_image_filters.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/src/image_util.cpp b/src/image_util.cpp index 0dc51f195..d8811082c 100644 --- a/src/image_util.cpp +++ b/src/image_util.cpp @@ -40,12 +40,13 @@ #include #endif -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_rendering_buffer.h" #include "agg_pixfmt_rgba.h" #include "agg_color_rgba.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/src/load_map.cpp b/src/load_map.cpp index 531be1533..bb49741d6 100644 --- a/src/load_map.cpp +++ b/src/load_map.cpp @@ -60,22 +60,24 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_trans_affine.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP using boost::tokenizer; diff --git a/src/mapped_memory_cache.cpp b/src/mapped_memory_cache.cpp index 2671014fc..2f2af8740 100644 --- a/src/mapped_memory_cache.cpp +++ b/src/mapped_memory_cache.cpp @@ -27,12 +27,13 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/src/marker_cache.cpp b/src/marker_cache.cpp index eca3f7cfa..8d31e8a42 100644 --- a/src/marker_cache.cpp +++ b/src/marker_cache.cpp @@ -33,17 +33,19 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_rendering_buffer.h" #include "agg_pixfmt_rgba.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/src/marker_helpers.cpp b/src/marker_helpers.cpp index ca2ae1f1c..e6933ce27 100644 --- a/src/marker_helpers.cpp +++ b/src/marker_helpers.cpp @@ -25,11 +25,12 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_ellipse.h" #include "agg_color_rgba.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/src/rapidxml_loader.cpp b/src/rapidxml_loader.cpp index 72db31c82..98c732cb3 100644 --- a/src/rapidxml_loader.cpp +++ b/src/rapidxml_loader.cpp @@ -33,10 +33,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/src/renderer_common/render_pattern.cpp b/src/renderer_common/render_pattern.cpp index 074fe6f00..947cccea7 100644 --- a/src/renderer_common/render_pattern.cpp +++ b/src/renderer_common/render_pattern.cpp @@ -28,7 +28,8 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_rendering_buffer.h" #include "agg_pixfmt_rgba.h" @@ -36,7 +37,7 @@ #include "agg_color_rgba.h" #include "agg_color_gray.h" #include "agg_scanline_u.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/src/save_map.cpp b/src/save_map.cpp index b5ef6e4c0..5728053c6 100644 --- a/src/save_map.cpp +++ b/src/save_map.cpp @@ -47,14 +47,15 @@ #include #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/src/simplify.cpp b/src/simplify.cpp index 51a5dfef5..08ffd1741 100644 --- a/src/simplify.cpp +++ b/src/simplify.cpp @@ -1,11 +1,12 @@ // mapnik #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/src/svg/output/svg_generator.cpp b/src/svg/output/svg_generator.cpp index 6252d66da..b964fc707 100644 --- a/src/svg/output/svg_generator.cpp +++ b/src/svg/output/svg_generator.cpp @@ -27,10 +27,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { namespace svg { diff --git a/src/svg/svg_parser.cpp b/src/svg/svg_parser.cpp index 96327c83b..98c6832be 100644 --- a/src/svg/svg_parser.cpp +++ b/src/svg/svg_parser.cpp @@ -32,22 +32,24 @@ #include #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_ellipse.h" #include "agg_rounded_rect.h" #include "agg_span_gradient.h" #include "agg_color_rgba.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP #include #include diff --git a/src/text/color_font_renderer.cpp b/src/text/color_font_renderer.cpp index b7e447b7b..e02bc2934 100644 --- a/src/text/color_font_renderer.cpp +++ b/src/text/color_font_renderer.cpp @@ -29,7 +29,8 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_rendering_buffer.h" #include "agg_color_rgba.h" @@ -42,7 +43,7 @@ #include "agg_renderer_base.h" #include "agg_renderer_scanline.h" #include "agg_pixfmt_rgba.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/src/text/face.cpp b/src/text/face.cpp index 4da295b19..64c5f0dd3 100644 --- a/src/text/face.cpp +++ b/src/text/face.cpp @@ -23,7 +23,8 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include extern "C" @@ -32,7 +33,7 @@ extern "C" #include FT_TRUETYPE_TABLES_H } -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/src/text/font_feature_settings.cpp b/src/text/font_feature_settings.cpp index 88a5ba27b..1442d3e29 100644 --- a/src/text/font_feature_settings.cpp +++ b/src/text/font_feature_settings.cpp @@ -24,11 +24,12 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/src/text/font_library.cpp b/src/text/font_library.cpp index 29b6b1b4d..eebbaac34 100644 --- a/src/text/font_library.cpp +++ b/src/text/font_library.cpp @@ -28,7 +28,8 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include // freetype2 @@ -39,7 +40,7 @@ extern "C" #include FT_MODULE_H } -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace { diff --git a/src/text/formatting/format.cpp b/src/text/formatting/format.cpp index 295cbfed4..ce34189f6 100644 --- a/src/text/formatting/format.cpp +++ b/src/text/formatting/format.cpp @@ -30,11 +30,12 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { namespace formatting { diff --git a/src/text/formatting/layout.cpp b/src/text/formatting/layout.cpp index 358e1d406..0937b1d4f 100644 --- a/src/text/formatting/layout.cpp +++ b/src/text/formatting/layout.cpp @@ -35,10 +35,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { namespace formatting { diff --git a/src/text/formatting/list.cpp b/src/text/formatting/list.cpp index 05ae8d3ca..5a70f44c5 100644 --- a/src/text/formatting/list.cpp +++ b/src/text/formatting/list.cpp @@ -25,10 +25,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { using boost::property_tree::ptree; diff --git a/src/text/formatting/text.cpp b/src/text/formatting/text.cpp index ff3432853..a4815abe4 100644 --- a/src/text/formatting/text.cpp +++ b/src/text/formatting/text.cpp @@ -30,10 +30,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/src/text/placements/list.cpp b/src/text/placements/list.cpp index 1fc412da7..ceee981ae 100644 --- a/src/text/placements/list.cpp +++ b/src/text/placements/list.cpp @@ -24,10 +24,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/src/text/placements/simple.cpp b/src/text/placements/simple.cpp index 89d447053..dab13b5bc 100644 --- a/src/text/placements/simple.cpp +++ b/src/text/placements/simple.cpp @@ -30,11 +30,12 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP #include diff --git a/src/text/renderer.cpp b/src/text/renderer.cpp index b27c6ce88..7fe137f12 100644 --- a/src/text/renderer.cpp +++ b/src/text/renderer.cpp @@ -32,7 +32,8 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_rendering_buffer.h" #include "agg_pixfmt_rgba.h" @@ -45,7 +46,7 @@ #include "agg_span_image_filter_rgba.h" #include "agg_renderer_base.h" #include "agg_renderer_scanline.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/src/text/scrptrun.cpp b/src/text/scrptrun.cpp index 55255e899..7faa265ae 100644 --- a/src/text/scrptrun.cpp +++ b/src/text/scrptrun.cpp @@ -14,11 +14,12 @@ * http://source.icu-project.org/repos/icu/icu/trunk/license.html */ -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP #include diff --git a/src/text/text_layout.cpp b/src/text/text_layout.cpp index e1952677f..aec9611fb 100644 --- a/src/text/text_layout.cpp +++ b/src/text/text_layout.cpp @@ -30,10 +30,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP #include #include diff --git a/src/text/text_properties.cpp b/src/text/text_properties.cpp index 3d4c0aad0..d4ee4fa70 100644 --- a/src/text/text_properties.cpp +++ b/src/text/text_properties.cpp @@ -35,10 +35,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP #include diff --git a/src/tiff_reader.cpp b/src/tiff_reader.cpp index dd1d5de76..61af03d32 100644 --- a/src/tiff_reader.cpp +++ b/src/tiff_reader.cpp @@ -30,11 +30,12 @@ extern "C" } #if defined(MAPNIK_MEMORY_MAPPED_FILE) -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP #include #endif diff --git a/src/unicode.cpp b/src/unicode.cpp index be1734e97..d2cc720df 100644 --- a/src/unicode.cpp +++ b/src/unicode.cpp @@ -27,10 +27,11 @@ // std #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/src/warp.cpp b/src/warp.cpp index b066bbfd1..b91bc6005 100644 --- a/src/warp.cpp +++ b/src/warp.cpp @@ -32,7 +32,8 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_image_filters.h" #include "agg_trans_bilinear.h" @@ -47,7 +48,7 @@ #include "agg_span_allocator.h" #include "agg_image_accessors.h" #include "agg_renderer_scanline.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { diff --git a/src/webp_reader.cpp b/src/webp_reader.cpp index 8096fc3f7..09978ecc3 100644 --- a/src/webp_reader.cpp +++ b/src/webp_reader.cpp @@ -25,7 +25,8 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include extern "C" { @@ -33,7 +34,7 @@ extern "C" #include } -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/src/well_known_srs.cpp b/src/well_known_srs.cpp index df3b2fe0a..688d3cb18 100644 --- a/src/well_known_srs.cpp +++ b/src/well_known_srs.cpp @@ -25,10 +25,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/test/cleanup.hpp b/test/cleanup.hpp index c775915b5..f9f993047 100644 --- a/test/cleanup.hpp +++ b/test/cleanup.hpp @@ -1,7 +1,8 @@ #ifndef TEST_MEMORY_CLEANUP #define TEST_MEMORY_CLEANUP -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #if defined(HAVE_LIBXML2) @@ -19,7 +20,7 @@ #include #endif -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace testing { diff --git a/test/unit/datasource/csv.cpp b/test/unit/datasource/csv.cpp index 7f8f581ce..83c1cff18 100644 --- a/test/unit/datasource/csv.cpp +++ b/test/unit/datasource/csv.cpp @@ -37,10 +37,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP #include @@ -997,8 +998,9 @@ TEST_CASE("csv") { } } // END SECTION -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wlong-long" + +MAPNIK_DISABLE_WARNING_PUSH +MAPNIK_DISABLE_LONG_LONG SECTION("64bit int fields work") { auto ds = get_csv_ds("test/data/csv/64bit_int.csv"); auto fields = ds->get_descriptor().get_descriptors(); @@ -1016,7 +1018,7 @@ TEST_CASE("csv") { REQUIRE_ATTRIBUTES(feature, { attr{"x", 0}, attr{"y", 0}, attr{"bigint", 0x7FFFFFFFFFFFFFFFll} }); } // END SECTION -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP SECTION("various number types") { auto ds = get_csv_ds("test/data/csv/number_types.csv"); diff --git a/test/unit/datasource/shapeindex.cpp b/test/unit/datasource/shapeindex.cpp index d7a211c5c..368ea524f 100644 --- a/test/unit/datasource/shapeindex.cpp +++ b/test/unit/datasource/shapeindex.cpp @@ -28,10 +28,11 @@ #include #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace { diff --git a/test/unit/geometry/geometry_equal.hpp b/test/unit/geometry/geometry_equal.hpp index 65c2bfbc7..c0819aed1 100644 --- a/test/unit/geometry/geometry_equal.hpp +++ b/test/unit/geometry/geometry_equal.hpp @@ -7,12 +7,13 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // helper namespace to ensure correct functionality namespace aux{ diff --git a/test/unit/imaging/image_io_test.cpp b/test/unit/imaging/image_io_test.cpp index 66fb11c4f..f22bf74ca 100644 --- a/test/unit/imaging/image_io_test.cpp +++ b/test/unit/imaging/image_io_test.cpp @@ -12,12 +12,13 @@ #include #endif -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP inline void make_directory(std::string const& dir) { boost::filesystem::create_directories(dir); diff --git a/test/unit/renderer/cairo_io.cpp b/test/unit/renderer/cairo_io.cpp index ef5beb780..00dd75b1f 100644 --- a/test/unit/renderer/cairo_io.cpp +++ b/test/unit/renderer/cairo_io.cpp @@ -3,10 +3,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP #include diff --git a/test/unit/serialization/parse_hex.hpp b/test/unit/serialization/parse_hex.hpp index 4c7d0d307..09f81260a 100644 --- a/test/unit/serialization/parse_hex.hpp +++ b/test/unit/serialization/parse_hex.hpp @@ -23,10 +23,11 @@ #ifndef MAPNIK_PARSE_HEX_HPP #define MAPNIK_PARSE_HEX_HPP -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace mapnik { namespace util { diff --git a/test/unit/svg/svg_renderer_test.cpp b/test/unit/svg/svg_renderer_test.cpp index 91988dd1d..a0193ef22 100644 --- a/test/unit/svg/svg_renderer_test.cpp +++ b/test/unit/svg/svg_renderer_test.cpp @@ -33,7 +33,8 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_rasterizer_scanline_aa.h" #include "agg_basics.h" @@ -41,7 +42,7 @@ #include "agg_renderer_base.h" #include "agg_pixfmt_rgba.h" #include "agg_scanline_u.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP namespace { diff --git a/test/unit/vertex_adapter/clipping_test.cpp b/test/unit/vertex_adapter/clipping_test.cpp index 589eadb47..124b9e535 100644 --- a/test/unit/vertex_adapter/clipping_test.cpp +++ b/test/unit/vertex_adapter/clipping_test.cpp @@ -6,10 +6,11 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP // stl #include diff --git a/test/visual/parse_map_sizes.cpp b/test/visual/parse_map_sizes.cpp index d0df2db9d..af0c6466d 100644 --- a/test/visual/parse_map_sizes.cpp +++ b/test/visual/parse_map_sizes.cpp @@ -22,11 +22,12 @@ #include "parse_map_sizes.hpp" -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP BOOST_FUSION_ADAPT_STRUCT ( visual_tests::map_size, diff --git a/utils/mapnik-index/mapnik-index.cpp b/utils/mapnik-index/mapnik-index.cpp index 521c0316d..b249a0df0 100644 --- a/utils/mapnik-index/mapnik-index.cpp +++ b/utils/mapnik-index/mapnik-index.cpp @@ -32,11 +32,12 @@ #include "process_csv_file.hpp" #include "process_geojson_file_x3.hpp" -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP const int DEFAULT_DEPTH = 8; const double DEFAULT_RATIO = 0.55; diff --git a/utils/mapnik-index/process_csv_file.cpp b/utils/mapnik-index/process_csv_file.cpp index 7ead26436..9c8e5480b 100644 --- a/utils/mapnik-index/process_csv_file.cpp +++ b/utils/mapnik-index/process_csv_file.cpp @@ -28,12 +28,13 @@ #include #if defined(MAPNIK_MEMORY_MAPPED_FILE) -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP #include #endif diff --git a/utils/mapnik-index/process_geojson_file_x3.cpp b/utils/mapnik-index/process_geojson_file_x3.cpp index 88a15406c..6cf20bce6 100644 --- a/utils/mapnik-index/process_geojson_file_x3.cpp +++ b/utils/mapnik-index/process_geojson_file_x3.cpp @@ -23,12 +23,13 @@ #include "process_geojson_file_x3.hpp" #if defined(MAPNIK_MEMORY_MAPPED_FILE) -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP #include #else #include diff --git a/utils/mapnik-render/mapnik-render.cpp b/utils/mapnik-render/mapnik-render.cpp index 299ce7ffb..d577895b1 100644 --- a/utils/mapnik-render/mapnik-render.cpp +++ b/utils/mapnik-render/mapnik-render.cpp @@ -8,11 +8,12 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP #include diff --git a/utils/pgsql2sqlite/main.cpp b/utils/pgsql2sqlite/main.cpp index 2fac6ed27..ae5395107 100644 --- a/utils/pgsql2sqlite/main.cpp +++ b/utils/pgsql2sqlite/main.cpp @@ -26,11 +26,12 @@ #include #include "connection_manager.hpp" -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP #include diff --git a/utils/pgsql2sqlite/pgsql2sqlite.hpp b/utils/pgsql2sqlite/pgsql2sqlite.hpp index 21a40c73d..5bc5955f3 100644 --- a/utils/pgsql2sqlite/pgsql2sqlite.hpp +++ b/utils/pgsql2sqlite/pgsql2sqlite.hpp @@ -35,10 +35,11 @@ #include "connection_manager.hpp" #include "cursorresultset.hpp" -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP //st #include diff --git a/utils/pgsql2sqlite/sqlite.hpp b/utils/pgsql2sqlite/sqlite.hpp index 9852f7b49..f7d41ec43 100644 --- a/utils/pgsql2sqlite/sqlite.hpp +++ b/utils/pgsql2sqlite/sqlite.hpp @@ -25,10 +25,11 @@ // boost #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP //stl #ifdef MAPNIK_DEBUG diff --git a/utils/shapeindex/shapeindex.cpp b/utils/shapeindex/shapeindex.cpp index ee70f901d..6a4d18733 100644 --- a/utils/shapeindex/shapeindex.cpp +++ b/utils/shapeindex/shapeindex.cpp @@ -31,11 +31,12 @@ #include "shapefile.hpp" #include "shape_io.hpp" #include "shape_index_featureset.hpp" -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_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 9821e8623..6ec174ff6 100644 --- a/utils/svg2png/svg2png.cpp +++ b/utils/svg2png/svg2png.cpp @@ -35,13 +35,15 @@ #include #include -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include #include -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP -#pragma GCC diagnostic push +#include +MAPNIK_DISABLE_WARNING_PUSH #include #include "agg_rasterizer_scanline_aa.h" #include "agg_basics.h" @@ -49,7 +51,7 @@ #include "agg_renderer_base.h" #include "agg_pixfmt_rgba.h" #include "agg_scanline_u.h" -#pragma GCC diagnostic pop +MAPNIK_DISABLE_WARNING_POP struct main_marker_visitor