more warning fixes for g++-4.9

This commit is contained in:
Dane Springmeyer 2016-01-21 13:39:30 -08:00
parent 353d082a61
commit a9d58ee894
2 changed files with 12 additions and 5 deletions

View file

@ -330,8 +330,15 @@ private:
} }
} }
} }
// Avoid spurious warning from g++ (seen with 4.9)
// around continue_loop not being used.
// This is important to suppress: because of the template
// metaprogramming involved this warning otherwise may be
// repeated so many times as to fill up travis logs to the
// point of failure
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
status init_vertices() status init_vertices()
{ {
if (status_ != initial) // already initialized if (status_ != initial) // already initialized
@ -482,8 +489,7 @@ private:
} }
start_v2.x = v2.x; start_v2.x = v2.x;
start_v2.y = v2.y; start_v2.y = v2.y;
bool continue_loop; bool continue_loop = true;
continue_loop = true;
vertex2d tmp_prev(vertex2d::no_init); vertex2d tmp_prev(vertex2d::no_init);
while (i < points.size()) while (i < points.size())
@ -629,6 +635,7 @@ private:
// initialization finished // initialization finished
return status_ = process; return status_ = process;
} }
#pragma GCC diagnostic pop
unsigned output_vertex(double* px, double* py) unsigned output_vertex(double* px, double* py)
{ {

View file

@ -1161,7 +1161,7 @@ namespace std
{ {
#pragma GCC diagnostic push #pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmismatched-tags" #include <mapnik/warning_ignore.hpp>
template <> template <>
struct hash<mapnik::value> struct hash<mapnik::value>