From ebf5755cce7103b0cc9b03b023cd5c6aed379b75 Mon Sep 17 00:00:00 2001 From: "Bobby R. Bruce" Date: Tue, 19 May 2020 08:58:41 -0700 Subject: [PATCH] mem-ruby: Added M5_CLASS_VAR_USED to m_id in OutputUnit Clang 9 throws an error that 'm_id' is unused (encountered when compiling X86.fast). M5_CLASS_VAR_USED has been added to avoid this error. Change-Id: I722edd1429a074ff484b5ebbdc431af0089561b5 Issue-on: https://gem5.atlassian.net/browse/GEM5-560 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29304 Maintainer: Bobby R. Bruce Reviewed-by: Jason Lowe-Power Tested-by: kokoro --- src/mem/ruby/network/garnet2.0/OutputUnit.hh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mem/ruby/network/garnet2.0/OutputUnit.hh b/src/mem/ruby/network/garnet2.0/OutputUnit.hh index c720888c1..dbb35eeed 100644 --- a/src/mem/ruby/network/garnet2.0/OutputUnit.hh +++ b/src/mem/ruby/network/garnet2.0/OutputUnit.hh @@ -35,6 +35,7 @@ #include #include +#include "base/compiler.hh" #include "mem/ruby/common/Consumer.hh" #include "mem/ruby/network/garnet2.0/CommonTypes.hh" #include "mem/ruby/network/garnet2.0/NetworkLink.hh" @@ -91,7 +92,7 @@ class OutputUnit : public Consumer private: Router *m_router; - int m_id; + int M5_CLASS_VAR_USED m_id; PortDirection m_direction; int m_vc_per_vnet; NetworkLink *m_out_link; -- 2.30.2