stats: Add M5_VAR_USED to variable
authorTommaso Marinelli <tommarin@ucm.es>
Tue, 10 Sep 2019 11:21:39 +0000 (13:21 +0200)
committerTommaso Marinelli <tommarin@ucm.es>
Tue, 10 Sep 2019 19:02:08 +0000 (19:02 +0000)
Fixes compile error for gem5.fast due to unused variable.

Change-Id: Ib1664b100e95a741174610f8cdbdebaff9635f66
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20759
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/base/stats/group.cc

index 2bfc89d00860d3a2ad3b765b59eeee1cfe7259ec..b1504275a6e7926eb6ee67d8fb5b91288c86be2f 100644 (file)
@@ -70,7 +70,8 @@ Group::regStats()
 
     for (auto &g : statGroups) {
         if (DTRACE(Stats)) {
-            const SimObject *so = dynamic_cast<const SimObject *>(this);
+            const SimObject M5_VAR_USED *so =
+                dynamic_cast<const SimObject *>(this);
             DPRINTF(Stats, "%s: regStats in group %s\n",
                     so ? so->name() : "?",
                     g.first);