From: Tushar Krishna Date: Fri, 7 Oct 2016 01:06:00 +0000 (-0400) Subject: ruby: Add M5_VAR_USED before variables used only inside assert in garnet2.0. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=22e6f65d7230e90f0a8032567f8c313d0e83a30c;p=gem5.git ruby: Add M5_VAR_USED before variables used only inside assert in garnet2.0. This removes errors when building gem5.fast --- diff --git a/src/mem/ruby/network/garnet2.0/RoutingUnit.cc b/src/mem/ruby/network/garnet2.0/RoutingUnit.cc index aa5ff53c1..695f50ee5 100644 --- a/src/mem/ruby/network/garnet2.0/RoutingUnit.cc +++ b/src/mem/ruby/network/garnet2.0/RoutingUnit.cc @@ -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; }