Avoid GCC 4.7 compiler warnings (#453)
authorAlpar Juttner <alpar@cs.elte.hu>
Wed, 28 Nov 2012 11:41:40 +0100
changeset 10077e368d9b67f7
parent 1005 c5990f454032
child 1008 d216e1c8b3fa
child 1015 d32e4453b48c
Avoid GCC 4.7 compiler warnings (#453)
lemon/concepts/graph_components.h
test/bfs_test.cc
test/circulation_test.cc
test/dfs_test.cc
test/dijkstra_test.cc
test/gomory_hu_test.cc
test/hao_orlin_test.cc
test/matching_test.cc
test/min_cost_arborescence_test.cc
test/preflow_test.cc
test/suurballe_test.cc
     1.1 --- a/lemon/concepts/graph_components.h	Wed Mar 28 19:39:56 2012 +0200
     1.2 +++ b/lemon/concepts/graph_components.h	Wed Nov 28 11:41:40 2012 +0100
     1.3 @@ -108,6 +108,8 @@
     1.4            i1 = i2 = i3;
     1.5  
     1.6            bool b;
     1.7 +          ignore_unused_variable_warning(b);
     1.8 +
     1.9            b = (ia == ib) && (ia != ib);
    1.10            b = (ia == INVALID) && (ib != INVALID);
    1.11            b = (ia < ib);
     2.1 --- a/test/bfs_test.cc	Wed Mar 28 19:39:56 2012 +0200
     2.2 +++ b/test/bfs_test.cc	Wed Nov 28 11:41:40 2012 +0100
     2.3 @@ -61,6 +61,7 @@
     2.4    Node s, t, n;
     2.5    Arc e;
     2.6    int l, i;
     2.7 +  ignore_unused_variable_warning(l,i);
     2.8    bool b;
     2.9    BType::DistMap d(G);
    2.10    BType::PredMap p(G);
    2.11 @@ -150,6 +151,8 @@
    2.12  
    2.13    Digraph g;
    2.14    bool b;
    2.15 +  ignore_unused_variable_warning(b);
    2.16 +
    2.17    bfs(g).run(Node());
    2.18    b=bfs(g).run(Node(),Node());
    2.19    bfs(g).run();
     3.1 --- a/test/circulation_test.cc	Wed Mar 28 19:39:56 2012 +0200
     3.2 +++ b/test/circulation_test.cc	Wed Nov 28 11:41:40 2012 +0100
     3.3 @@ -73,6 +73,7 @@
     3.4    BarrierMap bar;
     3.5    VType v;
     3.6    bool b;
     3.7 +  ignore_unused_variable_warning(v,b);
     3.8  
     3.9    typedef Circulation<Digraph, CapMap, CapMap, SupplyMap>
    3.10              ::SetFlowMap<FlowMap>
     4.1 --- a/test/dfs_test.cc	Wed Mar 28 19:39:56 2012 +0200
     4.2 +++ b/test/dfs_test.cc	Wed Nov 28 11:41:40 2012 +0100
     4.3 @@ -67,6 +67,8 @@
     4.4    Arc e;
     4.5    int l, i;
     4.6    bool b;
     4.7 +  ignore_unused_variable_warning(l,i,b);
     4.8 +
     4.9    DType::DistMap d(G);
    4.10    DType::PredMap p(G);
    4.11    Path<Digraph> pp;
    4.12 @@ -151,6 +153,8 @@
    4.13  
    4.14    Digraph g;
    4.15    bool b;
    4.16 +  ignore_unused_variable_warning(b);
    4.17 +
    4.18    dfs(g).run(Node());
    4.19    b=dfs(g).run(Node(),Node());
    4.20    dfs(g).run();
     5.1 --- a/test/dijkstra_test.cc	Wed Mar 28 19:39:56 2012 +0200
     5.2 +++ b/test/dijkstra_test.cc	Wed Nov 28 11:41:40 2012 +0100
     5.3 @@ -65,6 +65,8 @@
     5.4    VType l;
     5.5    int i;
     5.6    bool b;
     5.7 +  ignore_unused_variable_warning(l,i,b);
     5.8 +
     5.9    DType::DistMap d(G);
    5.10    DType::PredMap p(G);
    5.11    LengthMap length;
    5.12 @@ -162,6 +164,8 @@
    5.13  
    5.14    Digraph g;
    5.15    bool b;
    5.16 +  ignore_unused_variable_warning(b);
    5.17 +
    5.18    dijkstra(g,LengthMap()).run(Node());
    5.19    b=dijkstra(g,LengthMap()).run(Node(),Node());
    5.20    dijkstra(g,LengthMap())
     6.1 --- a/test/gomory_hu_test.cc	Wed Mar 28 19:39:56 2012 +0200
     6.2 +++ b/test/gomory_hu_test.cc	Wed Nov 28 11:41:40 2012 +0100
     6.3 @@ -50,6 +50,7 @@
     6.4    CutMap cut;
     6.5    Value v;
     6.6    int d;
     6.7 +  ignore_unused_variable_warning(v,d);
     6.8  
     6.9    GomoryHu<Graph, CapMap> gh_test(g, cap);
    6.10    const GomoryHu<Graph, CapMap>&
     7.1 --- a/test/hao_orlin_test.cc	Wed Mar 28 19:39:56 2012 +0200
     7.2 +++ b/test/hao_orlin_test.cc	Wed Nov 28 11:41:40 2012 +0100
     7.3 @@ -66,6 +66,7 @@
     7.4    CapMap cap;
     7.5    CutMap cut;
     7.6    Value v;
     7.7 +  ignore_unused_variable_warning(v);
     7.8  
     7.9    HaoOrlin<Digraph, CapMap> ho_test(g, cap);
    7.10    const HaoOrlin<Digraph, CapMap>&
     8.1 --- a/test/matching_test.cc	Wed Mar 28 19:39:56 2012 +0200
     8.2 +++ b/test/matching_test.cc	Wed Nov 28 11:41:40 2012 +0100
     8.3 @@ -145,6 +145,7 @@
     8.4  
     8.5    MaxMatching<Graph>::Status stat = 
     8.6      const_mat_test.status(n);
     8.7 +  ignore_unused_variable_warning(stat);
     8.8    const MaxMatching<Graph>::StatusMap& smap =
     8.9      const_mat_test.statusMap();
    8.10    stat = smap[n];
     9.1 --- a/test/min_cost_arborescence_test.cc	Wed Mar 28 19:39:56 2012 +0200
     9.2 +++ b/test/min_cost_arborescence_test.cc	Wed Nov 28 11:41:40 2012 +0100
     9.3 @@ -91,6 +91,7 @@
     9.4    Arc e;
     9.5    VType c;
     9.6    bool b;
     9.7 +  ignore_unused_variable_warning(c,b);
     9.8    int i;
     9.9    CostMap cost;
    9.10    ArbMap arb;
    10.1 --- a/test/preflow_test.cc	Wed Mar 28 19:39:56 2012 +0200
    10.2 +++ b/test/preflow_test.cc	Wed Nov 28 11:41:40 2012 +0100
    10.3 @@ -86,6 +86,7 @@
    10.4    CutMap cut;
    10.5    VType v;
    10.6    bool b;
    10.7 +  ignore_unused_variable_warning(v,b);
    10.8  
    10.9    typedef Preflow<Digraph, CapMap>
   10.10              ::SetFlowMap<FlowMap>
    11.1 --- a/test/suurballe_test.cc	Wed Mar 28 19:39:56 2012 +0200
    11.2 +++ b/test/suurballe_test.cc	Wed Nov 28 11:41:40 2012 +0100
    11.3 @@ -107,6 +107,8 @@
    11.4    
    11.5    int f;
    11.6    VType c;
    11.7 +  ignore_unused_variable_warning(f,c);
    11.8 +
    11.9    c = const_suurb_test.totalLength();
   11.10    f = const_suurb_test.flow(e);
   11.11    const SuurballeType::FlowMap& fm =