Fix for g++ 4 warning... not sure why this is just popping up now.

sim/system.hh:
    Fix for g++ 4.

--HG--
extra : convert_revision : e169220ba9ca34ebd4ba2bbafadf8de42f005812
This commit is contained in:
Steve Reinhardt 2005-10-13 23:47:31 -04:00
parent 67b807d907
commit 2a1350e168

View file

@ -118,7 +118,7 @@ class System : public SimObject
template <class T> template <class T>
T *System::addFuncEvent(SymbolTable *symtab, const char *lbl) T *System::addFuncEvent(SymbolTable *symtab, const char *lbl)
{ {
Addr addr; Addr addr = 0; // initialize only to avoid compiler warning
if (symtab->findAddress(lbl, addr)) { if (symtab->findAddress(lbl, addr)) {
T *ev = new T(&pcEventQueue, lbl, fixFuncEventAddr(addr)); T *ev = new T(&pcEventQueue, lbl, fixFuncEventAddr(addr));