at v192 3.0 kB view raw
1Description: Fix ftbfs with GCC-4.7. 2Author: Mònica Ramírez Arceda <monica@debian.org> 3Bug-Debian: http://bugs.debian.org/667326 4Last-Update: 2012-05-11 5 6--- a/src/xstd/Heap.h 7+++ b/src/xstd/Heap.h 8@@ -23,7 +23,7 @@ 9 const Item &top() const { return this->theItems[1]; } 10 Item &at(int idx) { return this->theItems[idx+1]; } 11 12- void add(Item v) { append(v); floatUp(++theCnt); } 13+ void add(Item v) { this->append(v); floatUp(++theCnt); } 14 void skip() { this->theItems[1] = this->theItems[theCnt--]; this->theCount--; sinkDown(1); } 15 Item shift() { const Item v = this->theItems[1]; skip(); return v; } 16 17--- a/src/xstd/Ring.h 18+++ b/src/xstd/Ring.h 19@@ -22,11 +22,11 @@ 20 int size() const { return Array<Item>::size(); } 21 bool empty() const { return this->theInOff <= this->theOutOff; } 22 bool full() const { return count() >= this->theCapacity; } 23- const Item &top(int off = 0) const { return item((this->theOutOff+off) % this->theCapacity); } 24+ const Item &top(int off = 0) const { return this->item((this->theOutOff+off) % this->theCapacity); } 25 26- Item &top(int off = 0) { return item((this->theOutOff+off) % this->theCapacity); } 27- void enqueue(Item i) { Assert(!full()); item(this->theInOff++ % this->theCapacity) = i; check(); } 28- Item dequeue() { return item(this->theOutOff++ % this->theCapacity); } 29+ Item &top(int off = 0) { return this->item((this->theOutOff+off) % this->theCapacity); } 30+ void enqueue(Item i) { Assert(!full()); this->item(this->theInOff++ % this->theCapacity) = i; check(); } 31+ Item dequeue() { return this->item(this->theOutOff++ % this->theCapacity); } 32 33 void reset() { this->theInOff = this->theOutOff = 0; } 34 inline void resize(int aCap); 35--- a/src/runtime/StatPhase.cc 36+++ b/src/runtime/StatPhase.cc 37@@ -413,12 +413,12 @@ 38 break; 39 } 40 } else { 41- static CompoundXactInfo &compound = *CompoundXactInfo::Create(); 42- compound.exchanges = 1; 43- compound.reqSize = reqSize; 44- compound.repSize = repSize; 45- compound.lifeTime = repTime; 46- compound.record(rec.theIsolated); 47+ static CompoundXactInfo &compound2 = *CompoundXactInfo::Create(); 48+ compound2.exchanges = 1; 49+ compound2.reqSize = reqSize; 50+ compound2.repSize = repSize; 51+ compound2.lifeTime = repTime; 52+ compound2.record(rec.theIsolated); 53 } 54 55 if (x->cookiesSent() > 0) 56--- a/src/cache/CacheEntryHash.cc 57+++ b/src/cache/CacheEntryHash.cc 58@@ -14,7 +14,7 @@ 59 60 CacheEntryHash::CacheEntryHash(int aCapacity): theCount(0) { 61 theCapacity = (aCapacity + aCapacity/3 + 7) | 1; 62- theIndex = new (CacheEntry*[theCapacity]); 63+ theIndex = new (CacheEntry*[this->theCapacity]); 64 memset(theIndex, 0, sizeof(CacheEntry*)*theCapacity); 65 } 66 67--- a/src/tools/IntIntHash.cc 68+++ b/src/tools/IntIntHash.cc 69@@ -13,7 +13,7 @@ 70 71 IntIntHash::IntIntHash(int aCapacity): theHashCap(0) { 72 theHashCap = (aCapacity + aCapacity/3 + 7) | 1; 73- theIndex = new (IntIntHashItem*[theHashCap]); 74+ theIndex = new (IntIntHashItem*[this->theHashCap]); 75 memset(theIndex, 0, sizeof(IntIntHashItem*)*theHashCap); 76 } 77