Fix for g++ 4 warning... not sure why this is just popping up now.
authorSteve Reinhardt <stever@eecs.umich.edu>
Fri, 14 Oct 2005 03:47:31 +0000 (23:47 -0400)
committerSteve Reinhardt <stever@eecs.umich.edu>
Fri, 14 Oct 2005 03:47:31 +0000 (23:47 -0400)
sim/system.hh:
    Fix for g++ 4.

--HG--
extra : convert_revision : e169220ba9ca34ebd4ba2bbafadf8de42f005812

sim/system.hh

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