fix a batch of unused variable warnings (leaving several with are true bugs/missing features)
This commit is contained in:
parent
d1667c125c
commit
3bd2e6501f
10 changed files with 44 additions and 29 deletions
|
@ -266,7 +266,7 @@ struct test5
|
|||
s.resize(s.capacity());
|
||||
while (true)
|
||||
{
|
||||
size_t n2 = static_cast<size_t>(snprintf(&s[0], s.size()+1, "%g", val_));
|
||||
size_t n2 = static_cast<size_t>(snprintf(&s[0], s.size()+1, "%g", val));
|
||||
if (n2 <= s.size())
|
||||
{
|
||||
s.resize(n2);
|
||||
|
|
2
deps/agg/include/agg_pixfmt_rgba.h
vendored
2
deps/agg/include/agg_pixfmt_rgba.h
vendored
|
@ -134,7 +134,7 @@ namespace agg
|
|||
static AGG_INLINE void blend_pix(value_type* p,
|
||||
unsigned cr, unsigned cg, unsigned cb,
|
||||
unsigned alpha,
|
||||
unsigned cover=0)
|
||||
unsigned /*cover*/=0)
|
||||
{
|
||||
calc_type r = p[Order::R];
|
||||
calc_type g = p[Order::G];
|
||||
|
|
|
@ -164,7 +164,7 @@ namespace mapnik {
|
|||
public:
|
||||
typedef std::basic_ostringstream<Ch, Tr, A> stream_buffer;
|
||||
|
||||
void operator()(const logger::severity_type& severity, const stream_buffer &s)
|
||||
void operator()(const logger::severity_type& /*severity*/, const stream_buffer &s)
|
||||
{
|
||||
#ifdef MAPNIK_THREADSAFE
|
||||
static boost::mutex mutex;
|
||||
|
@ -193,15 +193,19 @@ namespace mapnik {
|
|||
|
||||
base_log() {}
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
base_log(const char* object_name)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
if (object_name != NULL)
|
||||
{
|
||||
object_name_ = object_name;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
base_log(const char* /*object_name*/)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
~base_log()
|
||||
{
|
||||
|
@ -214,13 +218,20 @@ namespace mapnik {
|
|||
}
|
||||
|
||||
template<class T>
|
||||
#ifdef MAPNIK_LOG
|
||||
base_log &operator<<(const T &x)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
|
||||
streambuf_ << x;
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
base_log &operator<<(const T& /*x*/)
|
||||
{
|
||||
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
||||
private:
|
||||
#ifdef MAPNIK_LOG
|
||||
|
|
|
@ -582,7 +582,7 @@ void apply_filter(Src & src, scale_hsla const& transform)
|
|||
}
|
||||
|
||||
template <typename Src>
|
||||
void apply_filter(Src & src, gray const& op)
|
||||
void apply_filter(Src & src, gray const& /*op*/)
|
||||
{
|
||||
using namespace boost::gil;
|
||||
|
||||
|
@ -632,14 +632,14 @@ void x_gradient_impl(Src const& src_view, Dst const& dst_view)
|
|||
}
|
||||
|
||||
template <typename Src>
|
||||
void apply_filter(Src & src, x_gradient const& op)
|
||||
void apply_filter(Src & src, x_gradient const& /*op*/)
|
||||
{
|
||||
double_buffer<Src> tb(src);
|
||||
x_gradient_impl(tb.src_view, tb.dst_view);
|
||||
}
|
||||
|
||||
template <typename Src>
|
||||
void apply_filter(Src & src, y_gradient const& op)
|
||||
void apply_filter(Src & src, y_gradient const& /*op*/)
|
||||
{
|
||||
double_buffer<Src> tb(src);
|
||||
x_gradient_impl(rotated90ccw_view(tb.src_view),
|
||||
|
@ -647,7 +647,7 @@ void apply_filter(Src & src, y_gradient const& op)
|
|||
}
|
||||
|
||||
template <typename Src>
|
||||
void apply_filter(Src & src, invert const& op)
|
||||
void apply_filter(Src & src, invert const& /*op*/)
|
||||
{
|
||||
using namespace boost::gil;
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ namespace mapnik { namespace detail {
|
|||
template <typename T>
|
||||
struct extract_value
|
||||
{
|
||||
static inline boost::optional<T> do_extract_from_string(std::string const& source)
|
||||
static inline boost::optional<T> do_extract_from_string(std::string const& /*source*/)
|
||||
{
|
||||
std::string err_msg = (boost::format("No conversion from std::string to %s") % typeid(T).name()).str();
|
||||
throw std::runtime_error(err_msg);
|
||||
|
|
|
@ -122,7 +122,7 @@ struct equals
|
|||
}
|
||||
|
||||
template <typename T, typename U>
|
||||
bool operator() (T const& lhs, U const& rhs) const
|
||||
bool operator() (T const& /*lhs*/, U const& /*rhs*/) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -182,7 +182,7 @@ struct not_equals
|
|||
// back compatibility shim to equate empty string with null for != test
|
||||
// https://github.com/mapnik/mapnik/issues/1859
|
||||
// TODO - consider removing entire specialization at Mapnik 3.x
|
||||
bool operator() (value_null lhs,value_unicode_string const& rhs) const
|
||||
bool operator() (value_null /*lhs*/, value_unicode_string const& rhs) const
|
||||
{
|
||||
if (rhs.isEmpty()) return false;
|
||||
return true;
|
||||
|
|
|
@ -47,12 +47,12 @@ typedef bool value_bool;
|
|||
|
||||
struct value_null
|
||||
{
|
||||
bool operator==(value_null const& other) const
|
||||
bool operator==(value_null const& /*other*/) const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool operator!=(value_null const& other) const
|
||||
bool operator!=(value_null const& /*other*/) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -88,11 +88,11 @@ struct value_null
|
|||
}
|
||||
};
|
||||
|
||||
inline std::size_t hash_value(const value_null& val) {
|
||||
inline std::size_t hash_value(const value_null& /*val*/) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline std::ostream& operator<< (std::ostream & out,value_null const& v)
|
||||
inline std::ostream& operator<< (std::ostream & out,value_null const& /*v*/)
|
||||
{
|
||||
return out;
|
||||
}
|
||||
|
|
|
@ -64,6 +64,9 @@
|
|||
#include "agg_conv_clipper.h"
|
||||
#include "agg_path_storage.h"
|
||||
|
||||
// stl
|
||||
#include <stdexcept>
|
||||
|
||||
namespace mapnik {
|
||||
|
||||
struct transform_tag {};
|
||||
|
@ -86,9 +89,9 @@ struct converter_traits
|
|||
typedef T0 geometry_type;
|
||||
typedef geometry_type conv_type;
|
||||
template <typename Args>
|
||||
static void setup(geometry_type & geom, Args const& args)
|
||||
static void setup(geometry_type & geom, Args const& /*args*/)
|
||||
{
|
||||
throw "BOOM!";
|
||||
throw std::runtime_error("invalid call to setup");
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -216,7 +219,7 @@ struct converter_traits<T,mapnik::close_poly_tag>
|
|||
typedef T geometry_type;
|
||||
typedef typename agg::conv_close_polygon<geometry_type> conv_type;
|
||||
template <typename Args>
|
||||
static void setup(geometry_type & geom, Args const& args)
|
||||
static void setup(geometry_type & geom, Args const& /*args*/)
|
||||
{
|
||||
// no-op
|
||||
}
|
||||
|
@ -291,7 +294,7 @@ template <>
|
|||
struct converter_fwd<true>
|
||||
{
|
||||
template <typename Base, typename T0,typename T1,typename T2, typename Iter,typename End>
|
||||
static void forward(Base& base, T0 & geom,T1 const& args)
|
||||
static void forward(Base& base, T0 & geom,T1 const& /*args*/)
|
||||
{
|
||||
base.template dispatch<Iter,End>(geom, typename boost::is_same<Iter,End>::type());
|
||||
}
|
||||
|
|
|
@ -133,23 +133,24 @@ static datasource_map ds_map = boost::assign::map_list_of
|
|||
;
|
||||
#endif
|
||||
|
||||
#ifdef MAPNIK_STATIC_PLUGINS
|
||||
datasource_ptr create_static_datasource(parameters const& params)
|
||||
{
|
||||
datasource_ptr ds;
|
||||
|
||||
#ifdef MAPNIK_STATIC_PLUGINS
|
||||
boost::optional<std::string> type = params.get<std::string>("type");
|
||||
|
||||
datasource_map::iterator it = ds_map.find(*type);
|
||||
|
||||
if (it != ds_map.end())
|
||||
{
|
||||
ds = it->second(params);
|
||||
}
|
||||
#endif
|
||||
|
||||
return ds;
|
||||
}
|
||||
#else
|
||||
datasource_ptr create_static_datasource(parameters const& /*params*/)
|
||||
{
|
||||
return datasource_ptr();
|
||||
}
|
||||
#endif
|
||||
|
||||
std::vector<std::string> get_static_datasource_names()
|
||||
{
|
||||
|
|
|
@ -59,7 +59,7 @@ struct expression_string : boost::static_visitor<void>
|
|||
str_ += "]";
|
||||
}
|
||||
|
||||
void operator() (geometry_type_attribute const& attr) const
|
||||
void operator() (geometry_type_attribute const& /*attr*/) const
|
||||
{
|
||||
str_ += "[mapnik::geometry_type]";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue