Skip to content

Commit bd10fa6

Browse files
authored
Merge pull request #512 from Becheler/fix/example-unused-warnings
fix: silence -Wunused-local-typedef and -Wunused-variable in four examples
2 parents 7012e97 + 30013ad commit bd10fa6

4 files changed

Lines changed: 3 additions & 2 deletions

File tree

example/graph-assoc-types.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//=======================================================================
88
#include <boost/graph/graph_traits.hpp>
99
#include <boost/graph/adjacency_list.hpp>
10+
#include <boost/core/ignore_unused.hpp>
1011

1112
using namespace boost;
1213

@@ -21,6 +22,7 @@ template < typename Graph > void generic_foo(Graph& g)
2122
// Access iterator types...
2223
// Access size types...
2324
// Now do something useful...
25+
boost::ignore_unused< Vertex, Edge, Dir, Par >();
2426
}
2527

2628
template < typename Graph > void generic_bar(Graph& g)

example/minimum_degree_ordering.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ struct harwell_boeing
4242
{
4343
harwell_boeing(char* filename)
4444
{
45-
int Nrhs;
4645
char* Type;
4746
Type = new char[4];
4847
isComplex = false;

example/quick-tour.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ template < typename Graph, typename VertexNameMap >
3131
void print_vertex_names(const Graph& g, VertexNameMap name_map)
3232
{
3333
std::cout << "vertices(g) = { ";
34-
using iter_t = typename graph_traits< Graph >::vertex_iterator;
3534
for (auto p = vertices(g); p.first != p.second; ++p.first)
3635
{
3736
print_vertex_name(*p.first, name_map);

example/two_graphs_common_spanning_trees.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ int main(int argc, char** argv)
5757
for (auto const & vec : coll)
5858
{
5959
// Here you can play with the trees that the algorithm has found.
60+
(void) vec;
6061
}
6162

6263
return 0;

0 commit comments

Comments
 (0)