ruby: Add M5_VAR_USED before variables used only inside assert in garnet2.0.
authorTushar Krishna <tushar@ece.gatech.edu>
Fri, 7 Oct 2016 01:06:00 +0000 (21:06 -0400)
committerTushar Krishna <tushar@ece.gatech.edu>
Fri, 7 Oct 2016 01:06:00 +0000 (21:06 -0400)
This removes errors when building gem5.fast

src/mem/ruby/network/garnet2.0/RoutingUnit.cc

index aa5ff53c192e41c9f4c16da79b4da81cb898cdf1..695f50ee581a20437b25127ad493f765e677d7a3 100644 (file)
@@ -181,7 +181,7 @@ RoutingUnit::outportComputeXY(RouteInfo route,
 {
     PortDirection outport_dirn = "Unknown";
 
-    int num_rows = m_router->get_net_ptr()->getNumRows();
+    int M5_VAR_USED num_rows = m_router->get_net_ptr()->getNumRows();
     int num_cols = m_router->get_net_ptr()->getNumCols();
     assert(num_rows > 0 && num_cols > 0);
 
@@ -238,4 +238,5 @@ RoutingUnit::outportComputeCustom(RouteInfo route,
                                  PortDirection inport_dirn)
 {
     assert(0);
+    return -1;
 }