Compiler: Fixes for GCC 4.5.
authorAli Saidi <Ali.Saidi@ARM.com>
Mon, 23 Aug 2010 16:18:39 +0000 (11:18 -0500)
committerAli Saidi <Ali.Saidi@ARM.com>
Mon, 23 Aug 2010 16:18:39 +0000 (11:18 -0500)
src/arch/arm/table_walker.cc
src/mem/cache/tags/iic_repl/gen.cc
src/sim/serialize.cc

index 937d51b87e9d19f4c4b99bf552fa0d6dd6db2228..9bf067b81db9f08ffba6e98e7781544c92907544 100644 (file)
@@ -51,7 +51,7 @@ TableWalker::TableWalker(const Params *p)
     : MemObject(p), stateQueue(NUM_WALKERS), port(NULL), tlb(NULL),
       currState(NULL), doL1DescEvent(this), doL2DescEvent(this)
 {
-    sctlr = NULL;
+    sctlr = 0;
 }
 
 TableWalker::~TableWalker()
@@ -419,7 +419,7 @@ TableWalker::doL1Descriptor()
                 new PrefetchAbort(currState->vaddr, ArmFault::Translation0);
         else
             currState->fault =
-                new DataAbort(currState->vaddr, NULL, currState->isWrite,
+                new DataAbort(currState->vaddr, 0, currState->isWrite,
                                   ArmFault::Translation0);
         return;
       case L1Descriptor::Section:
@@ -532,7 +532,7 @@ TableWalker::doL2Descriptor()
           */
 
         currState->fault =
-            new DataAbort(currState->vaddr, NULL, currState->isWrite,
+            new DataAbort(currState->vaddr, 0, currState->isWrite,
                           ArmFault::AccessFlag1);
 
     }
index 1008c3a7ce5abfcc8bfd66bb52e8e86e150ee760..0d1b30220294ad57bec7388a56e5d602bf1425ab 100644 (file)
@@ -47,7 +47,7 @@ using namespace std;
 GenRepl::GenRepl(const Params *p) // fix this, should be set by cache
     : Repl(p), num_pools(p->num_pools), fresh_res(p->fresh_res),
       pool_res(p->pool_res), num_entries(0), num_pool_entries(0), misses(0),
-      pools(pools = new GenPool[num_pools+1])
+      pools(new GenPool[num_pools+1])
 {
 }
 
index d6d5ac0947d8373cddc65967043f1f961dc5f9a8..aa343d0e9c2ed7569574ad866f0fbef44d414754 100644 (file)
@@ -269,7 +269,7 @@ arrayParamIn(Checkpoint *cp, const string &section, const string &name,
         // for which operator[] returns a special reference class
         // that's not the same as 'bool&', (since it's a packed
         // vector)
-        T scalar_value;
+        T scalar_value = 0;
         if (!parseParam(tokens[i], scalar_value)) {
             string err("could not parse \"");
 
@@ -311,7 +311,7 @@ arrayParamIn(Checkpoint *cp, const string &section,
         // for which operator[] returns a special reference class
         // that's not the same as 'bool&', (since it's a packed
         // vector)
-        T scalar_value;
+        T scalar_value = 0;
         if (!parseParam(tokens[i], scalar_value)) {
             string err("could not parse \"");