diff --git a/include/mapnik/expression_node.hpp b/include/mapnik/expression_node.hpp index 851d70074..c1fccd71c 100644 --- a/include/mapnik/expression_node.hpp +++ b/include/mapnik/expression_node.hpp @@ -139,27 +139,27 @@ inline expr_node& operator- (expr_node& expr) return expr = unary_node(expr); } -inline expr_node & operator += ( expr_node &left ,const expr_node &right) +inline expr_node & operator += ( expr_node &left, expr_node const& right) { return left = binary_node(left,right); } -inline expr_node & operator -= ( expr_node &left ,const expr_node &right) +inline expr_node & operator -= ( expr_node &left, expr_node const& right) { return left = binary_node(left,right); } -inline expr_node & operator *= ( expr_node &left ,const expr_node &right) +inline expr_node & operator *= ( expr_node &left , expr_node const& right) { return left = binary_node(left,right); } -inline expr_node & operator /= ( expr_node &left ,const expr_node &right) +inline expr_node & operator /= ( expr_node &left , expr_node const& right) { return left = binary_node(left,right); } -inline expr_node & operator %= ( expr_node &left ,const expr_node &right) +inline expr_node & operator %= ( expr_node &left , expr_node const& right) { return left = binary_node(left,right); } diff --git a/include/mapnik/font_set.hpp b/include/mapnik/font_set.hpp index 426d60b06..81221638d 100644 --- a/include/mapnik/font_set.hpp +++ b/include/mapnik/font_set.hpp @@ -38,10 +38,10 @@ public: font_set(std::string const& name); font_set(font_set const& rhs); font_set& operator=(font_set const& rhs); - unsigned size() const; + std::size_t size() const; void set_name(std::string const& name); std::string const& get_name() const; - void add_face_name(std::string); + void add_face_name(std::string const& face_name); std::vector const& get_face_names() const; ~font_set(); private: diff --git a/include/mapnik/hextree.hpp b/include/mapnik/hextree.hpp index b64aef1fa..299945a11 100644 --- a/include/mapnik/hextree.hpp +++ b/include/mapnik/hextree.hpp @@ -351,19 +351,19 @@ public: pal_remap_.resize(sorted_pal_.size()); palette.clear(); palette.reserve(sorted_pal_.size()); - for (unsigned i=0; i(palette.size()); palette.push_back(sorted_pal_[i]); } } - for (unsigned i=0; i(palette.size()); palette.push_back(sorted_pal_[i]); } } diff --git a/include/mapnik/octree.hpp b/include/mapnik/octree.hpp index be09d98dd..e8c66f4af 100644 --- a/include/mapnik/octree.hpp +++ b/include/mapnik/octree.hpp @@ -300,7 +300,7 @@ public: palette.push_back(rgb(byte(itr->reds/float(count)), byte(itr->greens/float(count)), byte(itr->blues/float(count)))); - itr->index = palette.size() - 1; + itr->index = static_cast(palette.size()) - 1; } for (unsigned i=0; i < 8 ;++i) { diff --git a/include/mapnik/png_io.hpp b/include/mapnik/png_io.hpp index a1719e278..3de152960 100644 --- a/include/mapnik/png_io.hpp +++ b/include/mapnik/png_io.hpp @@ -88,7 +88,6 @@ void save_as_png(T1 & file, writer.toStream(file); return; } - png_voidp error_ptr=0; png_structp png_ptr=png_create_write_struct(PNG_LIBPNG_VER_STRING, error_ptr,0, 0); @@ -275,7 +274,6 @@ void save_as_png(T & file, std::vector const& palette, writer.toStream(file); return; } - png_voidp error_ptr=0; png_structp png_ptr=png_create_write_struct(PNG_LIBPNG_VER_STRING, error_ptr,0, 0); @@ -316,7 +314,7 @@ void save_as_png(T & file, std::vector const& palette, PNG_COMPRESSION_TYPE_DEFAULT,PNG_FILTER_TYPE_DEFAULT); png_color* pal = const_cast(reinterpret_cast(&palette[0])); - png_set_PLTE(png_ptr, info_ptr, pal, palette.size()); + png_set_PLTE(png_ptr, info_ptr, pal, static_cast(palette.size())); // make transparent lowest indexes, so tRNS is small if (alpha.size()>0) @@ -531,15 +529,12 @@ void save_as_png8_oct(T1 & file, leftovers = 0; } std::vector pal; - trees[j].setOffset(palette.size()); + trees[j].setOffset( static_cast(palette.size())); trees[j].create_palette(pal); assert(pal.size() <= max_colors); - leftovers = cols[j]-pal.size(); - cols[j] = pal.size(); - for(unsigned i=0; i(pal.size()); + cols[j] = static_cast(pal.size()); + palette.insert(palette.begin(), pal.begin(), pal.end()); assert(palette.size() <= 256); } } diff --git a/include/mapnik/processed_text.hpp b/include/mapnik/processed_text.hpp index d13692ee8..3bc45aa92 100644 --- a/include/mapnik/processed_text.hpp +++ b/include/mapnik/processed_text.hpp @@ -52,7 +52,7 @@ public: public: processed_text(face_manager & font_manager, double scale_factor); void push_back(char_properties const& properties, mapnik::value_unicode_string const& text); - unsigned size() const { return expr_list_.size(); } + std::size_t size() const { return expr_list_.size(); } unsigned empty() const { return expr_list_.empty(); } void clear(); typedef std::list expression_list; diff --git a/include/mapnik/svg/svg_path_adapter.hpp b/include/mapnik/svg/svg_path_adapter.hpp index 04f24c1a1..e606a088b 100644 --- a/include/mapnik/svg/svg_path_adapter.hpp +++ b/include/mapnik/svg/svg_path_adapter.hpp @@ -919,7 +919,7 @@ public: return vertices_.size() ? vertices_[vertices_.size() - 1].y : 0.0; } - unsigned total_vertices() const + std::size_t total_vertices() const { return vertices_.size(); } diff --git a/include/mapnik/text_path.hpp b/include/mapnik/text_path.hpp index 7eae3f036..7ef60c83e 100644 --- a/include/mapnik/text_path.hpp +++ b/include/mapnik/text_path.hpp @@ -72,7 +72,7 @@ public: text_ += text; } - unsigned num_characters() const + std::size_t num_characters() const { return characters_.size(); } @@ -87,12 +87,12 @@ public: return is_rtl; } - char_info const& at(unsigned i) const + char_info const& at(std::size_t i) const { return characters_[i]; } - char_info const& operator[](unsigned i) const + char_info const& operator[](std::size_t i) const { return at(i); } @@ -183,7 +183,7 @@ public: } /** Number of nodes. */ - int num_nodes() const + std::size_t num_nodes() const { return nodes_.size(); } diff --git a/include/mapnik/tiff_io.hpp b/include/mapnik/tiff_io.hpp index d3c52a5c4..9cf1f3d37 100644 --- a/include/mapnik/tiff_io.hpp +++ b/include/mapnik/tiff_io.hpp @@ -86,6 +86,7 @@ static toff_t tiff_seek_proc(thandle_t fd, toff_t off, int whence) // grow std::stringstream buffer (re: libtiff/tif_stream.cxx) std::ios::pos_type pos = out->tellp(); // second check needed for clang (libcxx doesn't set failbit when seeking beyond the current buffer size + if( out->fail() || static_cast(off) != pos) { std::ios::iostate old_state; @@ -143,7 +144,7 @@ static toff_t tiff_size_proc(thandle_t fd) out->seekp(0, std::ios::end); std::ios::pos_type len = out->tellp(); out->seekp(pos); - return (toff_t)len; + return static_cast(len); } static tsize_t tiff_dummy_read_proc(thandle_t , tdata_t , tsize_t) @@ -167,6 +168,7 @@ void save_as_tiff(T1 & file, T2 const& image) const int height = image.height(); const int scanline_size = sizeof(unsigned char) * width * 3; + TIFF* output = RealTIFFOpen("mapnik_tiff_stream", "wm", (thandle_t)&file, @@ -264,5 +266,4 @@ void save_as_tiff(T1 & file, T2 const& image) } - #endif // MAPNIK_TIFF_IO_HPP diff --git a/include/mapnik/util/dasharray_parser.hpp b/include/mapnik/util/dasharray_parser.hpp index e1e4c1271..a422b53d1 100644 --- a/include/mapnik/util/dasharray_parser.hpp +++ b/include/mapnik/util/dasharray_parser.hpp @@ -44,10 +44,10 @@ bool parse_dasharray(Iterator first, Iterator last, std::vector& dasharr using qi::lexeme; #endif using phoenix::push_back; - // SVG + // SVG // dasharray ::= (length | percentage) (comma-wsp dasharray)? // no support for 'percentage' as viewport is unknown at load_map - // + // bool r = phrase_parse(first, last, (double_[push_back(phoenix::ref(dasharray), _1)] % #if BOOST_VERSION > 104200 @@ -57,10 +57,10 @@ bool parse_dasharray(Iterator first, Iterator last, std::vector& dasharr #endif | lit("none")), qi::ascii::space); - - if (first != last) + if (first != last) + { return false; - + } return r; } diff --git a/include/mapnik/util/geometry_svg_generator.hpp b/include/mapnik/util/geometry_svg_generator.hpp index acb4ca8e5..9fec4ae65 100644 --- a/include/mapnik/util/geometry_svg_generator.hpp +++ b/include/mapnik/util/geometry_svg_generator.hpp @@ -42,11 +42,11 @@ #include #include -/*! - * adapted to conform to the concepts - * required by Karma to be recognized as a container of - * attributes for output generation. - */ + +// adapted to conform to the concepts +// required by Karma to be recognized as a container of +// attributes for output generation. + namespace boost { namespace spirit { namespace traits { // TODO - this needs to be made generic to any path type diff --git a/include/mapnik/vertex_converters.hpp b/include/mapnik/vertex_converters.hpp index 9cb0d6e49..1d7d4b26f 100644 --- a/include/mapnik/vertex_converters.hpp +++ b/include/mapnik/vertex_converters.hpp @@ -44,7 +44,6 @@ #include #include -#include #include // mapnik diff --git a/include/mapnik/webp_io.hpp b/include/mapnik/webp_io.hpp index 28924acc8..a697b39c9 100644 --- a/include/mapnik/webp_io.hpp +++ b/include/mapnik/webp_io.hpp @@ -47,9 +47,11 @@ int webp_stream_write(const uint8_t* data, size_t data_size, const WebPPicture* return true; } -std::string webp_encoding_error(WebPEncodingError error) { +std::string webp_encoding_error(WebPEncodingError error) +{ std::string os; - switch (error) { + switch (error) + { case VP8_ENC_ERROR_OUT_OF_MEMORY: os = "memory error allocating objects"; break; case VP8_ENC_ERROR_BITSTREAM_OUT_OF_MEMORY: os = "memory error while flushing bits"; break; case VP8_ENC_ERROR_NULL_PARAMETER: os = "a pointer parameter is NULL"; break; @@ -83,19 +85,20 @@ void save_as_webp(T1& file, // Add additional tuning if (method >= 0) config.method = method; - #if (WEBP_ENCODER_ABI_VERSION >> 8) >= 1 +#if (WEBP_ENCODER_ABI_VERSION >> 8) >= 1 config.lossless = !!lossless; config.image_hint = static_cast(image_hint); +#else + #ifdef _MSC_VER + #pragma NOTE(compiling against webp that does not support lossless flag) #else - #ifdef _MSC_VER - #pragma NOTE(compiling against webp that does not support lossless flag) - #else - #warning "compiling against webp that does not support lossless flag" - #endif + #warning "compiling against webp that does not support lossless flag" #endif +#endif bool valid = WebPValidateConfig(&config); - if (!valid) { + if (!valid) + { throw std::runtime_error("Invalid configuration"); } @@ -106,9 +109,9 @@ void save_as_webp(T1& file, } pic.width = image.width(); pic.height = image.height(); - #if (WEBP_ENCODER_ABI_VERSION >> 8) >= 1 +#if (WEBP_ENCODER_ABI_VERSION >> 8) >= 1 pic.use_argb = !!lossless; - #endif +#endif int ok = 0; if (alpha) { @@ -120,11 +123,11 @@ void save_as_webp(T1& file, { int stride = sizeof(typename T2::pixel_type) * image.width(); uint8_t const* bytes = reinterpret_cast(image.getBytes()); - #if (WEBP_ENCODER_ABI_VERSION >> 8) >= 1 +#if (WEBP_ENCODER_ABI_VERSION >> 8) >= 1 ok = WebPPictureImportRGBX(&pic, bytes, stride); - #else +#else ok = WebPPictureImportRGBA(&pic, bytes, stride); - #endif +#endif } if (!ok) diff --git a/src/font_set.cpp b/src/font_set.cpp index fdd04229a..7bc404021 100644 --- a/src/font_set.cpp +++ b/src/font_set.cpp @@ -48,12 +48,12 @@ font_set& font_set::operator=(font_set const& other) font_set::~font_set() {} -unsigned font_set::size() const +std::size_t font_set::size() const { return face_names_.size(); } -void font_set::add_face_name(std::string face_name) +void font_set::add_face_name(std::string const& face_name) { face_names_.push_back(face_name); } diff --git a/src/jpeg_reader.cpp b/src/jpeg_reader.cpp index ac9fd7281..36aa63ac4 100644 --- a/src/jpeg_reader.cpp +++ b/src/jpeg_reader.cpp @@ -162,8 +162,7 @@ void jpeg_reader::skip(j_decompress_ptr cinfo, long count) if (count <= 0) return; //A zero or negative skip count should be treated as a no-op. jpeg_stream_wrapper* wrap = reinterpret_cast(cinfo->src); - if (wrap->manager.bytes_in_buffer > 0u - && static_cast(count) < wrap->manager.bytes_in_buffer) + if (wrap->manager.bytes_in_buffer > 0 && count < wrap->manager.bytes_in_buffer) { wrap->manager.bytes_in_buffer -= count; wrap->manager.next_input_byte = &wrap->buffer[BUF_SIZE - wrap->manager.bytes_in_buffer]; @@ -191,7 +190,7 @@ void jpeg_reader::attach_stream (j_decompress_ptr cinfo, input_stream* in) cinfo->src = (struct jpeg_source_mgr *) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, sizeof(jpeg_stream_wrapper)); } - typename jpeg_reader::jpeg_stream_wrapper * src = reinterpret_cast (cinfo->src); + jpeg_reader::jpeg_stream_wrapper * src = reinterpret_cast (cinfo->src); src->manager.init_source = init_source; src->manager.fill_input_buffer = fill_input_buffer; src->manager.skip_input_data = skip; diff --git a/src/palette.cpp b/src/palette.cpp index f85725962..282386575 100644 --- a/src/palette.cpp +++ b/src/palette.cpp @@ -26,6 +26,7 @@ // stl #include #include +#include namespace mapnik { @@ -81,8 +82,8 @@ bool rgba_palette::valid() const std::string rgba_palette::to_string() const { - unsigned length = rgb_pal_.size(); - unsigned alphaLength = alpha_pal_.size(); + size_t length = rgb_pal_.size(); + size_t alphaLength = alpha_pal_.size(); std::ostringstream str(""); str << "[Palette " << length; if (length == 1) @@ -125,7 +126,7 @@ unsigned char rgba_palette::quantize(unsigned val) const // find closest match based on mean of r,g,b,a std::vector::const_iterator pit = std::lower_bound(sorted_pal_.begin(), sorted_pal_.end(), c, rgba::mean_sort_cmp()); - index = pit - sorted_pal_.begin(); + index = std::distance(sorted_pal_.begin(),pit); if (index == sorted_pal_.size()) index--; dr = sorted_pal_[index].r - c.r; diff --git a/src/svg/svg_parser.cpp b/src/svg/svg_parser.cpp index 1a322ac2c..0fbf12bf0 100644 --- a/src/svg/svg_parser.cpp +++ b/src/svg/svg_parser.cpp @@ -36,6 +36,7 @@ #include #include #include + #include #include @@ -160,7 +161,7 @@ bool parse_reader(svg_parser & parser, xmlTextReaderPtr reader) catch (std::exception const& ex) { xmlFreeTextReader(reader); - throw; + throw ex; } xmlFreeTextReader(reader); if (ret != 0) @@ -216,7 +217,7 @@ void start_element(svg_parser & parser, xmlTextReaderPtr reader) if (xmlStrEqual(name, BAD_CAST "path")) { parse_path(parser,reader); - } + } else if (xmlStrEqual(name, BAD_CAST "polygon") ) { parse_polygon(parser,reader); @@ -230,7 +231,7 @@ void start_element(svg_parser & parser, xmlTextReaderPtr reader) parse_line(parser,reader); } else if (xmlStrEqual(name, BAD_CAST "rect")) - { + { parse_rect(parser,reader); } else if (xmlStrEqual(name, BAD_CAST "circle")) @@ -419,7 +420,7 @@ void parse_attr(svg_parser & parser, const xmlChar * name, const xmlChar * value void parse_attr(svg_parser & parser, xmlTextReaderPtr reader) { const xmlChar *name, *value; - + if (xmlTextReaderMoveToFirstAttribute(reader) == 1) { do @@ -553,33 +554,33 @@ void parse_line(svg_parser & parser, xmlTextReaderPtr reader) double y2 = 0.0; value = xmlTextReaderGetAttribute(reader, BAD_CAST "x1"); - if (value) + if (value) { x1 = parse_double((const char*)value); xmlFree(value); } - + value = xmlTextReaderGetAttribute(reader, BAD_CAST "y1"); - if (value) + if (value) { y1 = parse_double((const char*)value); xmlFree(value); } - + value = xmlTextReaderGetAttribute(reader, BAD_CAST "x2"); - if (value) + if (value) { x2 = parse_double((const char*)value); xmlFree(value); } - + value = xmlTextReaderGetAttribute(reader, BAD_CAST "y2"); - if (value) + if (value) { y2 = parse_double((const char*)value); xmlFree(value); } - + parser.path_.begin_path(); parser.path_.move_to(x1, y1); parser.path_.line_to(x2, y2); @@ -594,26 +595,26 @@ void parse_circle(svg_parser & parser, xmlTextReaderPtr reader) double cy = 0.0; double r = 0.0; value = xmlTextReaderGetAttribute(reader, BAD_CAST "cx"); - if (value) + if (value) { cx = parse_double((const char*)value); xmlFree(value); } value = xmlTextReaderGetAttribute(reader, BAD_CAST "cy"); - if (value) + if (value) { cy = parse_double((const char*)value); xmlFree(value); } - + value = xmlTextReaderGetAttribute(reader, BAD_CAST "r"); - if (value) + if (value) { r = parse_double((const char*)value); xmlFree(value); } - + parser.path_.begin_path(); if(r != 0.0) @@ -635,33 +636,33 @@ void parse_ellipse(svg_parser & parser, xmlTextReaderPtr reader) double ry = 0.0; value = xmlTextReaderGetAttribute(reader, BAD_CAST "cx"); - if (value) + if (value) { cx = parse_double((const char*)value); xmlFree(value); } - + value = xmlTextReaderGetAttribute(reader, BAD_CAST "cy"); - if (value) + if (value) { cy = parse_double((const char*)value); xmlFree(value); } - + value = xmlTextReaderGetAttribute(reader, BAD_CAST "rx"); - if (value) + if (value) { rx = parse_double((const char*)value); xmlFree(value); } - + value = xmlTextReaderGetAttribute(reader, BAD_CAST "ry"); - if (value) + if (value) { ry = parse_double((const char*)value); xmlFree(value); } - + parser.path_.begin_path(); if(rx != 0.0 && ry != 0.0) @@ -745,7 +746,7 @@ void parse_rect(svg_parser & parser, xmlTextReaderPtr reader) if(rx < 0.0) throw std::runtime_error("parse_rect: Invalid rx"); if(ry < 0.0) throw std::runtime_error("parse_rect: Invalid ry"); parser.path_.begin_path(); - + if(rounded) { agg::rounded_rect r; @@ -781,7 +782,7 @@ void parse_gradient_stop(svg_parser & parser, xmlTextReaderPtr reader) double opacity = 1.0; value = xmlTextReaderGetAttribute(reader, BAD_CAST "offset"); - if (value) + if (value) { offset = parse_double((const char*)value); xmlFree(value); @@ -838,8 +839,7 @@ void parse_gradient_stop(svg_parser & parser, xmlTextReaderPtr reader) } - stop_color.set_alpha(opacity*255); - + stop_color.set_alpha(static_cast(opacity * 255)); parser.temporary_gradient_.second.add_stop(offset, stop_color); /* @@ -873,7 +873,7 @@ bool parse_common_gradient(svg_parser & parser, xmlTextReaderPtr reader) // check if we should inherit from another tag value = xmlTextReaderGetAttribute(reader, BAD_CAST "xlink:href"); - if (value) + if (value) { if (value[0] == '#') { @@ -889,7 +889,7 @@ bool parse_common_gradient(svg_parser & parser, xmlTextReaderPtr reader) } xmlFree(value); } - + value = xmlTextReaderGetAttribute(reader, BAD_CAST "gradientUnits"); if (value) { @@ -903,7 +903,7 @@ bool parse_common_gradient(svg_parser & parser, xmlTextReaderPtr reader) } xmlFree(value); } - + value = xmlTextReaderGetAttribute(reader, BAD_CAST "gradientTransform"); if (value) { @@ -942,14 +942,14 @@ void parse_radial_gradient(svg_parser & parser, xmlTextReaderPtr reader) bool has_percent=true; value = xmlTextReaderGetAttribute(reader, BAD_CAST "cx"); - if (value) + if (value) { cx = parse_double_optional_percent((const char*)value, has_percent); xmlFree(value); } value = xmlTextReaderGetAttribute(reader, BAD_CAST "cy"); - if (value) + if (value) { cy = parse_double_optional_percent((const char*)value, has_percent); xmlFree(value); @@ -1006,28 +1006,28 @@ void parse_linear_gradient(svg_parser & parser, xmlTextReaderPtr reader) bool has_percent=true; value = xmlTextReaderGetAttribute(reader, BAD_CAST "x1"); - if (value) + if (value) { x1 = parse_double_optional_percent((const char*)value, has_percent); xmlFree(value); } value = xmlTextReaderGetAttribute(reader, BAD_CAST "x2"); - if (value) + if (value) { x2 = parse_double_optional_percent((const char*)value, has_percent); xmlFree(value); } value = xmlTextReaderGetAttribute(reader, BAD_CAST "y1"); - if (value) + if (value) { y1 = parse_double_optional_percent((const char*)value, has_percent); xmlFree(value); } - + value = xmlTextReaderGetAttribute(reader, BAD_CAST "y2"); - if (value) + if (value) { y2 = parse_double_optional_percent((const char*)value, has_percent); xmlFree(value); diff --git a/src/symbolizer_helpers.cpp b/src/symbolizer_helpers.cpp index 5286de55e..5f1693c44 100644 --- a/src/symbolizer_helpers.cpp +++ b/src/symbolizer_helpers.cpp @@ -212,7 +212,8 @@ void text_symbolizer_helper::initialize_geometries() { bool largest_box_only = false; std::size_t num_geom = feature_.num_geometries(); - for (std::size_t i=0; i } -namespace mapnik -{ - -namespace impl { +namespace mapnik { namespace impl { static toff_t tiff_seek_proc(thandle_t fd, toff_t off, int whence) { @@ -61,7 +58,7 @@ static toff_t tiff_seek_proc(thandle_t fd, toff_t off, int whence) return static_cast(in->tellg()); } -static int tiff_close_proc(thandle_t /*fd*/) +static int tiff_close_proc(thandle_t) { return 0; } @@ -86,16 +83,16 @@ static tsize_t tiff_read_proc(thandle_t fd, tdata_t buf, tsize_t size) return static_cast(in->gcount()); } -static tsize_t tiff_write_proc(thandle_t /*fd*/, tdata_t /*buf*/, tsize_t /*size*/) +static tsize_t tiff_write_proc(thandle_t , tdata_t , tsize_t) { return 0; } -static void tiff_unmap_proc(thandle_t /*fd*/, tdata_t /*base*/, toff_t /*size*/) +static void tiff_unmap_proc(thandle_t, tdata_t, toff_t) { } -static int tiff_map_proc(thandle_t /*fd*/, tdata_t* /*pbase*/, toff_t* /*psize*/) +static int tiff_map_proc(thandle_t, tdata_t* , toff_t*) { return 0; } @@ -152,7 +149,7 @@ private: void read_stripped(unsigned x,unsigned y,image_data_32& image); void read_tiled(unsigned x,unsigned y,image_data_32& image); TIFF* open(std::istream & input); - static void on_error(const char* /*module*/, const char* fmt, va_list argptr); + static void on_error(const char* , const char* fmt, va_list argptr); }; namespace @@ -207,7 +204,7 @@ tiff_reader::tiff_reader(char const* data, std::size_t size) } template -void tiff_reader::on_error(const char* /*module*/, const char* fmt, va_list argptr) +void tiff_reader::on_error(const char* , const char* fmt, va_list argptr) { char msg[10240]; vsprintf(msg, fmt, argptr); @@ -303,7 +300,7 @@ void tiff_reader::read(unsigned x,unsigned y,image_data_32& image) } template -void tiff_reader::read_generic(unsigned /*x*/,unsigned /*y*/,image_data_32& /*image*/) +void tiff_reader::read_generic(unsigned, unsigned, image_data_32&) { TIFF* tif = open(stream_); if (tif)