mem-ruby: Added M5_CLASS_VAR_USED to m_id in OutputUnit
authorBobby R. Bruce <bbruce@ucdavis.edu>
Tue, 19 May 2020 15:58:41 +0000 (08:58 -0700)
committerBobby R. Bruce <bbruce@ucdavis.edu>
Wed, 20 May 2020 01:02:33 +0000 (01:02 +0000)
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 <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/mem/ruby/network/garnet2.0/OutputUnit.hh

index c720888c126304aec566f00b27e2083af7869645..dbb35eeed605f71926b61f5f5c2406f0ba2b4448 100644 (file)
@@ -35,6 +35,7 @@
 #include <iostream>
 #include <vector>
 
+#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;