[Lemon-commits] Alpar Juttner: Further clang compilation fixes (...

Lemon HG hg at lemon.cs.elte.hu
Fri Sep 14 13:32:39 CEST 2012


details:   http://lemon.cs.elte.hu/hg/lemon/rev/00f8d9f9920d
changeset: 1160:00f8d9f9920d
user:      Alpar Juttner <alpar [at] cs.elte.hu>
date:      Thu Sep 13 12:02:27 2012 +0200
description:
	Further clang compilation fixes (#449)

diffstat:

 lemon/planarity.h                |  1 -
 test/bellman_ford_test.cc        |  2 +-
 test/digraph_test.cc             |  1 +
 test/fractional_matching_test.cc |  2 ++
 4 files changed, 4 insertions(+), 2 deletions(-)

diffs (53 lines):

diff --git a/lemon/planarity.h b/lemon/planarity.h
--- a/lemon/planarity.h
+++ b/lemon/planarity.h
@@ -72,7 +72,6 @@
       }
 
       void discover(const Arc& arc) {
-        Node source = _graph.source(arc);
         Node target = _graph.target(arc);
 
         _tree_map[arc] = true;
diff --git a/test/bellman_ford_test.cc b/test/bellman_ford_test.cc
--- a/test/bellman_ford_test.cc
+++ b/test/bellman_ford_test.cc
@@ -190,7 +190,7 @@
   check(pathTarget(gr, p) == t, "path() found a wrong path.");
 
   ListPath<Digraph> path;
-  Value dist;
+  Value dist = 0;
   bool reached = bellmanFord(gr,length).path(path).dist(dist).run(s,t);
 
   check(reached && dist == -1, "Bellman-Ford found a wrong path.");
diff --git a/test/digraph_test.cc b/test/digraph_test.cc
--- a/test/digraph_test.cc
+++ b/test/digraph_test.cc
@@ -442,6 +442,7 @@
     a2 = g.addArc(n2, n1),
     a3 = g.addArc(n2, n3),
     a4 = g.addArc(n2, n3);
+  ignore_unused_variable_warning(a2,a3,a4);
 
   digraphCopy(g, G).nodeRef(nref).run();
 
diff --git a/test/fractional_matching_test.cc b/test/fractional_matching_test.cc
--- a/test/fractional_matching_test.cc
+++ b/test/fractional_matching_test.cc
@@ -342,6 +342,7 @@
       check(indeg == 1, "Invalid matching");
       pv += weight[mwfm.matching(n)];
       SmartGraph::Node o = graph.target(mwfm.matching(n));
+      ignore_unused_variable_warning(o);
     } else {
       check(mwfm.nodeValue(n) == 0, "Invalid matching");
       check(indeg == 0, "Invalid matching");
@@ -406,6 +407,7 @@
     check(indeg == 1, "Invalid perfect matching");
     pv += weight[mwpfm.matching(n)];
     SmartGraph::Node o = graph.target(mwpfm.matching(n));
+    ignore_unused_variable_warning(o);
   }
 
   for (SmartGraph::EdgeIt e(graph); e != INVALID; ++e) {



More information about the Lemon-commits mailing list