From 22e6f65d7230e90f0a8032567f8c313d0e83a30c Mon Sep 17 00:00:00 2001 From: Tushar Krishna Date: Thu, 6 Oct 2016 21:06:00 -0400 Subject: [PATCH] ruby: Add M5_VAR_USED before variables used only inside assert in garnet2.0. This removes errors when building gem5.fast --- src/mem/ruby/network/garnet2.0/RoutingUnit.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- 2.30.2