Commit 118f8b2e authored by unknown's avatar unknown

ndb - bug#18295

  rewrite/clean up code a bit to avoid a gcc4 compiler bug


storage/ndb/src/kernel/vm/DLFifoList.hpp:
  Fix compiler bug
storage/ndb/src/kernel/vm/DLList.hpp:
  Fix compiler bug
storage/ndb/src/kernel/vm/SLList.hpp:
  Fix compiler bug
parent 61e3fea2
...@@ -312,15 +312,16 @@ inline ...@@ -312,15 +312,16 @@ inline
void void
DLFifoListImpl<P,T,U>::release() DLFifoListImpl<P,T,U>::release()
{ {
Ptr<T> p; Ptr<T> ptr;
while(head.firstItem != RNIL) Uint32 curr = head.firstItem;
while(curr != RNIL)
{ {
p.i = head.firstItem; thePool.getPtr(ptr, curr);
p.p = thePool.getPtr(head.firstItem); curr = ptr.p->U::nextList;
T * t = p.p; thePool.release(ptr);
head.firstItem = t->U::nextList;
release(p);
} }
head.firstItem = RNIL;
head.lastItem = RNIL;
} }
template <typename P, typename T, typename U> template <typename P, typename T, typename U>
......
...@@ -332,12 +332,14 @@ void ...@@ -332,12 +332,14 @@ void
DLListImpl<P,T,U>::release() DLListImpl<P,T,U>::release()
{ {
Ptr<T> ptr; Ptr<T> ptr;
while((ptr.i = head.firstItem) != RNIL) Uint32 curr = head.firstItem;
while(curr != RNIL)
{ {
thePool.getPtr(ptr); thePool.getPtr(ptr, curr);
head.firstItem = ptr.p->U::nextList; curr = ptr.p->U::nextList;
thePool.release(ptr); thePool.release(ptr);
} }
head.firstItem = RNIL;
} }
template <typename P, typename T, typename U> template <typename P, typename T, typename U>
......
...@@ -302,12 +302,14 @@ void ...@@ -302,12 +302,14 @@ void
SLListImpl<P, T, U>::release() SLListImpl<P, T, U>::release()
{ {
Ptr<T> ptr; Ptr<T> ptr;
while((ptr.i = head.firstItem) != RNIL) Uint32 curr = head.firstItem;
while(curr != RNIL)
{ {
thePool.getPtr(ptr); thePool.getPtr(ptr, curr);
head.firstItem = ptr.p->U::nextList; curr = ptr.p->U::nextList;
thePool.release(ptr); thePool.release(ptr);
} }
head.firstItem = RNIL;
} }
template <typename P, typename T, typename U> template <typename P, typename T, typename U>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment