From: Andreas Hansson Date: Thu, 5 Sep 2013 17:53:54 +0000 (-0400) Subject: sim: Fix clang warning for unused variable X-Git-Tag: stable_2014_02_15~148 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=53cf77cf18fa44ed60ad586fb9add661853b205a;p=gem5.git sim: Fix clang warning for unused variable This patch ensures the NULL ISA can build without causing issues with an unused variable. --- diff --git a/src/sim/system.hh b/src/sim/system.hh index 5b166eabf..c8945c8c1 100644 --- a/src/sim/system.hh +++ b/src/sim/system.hh @@ -380,7 +380,7 @@ class System : public MemObject T *addFuncEvent(const SymbolTable *symtab, const char *lbl, const std::string &desc, Args... args) { - Addr addr = 0; // initialize only to avoid compiler warning + Addr addr M5_VAR_USED = 0; // initialize only to avoid compiler warning #if THE_ISA != NULL_ISA if (symtab->findAddress(lbl, addr)) {