Przeglądaj źródła

Merge branch 'candidate-6.4.0'

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 8 lat temu
rodzic
commit
dd5e0dfc87
100 zmienionych plików z 418 dodań i 418 usunięć
  1. 1 1
      cmake_modules/commonSetup.cmake
  2. 5 5
      common/deftype/deftype.cpp
  3. 1 1
      common/fileview2/fvdsremote.cpp
  4. 1 1
      common/fileview2/fvidxsource.cpp
  5. 1 1
      common/fileview2/fvsource.cpp
  6. 5 5
      common/fileview2/fvtransform.cpp
  7. 1 1
      common/fileview2/fvwusource.cpp
  8. 2 2
      common/remote/rmtsmtp.cpp
  9. 1 1
      common/remote/rmtspawn.cpp
  10. 3 3
      common/remote/rmtssh.cpp
  11. 15 15
      common/remote/sockfile.cpp
  12. 4 4
      common/roxiecommlib/roxiecommunicationclient.cpp
  13. 2 2
      common/thorhelper/roxiedebug.cpp
  14. 11 11
      common/thorhelper/roxiehelper.cpp
  15. 1 1
      common/thorhelper/roxierow.cpp
  16. 5 5
      common/thorhelper/thorcommon.cpp
  17. 1 1
      common/thorhelper/thorparse.cpp
  18. 2 2
      common/thorhelper/thorpipe.cpp
  19. 5 5
      common/thorhelper/thorrparse.cpp
  20. 6 6
      common/thorhelper/thorsoapcall.cpp
  21. 2 2
      common/thorhelper/thorsort.cpp
  22. 16 16
      common/thorhelper/thorstep.cpp
  23. 2 2
      common/thorhelper/thorstep.ipp
  24. 1 1
      common/thorhelper/thorstep2.cpp
  25. 13 13
      common/thorhelper/thorstrand.cpp
  26. 6 6
      common/thorhelper/thortalgo.cpp
  27. 2 2
      common/thorhelper/thortlex.cpp
  28. 1 1
      common/thorhelper/thortparse.cpp
  29. 4 4
      common/thorhelper/thorxmlread.cpp
  30. 1 1
      common/thorhelper/thorxmlwrite.cpp
  31. 11 11
      common/workunit/workunit.cpp
  32. 8 8
      common/workunit/wujobq.cpp
  33. 3 3
      dali/base/daaudit.cpp
  34. 1 1
      dali/base/daclient.cpp
  35. 1 1
      dali/base/dacoven.cpp
  36. 1 1
      dali/base/dacsds.cpp
  37. 1 1
      dali/base/dacsds.ipp
  38. 19 19
      dali/base/dadfs.cpp
  39. 7 7
      dali/base/dafdesc.cpp
  40. 1 1
      dali/base/dalock.cpp
  41. 37 37
      dali/base/dasds.cpp
  42. 1 1
      dali/base/dasds.ipp
  43. 3 3
      dali/base/dasess.cpp
  44. 18 18
      dali/base/dautils.cpp
  45. 1 1
      dali/dafilesrv/dafscontrol.cpp
  46. 5 5
      dali/daliadmin/daliadmin.cpp
  47. 6 6
      dali/dalidiag/dalidiag.cpp
  48. 7 7
      dali/datest/datest.cpp
  49. 2 2
      dali/datest/floodtest.cpp
  50. 1 1
      dali/dfu/dfurepl.cpp
  51. 1 1
      dali/dfu/dfurun.cpp
  52. 1 1
      dali/dfu/dfuserver.cpp
  53. 8 8
      dali/dfu/dfuwu.cpp
  54. 3 3
      dali/dfuXRefLib/XRefFilesNode.cpp
  55. 3 3
      dali/dfuXRefLib/dfurdir.cpp
  56. 7 7
      dali/dfuXRefLib/dfuxreflib.cpp
  57. 1 1
      dali/dfuplus/dfuplus.cpp
  58. 3 3
      dali/ft/daftdir.cpp
  59. 5 5
      dali/ft/daftformat.cpp
  60. 4 4
      dali/ft/filecopy.cpp
  61. 1 1
      dali/ft/fttransform.cpp
  62. 2 2
      dali/fuse/dafuse.cpp
  63. 1 1
      dali/sasha/sacmd.cpp
  64. 1 1
      dali/sasha/sacoalescer.cpp
  65. 2 2
      dali/sasha/saxref.cpp
  66. 1 1
      dali/security/capmaker.cpp
  67. 1 1
      ecl/ecl-bundle/ecl-bundle.cpp
  68. 7 7
      ecl/eclagent/eclagent.cpp
  69. 2 2
      ecl/eclagent/eclgraph.cpp
  70. 2 2
      ecl/eclcc/eclcc.cpp
  71. 1 1
      ecl/eclccserver/eclccserver.cpp
  72. 2 2
      ecl/eclcmd/eclcmd_common.cpp
  73. 2 2
      ecl/eclplus/main.cpp
  74. 5 5
      ecl/hql/hqlattr.cpp
  75. 1 1
      ecl/hql/hqldsparam.cpp
  76. 2 2
      ecl/hql/hqlesp.cpp
  77. 19 19
      ecl/hql/hqlexpr.cpp
  78. 8 8
      ecl/hql/hqlgram2.cpp
  79. 2 2
      ecl/hql/hqlir.cpp
  80. 1 1
      ecl/hql/hqlmeta.cpp
  81. 3 3
      ecl/hql/hqlopt.cpp
  82. 2 2
      ecl/hql/hqlparse.cpp
  83. 1 1
      ecl/hql/hqlpmap.cpp
  84. 5 5
      ecl/hql/hqlpregex.cpp
  85. 1 1
      ecl/hql/hqlrepository.cpp
  86. 3 3
      ecl/hql/hqlthql.cpp
  87. 7 7
      ecl/hql/hqltrans.cpp
  88. 2 2
      ecl/hql/hqlusage.cpp
  89. 12 12
      ecl/hql/hqlutil.cpp
  90. 1 1
      ecl/hqlcpp/hqlalias.cpp
  91. 3 3
      ecl/hqlcpp/hqlckey.cpp
  92. 4 4
      ecl/hqlcpp/hqlcpp.cpp
  93. 3 3
      ecl/hqlcpp/hqlcppds.cpp
  94. 1 1
      ecl/hqlcpp/hqlcpputil.cpp
  95. 2 2
      ecl/hqlcpp/hqlcse.cpp
  96. 3 3
      ecl/hqlcpp/hqlecl.cpp
  97. 2 2
      ecl/hqlcpp/hqlhoist.cpp
  98. 8 8
      ecl/hqlcpp/hqlhtcpp.cpp
  99. 1 1
      ecl/hqlcpp/hqlinline.cpp
  100. 0 0
      ecl/hqlcpp/hqliproj.cpp

+ 1 - 1
cmake_modules/commonSetup.cmake

@@ -371,7 +371,7 @@ IF ("${COMMONSETUP_DONE}" STREQUAL "")
 
     if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
       message ("Using compiler: ${CMAKE_CXX_COMPILER_ID} :: ${CMAKE_CXX_COMPILER_VERSION} :: ${CLANG_VERSION} :: ${APPLE_CLANG_VERSION}")
-      SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -frtti -fPIC -fmessage-length=0 -Wformat -Wformat-security -Wformat-nonliteral -pthread -Wuninitialized")
+      SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -frtti -fPIC -fmessage-length=0 -Werror=format -Wformat-security -Wformat-nonliteral -pthread -Wuninitialized")
       SET (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -rdynamic")
       SET (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -g -fno-inline-functions")
       if (CMAKE_COMPILER_IS_GNUCXX)

+ 5 - 5
common/deftype/deftype.cpp

@@ -2018,7 +2018,7 @@ ITypeInfo * makeModifier(ITypeInfo * basetype, typemod_t kind, IInterface * extr
 
 #ifdef _DEBUG
     ITypeInfo * cur = basetype;
-    loop
+    for (;;)
     {
         if (cur->queryModifier() == typemod_none)
             break;
@@ -3229,7 +3229,7 @@ ITypeInfo * queryUnqualifiedType(ITypeInfo * t)
 {
     if (!t)
         return t;
-    loop
+    for (;;)
     {
         ITypeInfo * base = t->queryTypeBase();
         if (base == t)
@@ -3242,7 +3242,7 @@ ITypeInfo * getFullyUnqualifiedType(ITypeInfo * t)
 {
     if (!t)
         return t;
-    loop
+    for (;;)
     {
         ITypeInfo * base = t->queryTypeBase();
         if (base == t)
@@ -3275,7 +3275,7 @@ ITypeInfo * removeModifier(ITypeInfo * t, typemod_t modifier)
 
 bool hasModifier(ITypeInfo * t, typemod_t modifier)
 {
-    loop
+    for (;;)
     {
         typemod_t curModifier = t->queryModifier();
         if (curModifier == modifier)
@@ -3288,7 +3288,7 @@ bool hasModifier(ITypeInfo * t, typemod_t modifier)
 
 ITypeInfo * queryModifier(ITypeInfo * t, typemod_t modifier)
 {
-    loop
+    for (;;)
     {
         typemod_t curModifier = t->queryModifier();
         if (curModifier == modifier)

+ 1 - 1
common/fileview2/fvdsremote.cpp

@@ -351,7 +351,7 @@ void RemoteDataSourceServer::doCmdRow(bool raw, MemoryBuffer & in, MemoryBuffer
 
     unsigned numRowsPos = out.length();
     out.append(numRows);                // total number of rows;
-    loop
+    for (;;)
     {
         unsigned lengthPos = out.length();
         out.append((unsigned)0);                // size of this row.

+ 1 - 1
common/fileview2/fvidxsource.cpp

@@ -274,7 +274,7 @@ bool IndexDataSource::getRowData(__int64 row, size32_t & length, const void * &
 bool IndexDataSource::getNextRow(MemoryBuffer & out, bool extractRow)
 {
     bool nextPart = !matchingParts.isItem((unsigned)curPartIndex);
-    loop
+    for (;;)
     {
         if (nextPart)
         {

+ 1 - 1
common/fileview2/fvsource.cpp

@@ -1158,7 +1158,7 @@ bool PagedDataSource::getRowData(__int64 row, size32_t & length, const void * &
         return false;
 
     RowLocation location;
-    loop
+    for (;;)
     {
         if (cache.getCacheRow(row, location))
         {

+ 5 - 5
common/fileview2/fvtransform.cpp

@@ -708,7 +708,7 @@ void MappingParser::parseColumn(FieldTransformInfo & output)
 
     unsigned firstFieldIndex = 0;
     const IResultSetMetaData * curMeta = &fieldMeta;
-    loop
+    for (;;)
     {
         StringAttr fieldName;
         assertToken(TokId);
@@ -765,7 +765,7 @@ void MappingParser::parseColumn(FieldTransformInfo & output)
 
 void MappingParser::parseConstantList(HqlExprArray & args)
 {
-    loop
+    for (;;)
     {
         switch (tokenType)
         {
@@ -788,7 +788,7 @@ void MappingParser::parseConstantList(HqlExprArray & args)
 
 void MappingParser::parseTransformList(ViewFieldTransformerArray & transforms)
 {
-    loop
+    for (;;)
     {
         assertToken(TokId);
 
@@ -912,7 +912,7 @@ void MappingParser::parseColumnMapping(FieldTransformInfo & output)
 
     if (tokenType != endToken)
     {
-        loop
+        for (;;)
         {
             parseAttribute(output);
 
@@ -937,7 +937,7 @@ void MappingParser::parseColumnMappingList(FieldTransformInfoArray & results, un
     if (tokenType == TokEof)
         return;
 
-    loop
+    for (;;)
     {
         FieldTransformInfo * next = new FieldTransformInfo;
         results.append(*next);

+ 1 - 1
common/fileview2/fvwusource.cpp

@@ -115,7 +115,7 @@ bool PagedWorkUnitDataSource::getRowData(__int64 row, size32_t & length, const v
         return false;
 
     RowLocation location;
-    loop
+    for (;;)
     {
         if (cache.getCacheRow(row, location))
         {

+ 2 - 2
common/remote/rmtsmtp.cpp

@@ -484,7 +484,7 @@ public:
         warnings = _warnings;
         CSMTPValidator validator;
         if(strlen(senderHeader) + sender.length() > 998)
-            throw MakeStringException(0, "email sender address too long: %u characters", sender.length());
+            throw MakeStringException(0, "email sender address too long: %" I64F "u characters",  static_cast<__uint64>(sender.length()));
         validator.validateAddress(sender.get(), "email sender address");
 
         getRecipients(validator, _to);
@@ -492,7 +492,7 @@ public:
             throw MakeStringException(0, "Email recipient address list too long: %u characters", to.length());
 
         if(strlen(subjectHeader) + subject.length() > 998)
-            throw MakeStringException(0, "Email subject too long: %u characters", subject.length());
+            throw MakeStringException(0, "Email subject too long: %" I64F "u characters",  static_cast<__uint64>(subject.length()));
         validator.validateValue(subject.get(), "email subject");
     }
 

+ 1 - 1
common/remote/rmtspawn.cpp

@@ -557,7 +557,7 @@ bool sendSlaveCommand(INode * remote, CMessageBuffer & msg, unsigned tag)
         throwError1(DFTERR_TimeoutWaitConnect, url.str());
 
     bool done;
-    loop
+    for (;;)
     {
         msg.clear();
         if (!queryWorldCommunicator().recv(msg, remote, tag, NULL, FTTIME_PROGRESS))

+ 3 - 3
common/remote/rmtssh.cpp

@@ -151,7 +151,7 @@ class CFRunSSH: public CInterface, implements IFRunSSH
             if (hash)
                 *hash = 0;
             char *finger = inbuf;
-            loop {
+            for (;;) {
                 while (isspace(*finger))
                     finger++;
                 char *start = finger;
@@ -424,7 +424,7 @@ public:
                     useplink, // for some reason plink needs input handle
                     true,true)) {
                     byte buf[4096];
-                    loop {
+                    for (;;) {
                         size32_t read = pipe->read(sizeof(buf),buf);
                         if (!read)
                             break;
@@ -432,7 +432,7 @@ public:
                     }
                     retcode = pipe->wait();
                     bool firsterr=true;
-                    loop {
+                    for (;;) {
                         size32_t read = pipe->readError(sizeof(buf),buf);
                         if (!read)
                             break;

+ 15 - 15
common/remote/sockfile.cpp

@@ -607,7 +607,7 @@ static void flush(ISocket *socket)
     try {
         sendBuffer(socket, sendbuf);
         char buf[1024];
-        loop {
+        for (;;) {
             Sleep(1000);    // breathe
             size32_t szread;
             SOCKREADTMS(socket)(buf, 1, sizeof(buf), szread, 1000*60);
@@ -825,7 +825,7 @@ public:
             CConnectionRec *old = NULL;
             unsigned oldi;
             unsigned now = msTick();
-            loop {
+            for (;;) {
                 c = (CConnectionRec *)SuperHashTableOf<CConnectionRec,SocketEndpoint>::next(c);
                 if (!c)
                     break;
@@ -1069,7 +1069,7 @@ protected: friend class CRemoteFileIO;
         setDafsEndpointPort(tep);
         unsigned nretries = retry?3:0;
         Owned<IJSOCK_Exception> firstexc;   // when retrying return first error if fails
-        loop {
+        for (;;) {
             try {
                 if (socket) {
                     sendBuffer(socket, src);
@@ -1410,7 +1410,7 @@ public:
     }
     bool next()
     {
-        loop {
+        for (;;) {
             curidx++;
             cur.clear();
             curdt.clear();
@@ -1500,7 +1500,7 @@ public:
         byte b=1;
         StringBuffer tmp;
         if (first ? iter->first() : iter->next()) {
-            loop {
+            for (;;) {
                 mb.append(b);
                 bool isdir = iter->isDir();
                 __int64 sz = isdir?0:iter->getFileSize();
@@ -1916,7 +1916,7 @@ public:
 
         Owned<CEndpointCS> crit = dirCSTable->getCrit(ep); // NB dirCSTable doesn't own, last reference will remove from table
         CriticalBlock block(*crit);
-        loop {
+        for (;;) {
             MemoryBuffer sendBuffer;
             initSendBuffer(sendBuffer);
             MemoryBuffer replyBuffer;
@@ -2337,7 +2337,7 @@ public:
     const void *doRead(offset_t pos, size32_t len, MemoryBuffer &replyBuffer, size32_t &got, void *dstbuf)
     {
         unsigned tries=0;
-        loop {
+        for (;;) {
             try {
                 MemoryBuffer sendBuffer;
                 initSendBuffer(sendBuffer);
@@ -2401,7 +2401,7 @@ public:
         unsigned tries=0;
         size32_t ret = 0;
         CCycleTimer timer;
-        loop {
+        for (;;) {
             try {
                 MemoryBuffer replyBuffer;
                 MemoryBuffer sendBuffer;
@@ -3545,7 +3545,7 @@ class CRemoteFileServer : implements IRemoteFileServer, public CInterface
         }
         ~CThrottler()
         {
-            loop
+            for (;;)
             {
                 Owned<CThrottleQueueItem> item = queue.dequeue();
                 if (!item)
@@ -3656,7 +3656,7 @@ class CRemoteFileServer : implements IRemoteFileServer, public CInterface
         }
         void take(RemoteFileCommandType cmd) // cmd for info. only
         {
-            loop
+            for (;;)
             {
                 if (sem.wait(delayMs))
                     return;
@@ -3728,7 +3728,7 @@ class CRemoteFileServer : implements IRemoteFileServer, public CInterface
             Linked<CRemoteClientHandler> currentClient;
             MemoryBuffer currentMsg;
             unsigned ms;
-            loop
+            for (;;)
             {
                 RemoteFileCommandType currentCmd;
                 {
@@ -3818,7 +3818,7 @@ class CRemoteFileServer : implements IRemoteFileServer, public CInterface
     int getNextHandle()
     {
         // called in sect critical block
-        loop {
+        for (;;) {
             if (lasthandle==INT_MAX)
                 lasthandle = 1;
             else
@@ -4573,7 +4573,7 @@ public:
         unsigned lastmin = 0;
         if (!srcfn.queryIP().ipequals(dstfn.queryIP())) {
             CriticalBlock block(treeCopyCrit);
-            loop {
+            for (;;) {
                 CDateTime dt;
                 offset_t sz;
                 try {
@@ -4774,7 +4774,7 @@ public:
             }
             if (hasoutput) {
                 byte buf[4096];
-                loop {
+                for (;;) {
                     size32_t read = pipe->read(sizeof(buf),buf);
                     if (!read)
                         break;
@@ -5095,7 +5095,7 @@ public:
             readSocks.append(rejectsock->OShandle());
         }
 
-        loop {
+        for (;;) {
             Owned<ISocket> sock;
             bool sockavail = false;
             try {

+ 4 - 4
common/roxiecommlib/roxiecommunicationclient.cpp

@@ -72,7 +72,7 @@ protected:
         sock->write(&sendlen, sizeof(sendlen));
         sock->write(xml.str(), len);
         StringBuffer response;
-        loop
+        for (;;)
         {
             sock->read(&sendlen, sizeof(sendlen));
             if (!sendlen)
@@ -112,7 +112,7 @@ protected:
         sock->write(xml.str(), len);
 
         Owned<IException> exception;
-        loop
+        for (;;)
         {
             sock->read(&sendlen, sizeof(sendlen));
             if (!sendlen)
@@ -242,7 +242,7 @@ protected:
         sock->write(&locklen, sizeof(locklen));
         sock->write(lock, strlen(lock));
         StringBuffer lockResponse;
-        loop
+        for (;;)
         {
             unsigned sendlen;
             sock->read(&sendlen, sizeof(sendlen));
@@ -334,7 +334,7 @@ public:
         sock->write(msg, msglen);
 
         StringBuffer resp;
-        loop
+        for (;;)
         {
             sock->read(&len, sizeof(len));
             if (!len)

+ 2 - 2
common/thorhelper/roxiedebug.cpp

@@ -30,7 +30,7 @@
 bool CDebugCommandHandler::checkCommand(IXmlWriter &out, const char *&supplied, const char *expected)
 {
     unsigned i = 0;
-    loop
+    for (;;)
     {
         if (!supplied[i])
         {
@@ -303,7 +303,7 @@ public:
                 {
                     intValue = 0;
                     char c;
-                    loop
+                    for (;;)
                     {
                         c = *v++;
                         if ((c >= '0') && (c <= '9')) 

+ 11 - 11
common/thorhelper/roxiehelper.cpp

@@ -174,7 +174,7 @@ CRHDualCache::~CRHDualCache()
 {
     ::Release(strm1);
     ::Release(strm2);
-    loop 
+    for (;;)
     {  
         CRHRollingCacheElem *e = cache.dequeue();  
         if (!e)  
@@ -298,7 +298,7 @@ bool CRHLimitedCompareHelper::getGroup(OwnedRowArray &group, const void *left)
     
     // first move 'mid' forwards until mid>=left
     int low = 0;
-    loop 
+    for (;;)
     {
         CRHRollingCacheElem * r = cache->mid(0);
         if (!r)
@@ -322,7 +322,7 @@ bool CRHLimitedCompareHelper::getGroup(OwnedRowArray &group, const void *left)
             low--;
     }
     // now scan back (note low should be filled even at eos)
-    loop 
+    for (;;)
     {
         CRHRollingCacheElem * pr = cache->mid(low-1);
         if (!pr)
@@ -345,7 +345,7 @@ bool CRHLimitedCompareHelper::getGroup(OwnedRowArray &group, const void *left)
     if (cache->mid(0)) // check haven't already hit end
     { 
         // now scan fwd
-        loop 
+        for (;;)
         {
             high++;
             CRHRollingCacheElem * nr = cache->mid(high);
@@ -413,7 +413,7 @@ bool IEngineRowStream::nextGroup(ConstPointerArray & group)
 
 void IEngineRowStream::readAll(RtlLinkedDatasetBuilder &builder)
 {
-    loop
+    for (;;)
     {
         const void *nextrec = nextRow();
         if (!nextrec)
@@ -621,7 +621,7 @@ public:
 
     virtual void getSortedGroup(ConstPointerArray & result)
     {
-        loop
+        for (;;)
         {
             const void * row = next();
             if (!row)
@@ -857,7 +857,7 @@ class CHeapSortAlgorithm : public CSortAlgorithm
                 const void **s = sorted.getArray();
                 int *sq = sequences.getArray();
                 unsigned v = 0; // vacancy
-                loop
+                for (;;)
                 {
                     unsigned c = 2*v + 1;
                     if (c < n)
@@ -978,7 +978,7 @@ public:
             eof = true;
             return;
         }
-        loop
+        for (;;)
         {
             insertHeap(next);
             next = input->nextRow();
@@ -1041,7 +1041,7 @@ public:
 
     virtual void prepare(IEngineRowStream *input)
     {
-        loop
+        for (;;)
         {
             const void * next = input->nextRow();
             if (!next)
@@ -1768,7 +1768,7 @@ void CSafeSocket::flush()
         if (!adaptiveRoot || mlResponseFmt != MarkupFmt_JSON)
         {
             if (traceLevel > 5)
-                DBGLOG("Writing content head length %d to HTTP socket", contentHead.length());
+                DBGLOG("Writing content head length %" I64F "u to HTTP socket", static_cast<__uint64>(contentHead.length()));
             sock->write(contentHead.str(), contentHead.length());
             sent += contentHead.length();
         }
@@ -1783,7 +1783,7 @@ void CSafeSocket::flush()
         if (!adaptiveRoot || mlResponseFmt != MarkupFmt_JSON)
         {
             if (traceLevel > 5)
-                DBGLOG("Writing content tail length %d to HTTP socket", contentTail.length());
+                DBGLOG("Writing content tail length %" I64F "u to HTTP socket", static_cast<__uint64>(contentTail.length()));
             sock->write(contentTail.str(), contentTail.length());
             sent += contentTail.length();
         }

+ 1 - 1
common/thorhelper/roxierow.cpp

@@ -443,7 +443,7 @@ public:
     virtual IEngineRowAllocator *ensure(IOutputMetaData * meta, unsigned activityId, roxiemem::RoxieHeapFlags flags)
     {
         SpinBlock b(allAllocatorsLock);
-        loop
+        for (;;)
         {
             CAllocatorCacheItem *container = _lookup(meta, activityId, flags);
             if (container)

+ 5 - 5
common/thorhelper/thorcommon.cpp

@@ -968,7 +968,7 @@ size32_t CThorContiguousRowBuffer::sizeUtf8(size32_t len)
 size32_t CThorContiguousRowBuffer::sizeVStr()
 {
     size32_t nextOffset = readOffset;
-    loop
+    for (;;)
     {
         ensureAccessible(nextOffset+1);
 
@@ -984,7 +984,7 @@ size32_t CThorContiguousRowBuffer::sizeVUni()
 {
     size32_t nextOffset = readOffset;
     const size32_t sizeOfUChar = 2;
-    loop
+    for (;;)
     {
         ensureAccessible(nextOffset+sizeOfUChar);
 
@@ -1516,7 +1516,7 @@ public:
     void put(size32_t len, const void * ptr)
     {
         // first fill buf
-        loop {
+        for (;;) {
             if (bufpos<ROW_WRITER_BUFFERSIZE) {
                 size32_t wr = ROW_WRITER_BUFFERSIZE-bufpos;
                 if (wr>len)
@@ -1698,7 +1698,7 @@ public:
     {
         count_t count = 0;
         Owned<IRowStream> mergedStream = merge(icompare, partdedup);
-        loop
+        for (;;)
         {
             const void *row = mergedStream->nextRow();
             if (!row)
@@ -1787,7 +1787,7 @@ void setProcessAffinity(const char * cpuList)
     CPU_ZERO(&cpus);
 
     const char * cur = cpuList;
-    loop
+    for (;;)
     {
         char * next;
         unsigned cpu1 = getCpuId(cur, &next);

+ 1 - 1
common/thorhelper/thorparse.cpp

@@ -507,7 +507,7 @@ unsigned getMaximumMatchLength(AsciiDfa & dfa, unsigned len, const byte * start)
     const AsciiDfaState * states = dfa.queryStates();
     unsigned * transitions = dfa.queryTransitions();
     const byte * best = NULL;
-    loop
+    for (;;)
     {
         if (states[activeState].accepts())
             best = cur;

+ 2 - 2
common/thorhelper/thorpipe.cpp

@@ -176,7 +176,7 @@ public:
             size32_t rowSize = 4096; // MORE - make configurable
             size32_t maxRowSize = 10*1024*1024; // MORE - make configurable
             size32_t thisLineLength;
-            loop
+            for (;;)
             {
                 size32_t avail;
                 const void *peek = pipeStream->peek(rowSize, avail);
@@ -242,7 +242,7 @@ public:
 
     virtual const void * next()
     {
-        loop
+        for (;;)
         {
             if (!ensureNext())
                 return NULL;

+ 5 - 5
common/thorhelper/thorrparse.cpp

@@ -2544,7 +2544,7 @@ RegexMatchAction RegexAsciiDfaPattern::match(RegexState & state)
     {
         //MORE: Store only one because we know we could never be backtracked - e.g., because this is always a token.
         const byte * best = NULL;
-        loop
+        for (;;)
         {
             if (states[activeState].accepts())
                 best = cur;
@@ -2574,7 +2574,7 @@ RegexMatchAction RegexAsciiDfaPattern::match(RegexState & state)
     {
         ConstPointerArray & potentialMatches = state.cache.potentialMatches;
         unsigned prevPotentialMatches = potentialMatches.ordinality();
-        loop
+        for (;;)
         {
             if (states[activeState].accepts())
                 potentialMatches.append(cur);
@@ -2644,7 +2644,7 @@ RegexMatchAction RegexAsciiDfaPattern::beginMatch(RegexState & state)
     const byte * best = NULL;
     ConstPointerArray & potentialMatches = state.cache.potentialMatches;
     const unsigned prevPotentialMatches = potentialMatches.ordinality();
-    loop
+    for (;;)
     {
         if (states[activeState].accepts())
         {
@@ -2731,7 +2731,7 @@ RegexMatchAction RegexUnicodeDfaPattern::match(RegexState & state)
     const byte * end = state.end;
     unsigned activeState = 0;
     ConstPointerArray matches;
-    loop
+    for (;;)
     {
         //MORE: It would be better to store only one if we knew we could never be backtracked - e.g., if this was always a token.
         if (states[activeState].accepts)
@@ -2807,7 +2807,7 @@ RegexMatchAction RegexRepeatAnyPattern::match(RegexState & state)
     else
     {
         unsigned i = max;
-        loop
+        for (;;)
         {
             state.cur = start+i;
             RegexMatchAction ret = matchNext(state);

+ 6 - 6
common/thorhelper/thorsoapcall.cpp

@@ -366,7 +366,7 @@ public:
             checkRoxieAbortMonitor(roxieAbortMonitor);
             Owned<ISocket> sock;
             Owned<ISocketConnectWait> scw = nonBlockingConnect(ep, timeoutMS == WAIT_FOREVER ? 60000 : timeoutMS*(retries+1));
-            loop
+            for (;;)
             {
                 sock.setown(scw->wait(1000));//throws if connect fails or timeoutMS
                 checkRoxieAbortMonitor(roxieAbortMonitor);
@@ -890,7 +890,7 @@ public:
     {
         ForEachItemIn(i,threads)
             threads.item(i).join();
-        loop
+        for (;;)
         {
             const void *row = outputQ.dequeueNow();
             if (!row)
@@ -920,7 +920,7 @@ public:
     {
         if (complete)
             return NULL;
-        loop
+        for (;;)
         {
             const void *row = outputQ.dequeue();
             if (aborted)
@@ -1234,7 +1234,7 @@ int CWSCHelperThread::run()
     else
     {
         // following a bit odd but preserving previous semantics (except fixing abort leak)
-        loop
+        for (;;)
         {
             try
             {
@@ -1710,7 +1710,7 @@ private:
                 }
             }
             else {
-                loop {
+                for (;;) {
                     checkTimeLimitExceeded(&remainingMS);
                     checkRoxieAbortMonitor(master->roxieAbortMonitor);
                     socket->readtms(buffer, 0, WSCBUFFERSIZE, bytesRead, MIN(master->timeoutMS,remainingMS));
@@ -1895,7 +1895,7 @@ public:
             Owned<ISocket> socket;
             cycle_t startCycles, endCycles;
             startCycles = get_cycles_now();
-            loop 
+            for (;;)
             {
                 try
                 {

+ 2 - 2
common/thorhelper/thorsort.cpp

@@ -103,7 +103,7 @@ void tbbqsortstable(void ** rows, size_t n, const ICompare & compare, void ** te
 inline void * * mergePartitions(const ICompare & compare, void * * result, size_t n1, void * * ret1, size_t n2, void * * ret2)
 {
     void * * tgt = result;
-    loop
+    for (;;)
     {
        if (compare.docompare(*ret1, *ret2) <= 0)
        {
@@ -298,7 +298,7 @@ class TbbParallelMergeSorter
         }
         virtual task * execute()
         {
-            loop
+            for (;;)
             {
                 //On entry next is assumed to be used once by this function
                 if ((n <= multiThreadedBlockThreshold) || (depth >= sorter.singleThreadDepth))

+ 16 - 16
common/thorhelper/thorstep.cpp

@@ -357,7 +357,7 @@ const void * CSteppedInputLookahead::nextGE(const void * seek, unsigned numField
         unsigned flags = (stepExtra.queryFlags() & ~stepFlagsMask) | stepFlagsValue;
         SmartStepExtra inputStepExtra(flags, lowestFrequencyInput);
         unsigned stepFields = (numFields <= numStepableFields) ? numFields : numStepableFields;
-        loop
+        for (;;)
         {
             readAheadRowIsExactMatch = true;
             readAheadRow = nextInputRowGE(seek, stepFields, readAheadRowIsExactMatch, inputStepExtra);
@@ -401,7 +401,7 @@ const void * CSteppedInputLookahead::nextGE(const void * seek, unsigned numField
     }
 
     //now narrow down
-    loop
+    for (;;)
     {
         const void * cur = next();
         if (!cur)
@@ -538,7 +538,7 @@ void CFilteredInputBuffer::fill(const void * equalityRow)
     append(next);
     if (equalityRow)
     {
-        loop
+        for (;;)
         {
             bool matches = true;
             SmartStepExtra stepExtra(SSEFreturnMismatches, NULL);
@@ -550,7 +550,7 @@ void CFilteredInputBuffer::fill(const void * equalityRow)
     }
     else
     {
-        loop
+        for (;;)
         {
             const void * next = input->consume();
             if (!next)
@@ -1077,7 +1077,7 @@ const void * CMergeJoinProcessor::nextInputRow()
     if (!hasCandidates() && !findCandidates(NULL, 0))
         return NULL;
 
-    loop
+    for (;;)
     {
         const void * next = nextCandidate();
         if (next)
@@ -1841,7 +1841,7 @@ bool CNaryJoinLookaheadQueue::findValidSelection(unsigned initialRow)
 
     const unsigned max = maxRow;
     unsigned candidateRow = initialRow;
-    loop
+    for (;;)
     {
         const void * leftRow = left->activeRow();
         while (candidateRow < max)
@@ -1892,7 +1892,7 @@ bool CNaryJoinLookaheadQueue::nextSelection()
 
 bool CNaryJoinLookaheadQueue::ensureCandidateExists(unsigned __int64 minDistance, unsigned __int64 maxDistance)
 {
-    loop
+    for (;;)
     {
         const void * next = rows.head();
         if (!next)
@@ -1906,7 +1906,7 @@ bool CNaryJoinLookaheadQueue::ensureCandidateExists(unsigned __int64 minDistance
         rows.skip();
     }
 
-    loop
+    for (;;)
     {
         const void * next = nextUnqueued();
         if (!next)
@@ -1928,7 +1928,7 @@ bool CNaryJoinLookaheadQueue::ensureCandidateExists(unsigned __int64 minDistance
 
 bool CNaryJoinLookaheadQueue::checkExistsGE(const void * seek, unsigned numFields)
 {
-    loop
+    for (;;)
     {
         const void * next = rows.head();
         if (!next)
@@ -1982,7 +1982,7 @@ unsigned CNaryJoinLookaheadQueue::readAheadTo(unsigned __int64 maxDistance, bool
 
 void CNaryJoinLookaheadQueue::readCandidateAll()
 {
-    loop
+    for (;;)
     {
         const void * next = nextUnqueued();
         if (!next)
@@ -2256,12 +2256,12 @@ void CJoinGenerator::afterProcessCandidates()
 const void * CJoinGenerator::nextOutputRow()
 {
     RtlDynamicRowBuilder rowBuilder(outputAllocator, false);
-    loop
+    for (;;)
     {
         if (isSpecialLeftJoin)
         {
             CNaryJoinLookaheadQueue & left = inputs.item(0);
-            loop
+            for (;;)
             {
                 const void * unmatchedLeft = left.nextUnmatched();
                 if (!unmatchedLeft)
@@ -2327,7 +2327,7 @@ const void * CJoinGenerator::nextOutputRowGE(const void * seek, unsigned numFiel
     //A stupid version.  We could possibly skip on the lowest value if we knew the fields were assigned from the lowest value in the input
     //which would potentially save a lot of transforms.
     //would also probably need the input to match the output.
-    loop
+    for (;;)
     {
         const void * next = nextOutputRow();
         if (!next || stepCompare->docompare(next, seek, numFields) >= 0)
@@ -2420,7 +2420,7 @@ bool CEqualityJoinGenerator::gatherNextCandidates()
     else if (lowestInput->empty())
         return false;
 
-    loop
+    for (;;)
     {
         if (doGatherNextCandidates())
             return true;
@@ -2620,7 +2620,7 @@ bool CAnchoredRangeJoinGenerator::nextMatchesAnyConsumed()
 
 bool CAnchoredRangeJoinGenerator::gatherNextCandidates()
 {
-    loop
+    for (;;)
     {
         if (!nextMatchesAnyConsumed())
             return false;
@@ -2708,7 +2708,7 @@ bool CProximityRangeJoinGenerator::gatherNextCandidates(unsigned iLowest)
 
 bool CProximityRangeJoinGenerator::gatherNextCandidates()
 {
-    loop
+    for (;;)
     {
         unsigned iLowest = lowestSpotter.queryNextInput();
         assertex(iLowest != NotFound);

+ 2 - 2
common/thorhelper/thorstep.ipp

@@ -144,7 +144,7 @@ public:
     }
     ~LinkedRowQueue()
     {
-        loop
+        for (;;)
         {
             const void * next = dequeue();
             if (!next)
@@ -751,7 +751,7 @@ public:
 
     void kill()
     {
-        loop
+        for (;;)
         {
             const void * next = dequeue();
             if (!next)

+ 1 - 1
common/thorhelper/thorstep2.cpp

@@ -395,7 +395,7 @@ const void * CSteppedConjunctionOptimizer::next()
     if (!hasCandidates() && !findCandidates(NULL, 0))
         return NULL;
 
-    loop
+    for (;;)
     {
         const void * next = rootActivity->nextInputRow();
         if (next)

+ 13 - 13
common/thorhelper/thorstrand.cpp

@@ -227,7 +227,7 @@ bool RoxieRowBlock::readFromStream(IRowStream * stream)
     bool done = false;
     try
     {
-        loop
+        for (;;)
         {
             const void * row = stream->nextRow();
             if (!row)
@@ -296,7 +296,7 @@ static void resetBlockQueue(IRowQueue * queue)
 {
     queue->reset();
 
-    loop
+    for (;;)
     {
         const void * next;
         if (!queue->tryDequeue(next))
@@ -368,7 +368,7 @@ public:
     virtual const void *nextRow()
     {
         const void * ret;
-        loop
+        for (;;)
         {
             if (curBlock)
             {
@@ -782,7 +782,7 @@ public:
         if (numActiveStrands == 0)
             return NULL;
 
-        loop
+        for (;;)
         {
             if (curBlock)
             {
@@ -797,7 +797,7 @@ public:
                     nextStrand();
             }
 
-            loop
+            for (;;)
             {
                 OrderedReadAheadThread & curProducer = *(producers[curStrand]);
                 OrderedJunctionBlockQueue & queue = curProducer.queryQueue();
@@ -913,7 +913,7 @@ public:
  //interface IEngineRowStream for the rows being supplied to the strand.
     virtual const void *nextRow()
     {
-        loop
+        for (;;)
         {
             if (!curInputBlock)
             {
@@ -1039,7 +1039,7 @@ public:
             {
                 if (isGrouped)
                 {
-                    loop
+                    for (;;)
                     {
                         const void * row = input->nextRow();
                         if (!row)
@@ -1060,7 +1060,7 @@ public:
                 else
                 {
                     //MORE: This could more efficiently loop 0..blockSize-1 and remove the test in addRowNowFull()
-                    loop
+                    for (;;)
                     {
                         const void * row = input->nextRow();
                         if (unlikely(!row))
@@ -1153,7 +1153,7 @@ public:
  //interface IEngineRowStream for the rows being supplied to the strand.
     virtual const void *nextRow()
     {
-        loop
+        for (;;)
         {
             if (eof)
                 return NULL;
@@ -1270,7 +1270,7 @@ public:
         {
             try
             {
-                loop
+                for (;;)
                 {
                     const void * row = strand->nextRow();
                     //NB: Need to be check the final eog isn't lost when processing sequentially
@@ -1426,7 +1426,7 @@ public:
 //implementation of IEngineRowStream
      virtual const void *nextRow()
      {
-         loop
+         for (;;)
          {
              if (likely(curOutputBlock))
              {
@@ -1616,7 +1616,7 @@ public:
     {
         queue->reset();
 
-        loop
+        for (;;)
         {
             if (curBlock)
                 curBlock->releaseBlock();
@@ -1630,7 +1630,7 @@ public:
     virtual const void *nextRow()
     {
         const void * ret;
-        loop
+        for (;;)
         {
             if (curBlock)
             {

+ 6 - 6
common/thorhelper/thortalgo.cpp

@@ -748,7 +748,7 @@ bool LRState::canAccept(token_id sym) const
     if (action == MultiAction)
     {
         LRAction * multi = table->extraActions + cur.getExtra();
-        loop
+        for (;;)
         {
             action = multi->getAction();
             if (action == NoAction)
@@ -773,7 +773,7 @@ state_id LRState::getShift(token_id sym) const
     if (action == MultiAction)
     {
         LRAction * multi = table->extraActions + cur.getExtra();
-        loop
+        for (;;)
         {
             action = multi->getAction();
             if (action == NoAction)
@@ -796,7 +796,7 @@ unsigned LRState::numReductions(token_id sym) const
     {
         unsigned count = 0;
         LRAction * multi = table->extraActions + cur.getExtra();
-        loop
+        for (;;)
         {
             action = multi->getAction();
             if (action == NoAction)
@@ -818,7 +818,7 @@ unsigned LRState::queryReduction(token_id sym, unsigned idx) const
     if (action == MultiAction)
     {
         LRAction * multi = table->extraActions + cur.getExtra();
-        loop
+        for (;;)
         {
             action = multi->getAction();
             if (action == NoAction)
@@ -852,7 +852,7 @@ StringBuffer & LRState::trace(StringBuffer & out, unsigned id) const
             {
                 out.append("{");
                 LRAction * multi = table->extraActions + cur.getExtra();
-                loop
+                for (;;)
                 {
                     action = multi->getAction();
                     if (action == NoAction)
@@ -887,7 +887,7 @@ StringBuffer & LRState::trace(StringBuffer & out, unsigned id) const
             {
                 out.append("{");
                 LRAction * multi = table->extraActions + cur.getExtra();
-                loop
+                for (;;)
                 {
                     action = multi->getAction();
                     if (action == NoAction)

+ 2 - 2
common/thorhelper/thortlex.cpp

@@ -48,7 +48,7 @@ position_t MultiLexer::skipWhitespace(position_t pos)
     const byte * cur = state.start+pos;
     const byte * end = state.end;
     const byte * best = cur;
-    loop
+    for (;;)
     {
         const AsciiDfaState & curState = states[activeState];
 
@@ -84,7 +84,7 @@ unsigned MultiLexer::next(position_t pos, GrammarSymbolArray & symbols)
     unsigned * transitions = tokens.queryTransitions();
     const byte * best = NULL;
     const AsciiDfaState * bestState = NULL;
-    loop
+    for (;;)
     {
         const AsciiDfaState & curState = states[activeState];
 

+ 1 - 1
common/thorhelper/thortparse.cpp

@@ -1246,7 +1246,7 @@ bool TomitaParser::performMatch(IMatchedAction & action, const void * row, unsig
     parser.beginParse(def->chooseBest);
 
     bool scanWhole = (def->scanAction == INlpParseAlgorithm::NlpScanWhole);
-    loop
+    for (;;)
     {
         position_t nextPosition = parser.getFirstPosition();
         if (nextPosition == NotFound)

+ 4 - 4
common/thorhelper/thorxmlread.cpp

@@ -91,7 +91,7 @@ static void decodeHexPairsX(const char *input, unsigned inputLen, void *&outData
     outLen = inputLen/2;
     outData = malloc(outLen);
     char *tgt = (char *)outData;
-    loop
+    for (;;)
     {
         byte high = hex2num(*input++);
         *tgt++ = (high << 4) | hex2num(*input++);
@@ -770,11 +770,11 @@ public:
                 throw MakeStringException(0, "// unsupported here");
             path++;
         }
-        loop
+        for (;;)
         {
             const char *startQ = strchr(path, '[');
             const char *nextSep;
-            loop
+            for (;;)
             {
                 nextSep = strchr(path, '/');
                 if (startQ && (!nextSep || startQ < nextSep))
@@ -877,7 +877,7 @@ public:
         {
             const char *q = qualifier;
             bool numeric = true;
-            loop
+            for (;;)
             {
                 if ('\0' == *q) break;
                 else if (!isdigit(*q)) { numeric = false; break; }

+ 1 - 1
common/thorhelper/thorxmlwrite.cpp

@@ -1982,7 +1982,7 @@ void printKeyedValues(StringBuffer &out, IIndexReadContext *segs, IOutputMetaDat
                     if (!seg.isEmpty())
                     {
                         seg.setLow(tempRow);
-                        loop
+                        for (;;)
                         {
                             if (numValues)
                                 setValues.append(",");

+ 11 - 11
common/workunit/workunit.cpp

@@ -548,7 +548,7 @@ protected:
 
     bool nextSubGraph()
     {
-        loop
+        for (;;)
         {
             if (!subgraphIter->next())
                 return false;
@@ -561,7 +561,7 @@ protected:
     {
         if (!graphIter)
             return false;
-        loop
+        for (;;)
         {
             if (!graphIter->next())
                 return false;
@@ -618,7 +618,7 @@ protected:
 
     bool nextChildScope()
     {
-        loop
+        for (;;)
         {
             if (collections.ordinality() == 0)
                 return false;
@@ -3028,7 +3028,7 @@ public:
             SessionId agent = -1;
             bool agentSessionStopped = false;
             unsigned start = msTick();
-            loop
+            for (;;)
             {
                 ret = (WUState) getEnum(conn->queryRoot(), "@state", states);
                 switch (ret)
@@ -3104,7 +3104,7 @@ public:
         if (conn)
         {
             unsigned start = msTick();
-            loop
+            for (;;)
             {
                 ret = (WUAction) getEnum(conn->queryRoot(), "Action", actions);
                 if (ret != original)
@@ -5695,7 +5695,7 @@ public:
 
     virtual bool next()
     {
-        loop
+        for (;;)
         {
             if (!PARENT::next())
                 return false;
@@ -8691,7 +8691,7 @@ IStringVal & CLocalWUStatistic::getDescription(IStringVal & str, bool createDefa
         }
         else
         {
-            loop
+            for (;;)
             {
                 char c = *scope++;
                 if (!c)
@@ -9961,14 +9961,14 @@ const char * skipLeadingXml(const char * text)
     if (memcmp(text, UTF8_BOM, 3) == 0)
         text += 3;
 
-    loop
+    for (;;)
     {
         if (isspace(*text))
             text++;
         else if (text[0] == '<' && text[1] == '?')
         {
             text += 2;
-            loop
+            for (;;)
             {
                 if (!*text) break;
                 if (text[0] == '?' && text[1] == '>')
@@ -9982,7 +9982,7 @@ const char * skipLeadingXml(const char * text)
         else if (text[0] == '<' && text[1] == '!' && text[2] == '-' && text[3] == '-')
         {
             text += 4;
-            loop
+            for (;;)
             {
                 if (!*text) break;
                 if (text[0] == '-' && text[1] == '-' && text[2] == '>')
@@ -10165,7 +10165,7 @@ extern WORKUNIT_API IPropertyTree * resolveQueryAlias(IPropertyTree * queryRegis
     unsigned cnt = 0;
     StringBuffer lc(alias);
     const char * search = lc.toLowerCase().str();
-    loop
+    for (;;)
     {
         xpath.set("Alias[@name='").append(search).append("']/@id");
         const char * queryId = queryRegistry->queryProp(xpath);

+ 8 - 8
common/workunit/wujobq.cpp

@@ -866,11 +866,11 @@ public:
         if (locknest++==0) {
             unsigned wait = qdata&&qdata->next?5000:INFINITE;
             ForEachQueue(qd) {
-                loop {
+                for (;;) {
                     StringBuffer path;
                     path.appendf("/JobQueues/Queue[@name=\"%s\"]",qd->qname.get());
                     bool timeout;
-                    loop {
+                    for (;;) {
                         timeout=false;
                         try {
                             qd->conn = querySDS().connect(path.str(),myProcessSession(),exclusive?RTM_LOCK_WRITE:RTM_LOCK_READ,wait);
@@ -1014,7 +1014,7 @@ public:
         }
         item->setPropInt("@num",-1);
         StringBuffer path;
-        loop {
+        for (;;) {
             IPropertyTree *item2 = qd.root->queryPropTree(getItemPath(path.clear(),n).str());
             if (!item2)
                 break;
@@ -1582,7 +1582,7 @@ public:
     {
         Cconnlockblock block(this,true);
         qd.root->setPropInt("@count",0);
-        loop {
+        for (;;) {
             IPropertyTree *item = qd.root->queryPropTree("Item[1]");
             if (!item)
                 break;
@@ -1638,7 +1638,7 @@ public:
         connected = 0;
         waiting = 0;
         unsigned i=0;
-        loop {
+        for (;;) {
             IPropertyTree *croot = queryClientRootIndex(qd,i);
             if (!croot)
                 break;
@@ -1660,7 +1660,7 @@ public:
         }
         i=0;
         StringBuffer path;
-        loop {
+        for (;;) {
             IPropertyTree *item = qd.root->queryPropTree(getItemPath(path.clear(),i).str());
             if (!item)
                 break;
@@ -1780,7 +1780,7 @@ public:
         assertex(connected); // must be connected
         int curmp = maxp?maxp->get():0;
         int nextmp = curmp;
-        loop {
+        for (;;) {
             bool timedout = false;
             Owned<IJobQueueItem> item;
             {
@@ -1836,7 +1836,7 @@ public:
     bool cancelInitiateConversation(sQueueData &qd,const char *wuid)
     {
         Cconnlockblock block(this,true);
-        loop {
+        for (;;) {
             Owned<IJobQueueItem> item = dotake(qd,wuid,false);
             if (!item.get())
                 break;

+ 3 - 3
dali/base/daaudit.cpp

@@ -69,7 +69,7 @@ class CDaliAuditServer: public IDaliServer, public Thread
 
     bool matchrow(const char *row,const char *match)
     {
-        loop {
+        for (;;) {
             char m = *match;
             if (!m) 
                 break;
@@ -87,7 +87,7 @@ class CDaliAuditServer: public IDaliServer, public Thread
                 }
             }
             else {
-                loop {
+                for (;;) {
                     if (m!=c)
                         return false;
                     m = *(match++);
@@ -173,7 +173,7 @@ public:
             char *buf = (char *)mba.allocate(BUFFSIZE+MAXLINESIZE+1);
             size32_t lbsize = 0;
             char *p=NULL;
-            loop {
+            for (;;) {
 Retry:
                 if (lbsize<MAXLINESIZE) {
                     if (!eof) {

+ 1 - 1
dali/base/daclient.cpp

@@ -261,7 +261,7 @@ bool updateDaliEnv(IPropertyTree *env, bool forceGroupUpdate, const char *daliIp
         return false;
     }
     SocketEndpoint daliep;
-    loop {
+    for (;;) {
         const char *ps = dalis->query().queryProp("@port");
         unsigned port = ps?atoi(ps):0;
         if (!port)

+ 1 - 1
dali/base/dacoven.cpp

@@ -444,7 +444,7 @@ public:
             else if (r>myrank) {
                 rank_t sender;
                 StringBuffer str;
-                loop
+                for (;;)
                 {
                     if (!recv(mb,r,MPTAG_DALI_COVEN_REQUEST,&sender,COVEN_SERVER_TIMEOUT)) {
                         throw MakeStringException(-1,"Could not connect to %s",grp->queryNode(r).endpoint().getUrlStr(str).str());

+ 1 - 1
dali/base/dacsds.cpp

@@ -2111,7 +2111,7 @@ void CClientSDSManager::setConfigOpt(const char *opt, const char *value)
             {
                 PROGLOG("Reducing concurrentThrottleLimit from %d to %d", clientThrottleLimit, newV);
                 unsigned c=0;
-                loop
+                for (;;)
                 {
                     // generally won't be waiting, as would expect this option to typically be called just after component startup time.
                     if (!concurrentRequests.wait(clientThrottleDelay))

+ 1 - 1
dali/base/dacsds.ipp

@@ -164,7 +164,7 @@ static void checkValidSubscriptionPath(const char *xpath)
 {
     bool quote=false, sep=false;
     const char *_xpath = xpath;
-    loop
+    for (;;)
     {
         char next = *_xpath;
         if ('\0' == next)

+ 19 - 19
dali/base/dadfs.cpp

@@ -278,7 +278,7 @@ public:
     {
         unsigned start = msTick();
         bool first = true;
-        loop
+        for (;;)
         {
             try
             {
@@ -357,7 +357,7 @@ void ensureFileScope(const CDfsLogicalFileName &dlfn,unsigned timeout)
     IPropertyTree *r = connlock.conn->getRoot();
     StringBuffer scopes;
     const char *s=dlfn.getScopes(scopes,true).str();
-    loop {
+    for (;;) {
         IPropertyTree *nr;
         const char *e = strstr(s,"::");
         query.clear();
@@ -387,7 +387,7 @@ void removeFileEmptyScope(const CDfsLogicalFileName &dlfn,unsigned timeout)
     StringBuffer query;
     dlfn.makeScopeQuery(query.clear(),false);
     StringBuffer head;
-    loop {
+    for (;;) {
         if (query.length()) {
             const char *tail = splitXPath(query.str(),head.clear());
             if (!tail||!*tail)
@@ -426,7 +426,7 @@ protected:
         conn = NULL;
         lock.clear();
         CTimeMon tm(timeout);
-        loop
+        for (;;)
         {
             try
             {
@@ -597,7 +597,7 @@ public:
             return false; // throw ?
         CTimeMon tm(timeout);
         unsigned remaining = timeout;
-        loop
+        for (;;)
         {
             try
             {
@@ -880,7 +880,7 @@ public:
             clustlist.append(cname.str());
         unsigned i;
         if (clusters) {
-            loop {
+            for (;;) {
                 const char *s = clusters;
                 while (*s&&(*s!=','))
                     s++;
@@ -1359,7 +1359,7 @@ public:
         if (!lfn.isExternal() && !checkLogicalName(lfn,user,true,true,true,"remove"))
             ThrowStringException(-1, "Logical Name fails for removal on %s", lfn.get());
 
-        loop
+        for (;;)
         {
             // Transaction files have already been unlocked at this point, delete all remaining files
             Owned<IDistributedFile> file = queryDistributedFileDirectory().lookup(lfn, user, true, false, true, NULL, SDS_SUB_LOCK_TIMEOUT);
@@ -1599,7 +1599,7 @@ public:
         // =============== PREPARE AND RETRY UNTIL READY
         try
         {
-            loop
+            for (;;)
             {
                 if (prepareActions())
                     break;
@@ -2220,7 +2220,7 @@ public:
             fill();
             return true;
         }
-        loop {
+        for (;;) {
             if (fiter->next()) {
                 piter.setown(fiter->query().getElements("Attr/Protect"));
                 if (piter->first()) {
@@ -3134,7 +3134,7 @@ public:
         if (iter->first())
         {
             error.append("Cannot remove file ").append(logicalName.get()).append(" as owned by SuperFile(s): ");
-            loop
+            for (;;)
             {
                 error.append(iter->query().queryProp("@name"));
                 if (!iter->next())
@@ -3633,7 +3633,7 @@ public:
         IPropertyTree *t0 = t;
         StringBuffer grplist;
         // the following is complicated by fact there is a cache of the file branch
-        loop {
+        for (;;) {
             while ((pt=t->queryPropTree("Cluster[1]"))!=NULL)
                 t->removeTree(pt);
             ForEachItemIn(i,clusters) {
@@ -4089,7 +4089,7 @@ public:
         if (isPathSepChar(*thisEnd))
             thisEnd--;
         const char *oldP = oldEnd, *thisP = thisEnd;
-        loop {
+        for (;;) {
             if (oldP==oldPath || thisP==thisPath)
                 break;
             if (*oldP != *thisP) {
@@ -5193,7 +5193,7 @@ protected:
                 pn[j] = allsubfiles.item(j).numParts();
             unsigned f=0;
             bool found=false;
-            loop {
+            for (;;) {
                 if (f==allsubfiles.ordinality()) {
                     if (!found)
                         break; // no more
@@ -7206,7 +7206,7 @@ public:
         StringBuffer name;
         StringBuffer prop;
         unsigned scale = 16;
-        loop {
+        for (;;) {
             name.clear();
             if (lname.length()) { // try suggested name
                 name.append(lname);
@@ -7421,7 +7421,7 @@ IDistributedFile *CDistributedFileDirectory::dolookup(CDfsLogicalFileName &_logi
     if (strchr(logicalname->get(), '*')) // '*' only wildcard supported. NB: This is a temporary fix (See: HPCC-12523)
         throw MakeStringException(-1, "Invalid filename lookup: %s", logicalname->get());
     Owned<IDfsLogicalFileNameIterator> redmatch;
-    loop
+    for (;;)
     {
         checkLogicalName(*logicalname,user,true,writeattr,true,NULL);
         if (logicalname->isExternal()) {
@@ -7437,7 +7437,7 @@ IDistributedFile *CDistributedFileDirectory::dolookup(CDfsLogicalFileName &_logi
         }
         else {
             unsigned start = 0;
-            loop {
+            for (;;) {
                 CFileLock fcl;
                 unsigned mode = RTM_LOCK_READ | RTM_SUB;
                 if (hold) mode |= RTM_LOCK_HOLD;
@@ -8394,7 +8394,7 @@ public:
         pn=0;
         s=filter;
         unsigned start=0;
-        loop {
+        for (;;) {
             if ((*s==0)||(*s==',')||isspace(*s)) {
                 if (start) {
                     for (i=start-1;i<pn;i++)
@@ -9199,7 +9199,7 @@ class CInitGroups
         Owned<IPropertyTreeIterator> newIter = newClusterGroup->getElements("Node");
         Owned<IPropertyTreeIterator> oldIter = oldClusterGroup->getElements("Node");
         if (newIter->first() && oldIter->first()) {
-            loop {
+            for (;;) {
                 const char *oldIp = oldIter->query().queryProp("@ip");
                 const char *newIp = newIter->query().queryProp("@ip");
                 if (!streq(oldIp, newIp))
@@ -10086,7 +10086,7 @@ public:
         dlfn.set(lname);
         CDfsLogicalFileName *logicalname=&dlfn;
         Owned<IDfsLogicalFileNameIterator> redmatch;
-        loop {
+        for (;;) {
             StringBuffer tail;
             checkLogicalName(*logicalname,udesc,true,false,true,"getFileTree on");
             CScopeConnectLock sconnlock("getFileTree", *logicalname, false, false, false, defaultTimeout);

+ 7 - 7
dali/base/dafdesc.cpp

@@ -44,7 +44,7 @@
 bool isMulti(const char *str)
 {
     if (str&&!isSpecialPath(str))
-        loop {
+        for (;;) {
             switch (*str) {
             case ',':
             case '*':
@@ -1283,7 +1283,7 @@ public:
         {
             UnsignedArray pia;
             unsigned pi;
-            loop
+            for (;;)
             {
                 mb.read(pi);
                 if (pi == (unsigned)-1)
@@ -2015,7 +2015,7 @@ public:
             unsigned p = 0;
             unsigned f = 0;
             bool found = false;
-            loop {
+            for (;;) {
                 if (f==subfilecounts->ordinality()) {
                     if (!found)
                         break; // no more
@@ -2505,7 +2505,7 @@ StringBuffer &getPartMask(StringBuffer &ret,const char *lname,unsigned partmax)
     if (lname) {
         bool maybequery = false;
         const char *lnamebase = lname;
-        loop {
+        for (;;) {
             const char *e = strstr(lname,"::");
             if (!e)
                 break;
@@ -2572,7 +2572,7 @@ StringBuffer &getPartMask(StringBuffer &ret,const char *lname,unsigned partmax)
 
 inline const char *skipRoot(const char *lname)
 {
-    loop {
+    for (;;) {
         while (*lname==' ')
             lname++;
         if (*lname!='.')
@@ -2886,7 +2886,7 @@ IFileDescriptor *createFileDescriptorFromRoxieXML(IPropertyTree *tree,const char
     StringBuffer xpath;
     StringBuffer locpath;
     StringArray locdirs;
-    loop {
+    for (;;) {
         IPropertyTree *loc =  part1->queryPropTree(xpath.clear().appendf("Loc[%d]",nc+1));
         if (!loc)
             break;
@@ -2962,7 +2962,7 @@ IFileDescriptor *createFileDescriptorFromRoxieXML(IPropertyTree *tree,const char
         map.replicateOffset = 0;
         unsigned i2;
         unsigned i3;
-        loop {
+        for (;;) {
             for (i2=1;i2<nc;i2++) {
                 for (i3=0;i3<epa[i2].ordinality();i3++) {
                     INode &node = grp->queryNode((i3+map.replicateOffset*i2)%grp->ordinality());

+ 1 - 1
dali/base/dalock.cpp

@@ -72,7 +72,7 @@ public:
     {
         CTimeMon tm(timeout);
         sect.enter();
-        loop {
+        for (;;) {
             unsigned num = owners.ordinality();
             if (exclusive) {
                 if (num==0) {

+ 37 - 37
dali/base/dasds.cpp

@@ -208,7 +208,7 @@ public:
     CLCLockBlock(ReadWriteLock &_lock, bool readLock, unsigned timeout, const char *fname, unsigned _lnum) : lock(_lock), lnum(_lnum)
     {
         got = msTick();
-        loop
+        for (;;)
         {
             if (readLock)
             {
@@ -699,7 +699,7 @@ public:
         const char *nextSep = path+1;
         StringBuffer head;
         depth = 1; // root
-        loop
+        for (;;)
         {
             nextSep = queryHead(nextSep, head.clear());
             ++depth; // inc last
@@ -707,7 +707,7 @@ public:
                 break;
         }
         StringBuffer strippedXpath;
-        loop
+        for (;;)
         {
             const char *startQ;
             if (NULL == (startQ = queryNextUnquoted(path, '['))) // escaped '[]' chars??
@@ -717,7 +717,7 @@ public:
             }
 
             const char *nextSep = path+1;
-            loop
+            for (;;)
             {
                 nextSep = queryHead(nextSep, head.clear());
                 if (!nextSep || startQ < nextSep)
@@ -728,7 +728,7 @@ public:
 
             Owned<CQualifiers> qualifiers = new CQualifiers;
             strippedXpath.append(startQ-path, path);
-            loop
+            for (;;)
             {
                 const char *endQ = queryNextUnquoted(startQ+1, ']');
                 if (!endQ)
@@ -776,7 +776,7 @@ public:
                     const char *qualifier = qualifiers->item(q2);
                     const char *q = qualifier;
                     bool numeric = true;
-                    loop
+                    for (;;)
                     {
                         if ('\0' == *q) break;
                         else if (!isdigit(*q)) { numeric = false; break; }
@@ -921,7 +921,7 @@ void serializeVisibleAttributes(IPropertyTree &tree, MemoryBuffer &mb)
     IAttributeIterator *aIter = tree.getAttributes();
     if (aIter->first())
     {
-        loop
+        for (;;)
         {
             const char *attr = aIter->queryName();
             if (0 != strcmp(EXT_ATTR, attr))
@@ -947,7 +947,7 @@ void writeDelta(StringBuffer &xml, IFile &iFile, const char *msg="", unsigned re
     unsigned startCrc = ~0;
     MemoryBuffer header;
     char strNum[17];
-    loop
+    for (;;)
     {
         header.append(deltaHeader);
         try
@@ -1058,7 +1058,7 @@ class CBackupHandler : public CInterface, implements IThreaded
     }
     void clearQueue(BackupQueue &queue)
     {
-        loop
+        for (;;)
         {
             BackupQueueItem *item = queue.dequeue();
             if (!item) break;
@@ -1070,7 +1070,7 @@ class CBackupHandler : public CInterface, implements IThreaded
         Owned<IException> exception;
         unsigned _retryAttempts = retryAttempts;
         StringBuffer rL(remoteBackupLocation);
-        loop
+        for (;;)
         {
             try
             {
@@ -1104,7 +1104,7 @@ class CBackupHandler : public CInterface, implements IThreaded
         Owned<IException> exception;
         unsigned _retryAttempts = retryAttempts;
         StringBuffer rL(remoteBackupLocation);
-        loop
+        for (;;)
         {
             try
             {
@@ -1145,7 +1145,7 @@ class CBackupHandler : public CInterface, implements IThreaded
     void clearOld()
     {
         CriticalBlock b(queueCrit);
-        loop
+        for (;;)
         {
             BackupQueueItem *item = itemQueue.dequeue();
             if (!item) break;
@@ -1312,7 +1312,7 @@ public:
 // IThreaded
     void main()
     {
-        loop
+        for (;;)
         {
             BackupQueueItem *item=NULL;
             do
@@ -1739,7 +1739,7 @@ void buildNotifyData(MemoryBuffer &notifyData, PDState state, CPTStack *stack, M
         if (n>1)
         {
             unsigned s = 1;
-            loop
+            for (;;)
             {
                 PTree &child = stack->item(s);
                 const char *str = child.queryName();
@@ -1801,7 +1801,7 @@ public:
 
     void notify()
     {
-        loop
+        for (;;)
         {
             if (!subscriber.notify(change->notifyData))
             {
@@ -2206,7 +2206,7 @@ StringBuffer &CPTStack::getAbsolutePath(StringBuffer &str)
     if (ordinality()>1)
     {
         unsigned i = 1;
-        loop
+        for (;;)
         {
             IPropertyTree *child = &item(i);
             str.append(child->queryName());
@@ -2285,7 +2285,7 @@ void CRemoteTreeBase::deserializeRT(MemoryBuffer &src)
 void CRemoteTreeBase::deserializeChildrenRT(MemoryBuffer &src)
 {
     StringAttr eName;
-    loop
+    for (;;)
     {
         size32_t pos = src.getPos();
         src.read(eName);
@@ -3296,7 +3296,7 @@ class CLock : implements IInterface, public CInterface
     {
         if (INFINITE == timeout)
         {
-            loop
+            for (;;)
             {
                 if (!SDSManager->queryConnection(id))
                     return LockFailed;
@@ -3335,7 +3335,7 @@ class CLock : implements IInterface, public CInterface
         else
         {
             CTimeMon tm(timeout);
-            loop
+            for (;;)
             {
                 if (!SDSManager->queryConnection(id))
                     return LockFailed;
@@ -3906,7 +3906,7 @@ bool checkOldFormat(CServerRemoteTree *parentServerTree, IPropertyTree *tree, Me
     {
         if (CPS_Renames & state)
         {
-            loop
+            for (;;)
             {
                 __int64 id;
                 mb.read(id);
@@ -3937,7 +3937,7 @@ bool checkOldFormat(CServerRemoteTree *parentServerTree, IPropertyTree *tree, Me
 
         if (CPS_Deletions & state)
         {
-            loop
+            for (;;)
             {
                 __int64 id;
                 mb.read(id);
@@ -4027,7 +4027,7 @@ bool translateOldFormat(CServerRemoteTree *parentServerTree, IPropertyTree *pare
     mb.read(hasChildren);
     if (hasChildren)
     {
-        loop
+        for (;;)
         {
             __int64 id;
             int pos = -1;
@@ -4273,7 +4273,7 @@ void CSDSTransactionServer::processMessage(CMessageBuffer &mb)
                 replyMb.init(mb.getSender(), mb.getTag(), mb.getReplyTag());
                 replyMb.append((int)DAMP_SDSREPLY_OK);
                 bool first = true, empty = false;
-                loop
+                for (;;)
                 {
                     mb.read(serverId);
                     if (!serverId) break;
@@ -4699,7 +4699,7 @@ public:
 static bool retryRename(const char *from, const char *to, unsigned maxAttempts, unsigned delay)
 {
     unsigned attempts=maxAttempts;
-    loop
+    for (;;)
     {
         OwnedIFile iFile = createIFile(from);
         try
@@ -4724,7 +4724,7 @@ static bool retryRename(const char *from, const char *to, unsigned maxAttempts,
 static bool retryCopy(const char *from, const char *to, unsigned maxAttempts, unsigned delay)
 {
     unsigned attempts=maxAttempts;
-    loop
+    for (;;)
     {
         StringBuffer _from;
         StringBuffer fname;
@@ -5075,7 +5075,7 @@ class CStoreHelper : implements IStoreHelper, public CInterface
             Owned<IDirectoryIterator> dIter = createDirectoryIterator(location, wcard.str());
             ForEach (*dIter)
             {
-                loop
+                for (;;)
                 {   
                     try { dIter->query().remove(); break; }
                     catch (IException *e)
@@ -5095,7 +5095,7 @@ class CStoreHelper : implements IStoreHelper, public CInterface
                 StringBuffer path(location);
                 path.append(storeInfo->cache);
                 OwnedIFile iFile = createIFile(path.str());
-                loop
+                for (;;)
                 {   
                     try { iFile->remove(); break; }
                     catch (IException *e)
@@ -5156,7 +5156,7 @@ class CStoreHelper : implements IStoreHelper, public CInterface
             wcard.append(base).append(".*");
             Owned<IDirectoryIterator> dIter = createDirectoryIterator(location, wcard.str());
             unsigned totalDelays = 0;
-            loop
+            for (;;)
             {
                 if (dIter->first())
                 {
@@ -5251,7 +5251,7 @@ class CStoreHelper : implements IStoreHelper, public CInterface
             if (detachIPIFile)
             {
                 unsigned a=0;
-                loop
+                for (;;)
                 {
                     try { detachIPIFile->remove(); break; }
                     catch (IException *e)
@@ -5408,7 +5408,7 @@ public:
         OwnedIFile detachedDeltaIFile = createIFile(getDetachedDeltaName(detachPath).str());
         bool detached = detachedDeltaIFile->exists();
         OwnedIFile deltaIFile = createIFile(deltaFilename.str());
-        loop
+        for (;;)
         {
             StringAttr filename;
             IFile *iFile;
@@ -6102,7 +6102,7 @@ void CCovenSDSManager::loadStore(const char *storeName, const bool *abort)
         unsigned l = strlen(EXTERNAL_NAME_PREFIX);
         bool primary = true;
         Owned<IDirectoryIterator> di = createDirectoryIterator(dataPath);
-        loop
+        for (;;)
         {
             try
             {
@@ -6158,7 +6158,7 @@ void CCovenSDSManager::loadStore(const char *storeName, const bool *abort)
         IExternalHandler *extHandler = queryExternalHandler(EF_BinaryValue);
         primary = true;
         UInt64Array missingPrimarys;
-        loop
+        for (;;)
         {
             UInt64Array &fileExts = primary ? primaryExts : backupExts;
             unsigned __int64 refN = refExts.ordinality() ? refExts.item(0) : (unsigned __int64)-1;
@@ -6431,7 +6431,7 @@ StringBuffer &transformToAbsolute(StringBuffer &result, const char *xpath, unsig
     const char *end = xpath+strlen(xpath);
     const char *p = end;
     const char *q = NULL;
-    loop
+    for (;;)
     {
         if (p == xpath)
         {
@@ -7230,7 +7230,7 @@ CServerConnection *CCovenSDSManager::createConnectionInstance(CRemoteTreeBase *r
                     uProp.append(prop).append('-');
                     unsigned l = uProp.length();
                     unsigned n=1;
-                    loop
+                    for (;;)
                     {
                         n += getRandom() % 5; // better chance of finding a mismatch soon.
                         uProp.append(n);
@@ -7323,7 +7323,7 @@ CServerConnection *CCovenSDSManager::createConnectionInstance(CRemoteTreeBase *r
             connection->queryPTreePath().getAbsolutePath(headPath);
             if (headPath.length() && headPath.charAt(0) == '/')
                 headPath.remove(0, 1);
-            loop
+            for (;;)
             {
                 _deltaPath.append('/');
                 IPropertyTree &tree = connection->queryPTreePath().item(s);
@@ -7621,7 +7621,7 @@ void CCovenSDSManager::createConnection(SessionId sessionId, unsigned mode, unsi
             freeExistingLocks.setConnectionId(connectionId);
             try
             {
-                loop
+                for (;;)
                 {
                     try
                     {
@@ -8282,7 +8282,7 @@ public:
     SubCommitType match(const char *head, const char *path)
     {
         bool wild = false;
-        loop
+        for (;;)
         {
             if (wild)
             {

+ 1 - 1
dali/base/dasds.ipp

@@ -204,7 +204,7 @@ public:
         if (ordinality()>1)
         {
             unsigned i = 1;
-            loop
+            for (;;)
             {
                 str.append(item(i).queryName());
                 if (++i >= ordinality())

+ 3 - 3
dali/base/dasess.cpp

@@ -274,7 +274,7 @@ public:
     }
     void addSessionIds(CProcessSessionState &other, bool prevOnly)
     {
-        loop
+        for (;;)
         {
             SessionId id = other.dequeuePreviousSessionId();
             if (!id)
@@ -1166,7 +1166,7 @@ public:
 
     int run()
     {
-        loop {
+        for (;;) {
             contsem.wait();
             if (!running)
                 break;
@@ -1654,7 +1654,7 @@ protected:
         PROGLOG("Session stopping %" I64F "x %s",id,abort?"aborted":"ok");
         CHECKEDCRITICALBLOCK(sessmanagersect,60000);
         // do in multiple stages as may remove one or more sub sessions
-        loop
+        for (;;)
         {
             CIArrayOf<CSessionSubscriptionStub> tonotify;
             SuperHashIteratorOf<CSessionSubscriptionStub> iter(stubTable);

+ 18 - 18
dali/base/dautils.cpp

@@ -444,7 +444,7 @@ void CDfsLogicalFileName::normalizeName(const char *name, StringAttr &res, bool
                 }
             }
         }
-        loop
+        for (;;)
         {
             s+=2;
             const char *ns = strstr(s,"::");
@@ -900,7 +900,7 @@ unsigned CDfsLogicalFileName::numScopes(bool removeforeign) const
         s += localpos;
     // num scopes = number of "::"s
     unsigned ret = 0;
-    loop {
+    for (;;) {
         s = strstr(s,"::");
         if (!s)
             return ret;
@@ -919,7 +919,7 @@ StringBuffer &CDfsLogicalFileName::getScope(StringBuffer &buf,unsigned idx,bool
     if (removeforeign)
         s += localpos;
     // num scopes = number of "::"s
-    loop {
+    for (;;) {
         const char *p = s;
         s = strstr(s,"::");
         if (idx--==0) {
@@ -942,7 +942,7 @@ StringBuffer &CDfsLogicalFileName::makeScopeQuery(StringBuffer &query, bool abso
     // returns full xpath for containing scope
     const char *s=get(true);    // skip foreign
     bool first=true;
-    loop {
+    for (;;) {
         const char *e=strstr(s,"::");
         if (!e)
             break;
@@ -967,7 +967,7 @@ StringBuffer &CDfsLogicalFileName::makeXPathLName(StringBuffer &lfnNodeName) con
 {
     const char *s=get(true);    // skip foreign
     // Ensure only chars that are accepted by jptree in an xpath element are used
-    loop
+    for (;;)
     {
         const char *e=strstr(s,"::");
         if ((e && 0 != strncmp(".", s, e-s)) || (!e && !streq(".", s))) // skip '.' scopes
@@ -1070,7 +1070,7 @@ bool CDfsLogicalFileName::getExternalPath(StringBuffer &dir, StringBuffer &tail,
         s += 2;                 // no leading '\'
     const char *s1=s;
     const char *t1=NULL;
-    loop {
+    for (;;) {
         s1 = strstr(s1,"::");
         if (!s1)
             break;
@@ -1169,7 +1169,7 @@ bool CDfsLogicalFileName::setFromMask(const char *fname,const char *rootdir)
         fname++;
     }
     StringBuffer logicalName;
-    loop {
+    for (;;) {
         if (*fname==0)  // we didn't find tail
             return false;
         if (isPathSepChar(*fname))
@@ -1179,7 +1179,7 @@ bool CDfsLogicalFileName::setFromMask(const char *fname,const char *rootdir)
                 if (strchr(fname+1,'.')==NULL) { // check for multiple extension
                     fname++;
                     if (*fname=='_') {
-                        loop {
+                        for (;;) {
                             fname++;
                             if (!*fname)
                                 return false;
@@ -1347,7 +1347,7 @@ IPropertyTree *deserializePartAttr(MemoryBuffer &mb)
         pt->setProp(NULL, val);
     }
     if (flags&PAF_HAS_SUB) {
-        loop {
+        for (;;) {
             StringAttr name;
             mb.read(name);
             if (name.length()==0)
@@ -1358,7 +1358,7 @@ IPropertyTree *deserializePartAttr(MemoryBuffer &mb)
     StringAttr _aname;
     StringAttr avalue;
     StringBuffer aname("@");
-    loop {
+    for (;;) {
         mb.read(_aname);
         if (!_aname.length())
             break;
@@ -1429,7 +1429,7 @@ unsigned getFileGroups(const char *grplist,StringArray &groups)
     StringBuffer gs;
     unsigned sq = 0;
     unsigned pa = 0;
-    loop {
+    for (;;) {
         char c = *(s++);
         if (!c||((c==',')&&!sq&&!pa)) {
             gs.clip();
@@ -1546,7 +1546,7 @@ bool shrinkFileTree(IPropertyTree *file)
     IPropertyTree **parts = (IPropertyTree **)calloc(n,sizeof(IPropertyTree *));
 
     unsigned i;
-    loop {
+    for (;;) {
         IPropertyTree *part = file->getBranch("Part[1]");
         if (!part)
             break;
@@ -1728,7 +1728,7 @@ public:
         StringBuffer sk;
         const char *s = sortorder;
         int mod = 0;
-        loop {
+        for (;;) {
             if (!*s||(*s==',')) {
                 if (sk.length()) {
                     // could add '-' and '?' prefixes here (reverse/caseinsensitive)
@@ -1788,7 +1788,7 @@ public:
         else
         {
             unsigned k2=1;
-            loop
+            for (;;)
             {
                 v = sortvalues.item(idx).queryProp(key);
                 if (v || k2 == keys.ordinality())
@@ -2320,7 +2320,7 @@ IClusterFileScanIterator *getClusterFileScanIterator(
         bool next()
         {
             cur.clear();
-            loop {
+            for (;;) {
                 if (fn>=filenames.ordinality())
                     return false;
                 const char *fns = filenames.item(fn++);
@@ -2714,7 +2714,7 @@ public:
         bool next()
         {
             StringBuffer out;
-            loop {
+            for (;;) {
                 idx++;
                 if (idx>=parent.nmaps)
                     break;
@@ -2887,7 +2887,7 @@ void safeChangeModeWrite(IRemoteConnection *conn,const char *name,bool &reload,
     unsigned steptime = 1000*60*5;
     if ((timeoutms!=INFINITE)&&(steptime>timeoutms/2))
         steptime = timeoutms/2;
-    loop {
+    for (;;) {
         try {
             if ((timeoutms!=INFINITE)&&(steptime>timeoutms))
                 steptime = timeoutms;
@@ -3261,7 +3261,7 @@ public:
             CDateTime timeLocked;
             StringBuffer timeStr;
             unsigned c = 0;
-            loop
+            for (;;)
             {
                 CLockMetaData &lD = *ldInfo.item(c);
                 unsigned lockedFor = msNow-lD.timeLockObtained;

+ 1 - 1
dali/dafilesrv/dafscontrol.cpp

@@ -301,7 +301,7 @@ int main(int argc, char* argv[])
             quiet = true;
             ac--;
         }
-        loop {
+        for (;;) {
             if (ai>=ac) {
                 usage();
                 break;

+ 5 - 5
dali/daliadmin/daliadmin.cpp

@@ -185,7 +185,7 @@ static unsigned __int64 hextoll(const char *str, bool &error)
     unsigned __int64 factor = 1;
     unsigned __int64 rolling = 0;
     char *ptr = (char *)str+len-1;
-    loop {
+    for (;;) {
         char c = *ptr;
         unsigned v;
         if (isdigit(c))
@@ -451,7 +451,7 @@ static void xget(const char *path)
             StringBuffer res;
             res.append(idx).append(',');
             s = props;
-            loop {
+            for (;;) {
                 const char *e = strchr(s,',');
                 if (e&&e[1]) {
                     StringBuffer prop(e-s,s);
@@ -878,7 +878,7 @@ static void dfsparents(const char *lname, IUserDescriptor *user)
 
 static void dfsunlink(const char *lname, IUserDescriptor *user)
 {
-    loop
+    for (;;)
     {
         Owned<IDistributedFile> file = queryDistributedFileDirectory().lookup(lname,user,false,false,true);
         if (!file)
@@ -1230,7 +1230,7 @@ static void checksuperfile(const char *lfn,bool fix=false)
     unsigned subnum = 0;
     unsigned i;
     for (i=0;i<n;i++) {
-        loop {
+        for (;;) {
             IPropertyTree *sub2 = root->queryPropTree(path.clear().appendf("SubFile[@num=\"%d\"][2]",i+1).str());
             if (!sub2)
                 break;
@@ -1326,7 +1326,7 @@ static void checksuperfile(const char *lfn,bool fix=false)
         root->setPropInt("@numsubfiles",subnum);
     i = 0;
     byte fixstate = 0;
-    loop {
+    for (;;) {
         bool err = false;
         IPropertyTree *sub = root->queryPropTree(path.clear().appendf("SubFile[%d]",i+1).str());
         if (sub) {

+ 6 - 6
dali/dalidiag/dalidiag.cpp

@@ -137,7 +137,7 @@ void timeQorSDS(bool timeq)
     HiresTimer hrt;
     unsigned last = msTick();
     PrintLog("last 10   last 100 last 1000 change");
-    loop {
+    for (;;) {
         i++;
         hrt.reset();
         if (timeq) {
@@ -393,14 +393,14 @@ void nqPingPong(const char *q,const char *q2)
         MemoryBuffer mb;
         while (channel2->probe())
             channel2->get(mb.clear());
-        loop {
+        for (;;) {
             Sleep(getRandom()%500);
             PROGLOG("queue put to %s",q);
             mb.clear().append(q2);
             channel1->put(mb);
             Sleep(getRandom()%500);
             PROGLOG("queue got from %s",q2);
-            loop {
+            for (;;) {
                 channel2->get(mb.clear(),60*1000);
                 if (mb.length())
                     break;
@@ -419,7 +419,7 @@ void nqPingPong(const char *q,const char *q2)
             Owned<IQueueChannel> channel1=qconn->open(q);
             while (channel1->probe())
                 channel1->get(mb.clear());
-            loop {
+            for (;;) {
                 Sleep(getRandom()%1000);
                 channel1->get(mb.clear(),60*1000);
                 StringAttr replyq;
@@ -467,7 +467,7 @@ static unsigned __int64 hextoll(const char *str, bool *error=NULL)
     unsigned __int64 factor = 1;
     unsigned __int64 rolling = 0;
     char *ptr = (char *)str+len-1;
-    loop
+    for (;;)
     {
         char c = *ptr;
         unsigned v;
@@ -695,7 +695,7 @@ int main(int _argc, char* argv[])
                     break;
                 }
                 else {
-                    loop {
+                    for (;;) {
                         getDaliDiagnosticValue(arg,buf.clear());
                         if (stricmp(arg,"build")==0) {
                             if (strcmp(buf.str(),"$I""d$")==0)

+ 7 - 7
dali/datest/datest.cpp

@@ -988,7 +988,7 @@ void QTest(bool testput)
             }
             else {
 #if 1
-                loop {
+                for (;;) {
                     if (channel->get(mb,0,100))
                         break;
                     printf(".");
@@ -1056,7 +1056,7 @@ void Test_Session(const char *eps) // test for sessions
     cnotify->sem.wait();
     INode *node = createINode(eps,7777);
     SessionId id;
-    loop {
+    for (;;) {
         id = querySessionManager().lookupProcessSession(node);
         if (id) {
             PrintLog("Session looked up %" I64F "d",id);
@@ -1314,7 +1314,7 @@ public:
     }
     virtual int run()
     {
-        loop
+        for (;;)
         {
             conn->queryRoot()->setPropInt("testprop", rand()*100);
             conn->commit();
@@ -2322,7 +2322,7 @@ public:
                 conn.setown(querySDS().connect(xpath.get(), myProcessSession(), mode, 10000*MDELAY));
                 if (!conn)
                 {
-                    loop
+                    for (;;)
                     {
                         PROGLOG("creating initial branch");
                         conn.setown(querySDS().connect(xpath.get(), myProcessSession(), RTM_CREATE| RTM_LOCK_WRITE, 10000*MDELAY));
@@ -2393,7 +2393,7 @@ void TestSDS3(IGroup *group)
     SDS3Params params;
     params.reinitLock = &reinitLock;
     params.group = group;
-    loop
+    for (;;)
     {
         pool->start(&params, NULL, 50000); // keep starting them as they become available
     }
@@ -2825,7 +2825,7 @@ public:
     int run()
     {
         try {
-            loop {
+            for (;;) {
                 Sleep(getRandom()%1000);
                 unsigned i = getRandom()%NCCS;
                 PrintLog("%s locking %d",name,i);
@@ -2891,7 +2891,7 @@ public:
     int run()
     {
         try {
-            loop {
+            for (;;) {
                 unsigned i = getRandom()%NMEMPTRS;
                 if (ptrs[i])
                     free(ptrs[i]);

+ 2 - 2
dali/datest/floodtest.cpp

@@ -143,7 +143,7 @@ public:
         try {
             MemoryBuffer mb;
             bool first = true;
-            loop
+            for (;;)
             {
                 size32_t sz = sock->receive_block_size();
                 if (sz==0)
@@ -823,7 +823,7 @@ void floodtestServer(const char *exename,const char *daliserver,const char *grpn
     unsigned starttime;
     __int64 total=0;
     SocketEndpointArray epa;
-    loop {
+    for (;;) {
         schannel->get(mb.clear());
         unsigned fn;
         mb.read(fn);

+ 1 - 1
dali/dfu/dfurepl.cpp

@@ -150,7 +150,7 @@ struct ReplicatePartItem: extends CInterface
     }
     void waitReplicate()
     {
-        loop {
+        for (;;) {
             bool alldone=true;
             ForEachItemIn(i1,copies) {  
                 if (!copies.item(i1).doneCopy(1000*60)) 

+ 1 - 1
dali/dfu/dfurun.cpp

@@ -236,7 +236,7 @@ class CDFUengine: public CInterface, implements IDFUengine
                         e->Release();
                     }
                 }
-                loop {
+                for (;;) {
                     unsigned char mode;
                     StringAttr wuid;
                     Owned<IJobQueueItem> item = queue->dequeue(timeout);

+ 1 - 1
dali/dfu/dfuserver.cpp

@@ -179,7 +179,7 @@ int main(int argc, const char *argv[])
             addAbortHandler(exitDFUserver);
         }
         const char *q = queue.str();
-        loop {
+        for (;;) {
             StringBuffer subq;
             const char *comma = strchr(q,',');
             if (comma)

+ 8 - 8
dali/dfu/dfuwu.cpp

@@ -138,7 +138,7 @@ DFUcmd decodeDFUcommand(const char * str)
     if (!str)
         return DFUcmd_none;
     unsigned i=0;
-    loop {
+    for (;;) {
         const char *cmp=DFUcmds[i].str;
         if (!*cmp||(stricmp(str,cmp)==0))
             break;
@@ -150,7 +150,7 @@ DFUcmd decodeDFUcommand(const char * str)
 StringBuffer &encodeDFUcommand(DFUcmd cmd,StringBuffer &str)
 {
     unsigned i=0;
-    loop {
+    for (;;) {
         if (!*DFUcmds[i].str||(DFUcmds[i].val==(int)cmd))
             break;
         i++;
@@ -163,7 +163,7 @@ DFUstate decodeDFUstate(const char * str)
     if (!str)
         return DFUstate_unknown;
     unsigned i=0;
-    loop {
+    for (;;) {
         const char *cmp=DFUstates[i].str;
         if (!*cmp||(stricmp(str,cmp)==0))
             break;
@@ -175,7 +175,7 @@ DFUstate decodeDFUstate(const char * str)
 StringBuffer &encodeDFUstate(DFUstate state,StringBuffer &str)
 {
     unsigned i=0;
-    loop {
+    for (;;) {
         if (!*DFUstates[i].str||(DFUstates[i].val==(int)state))
             break;
         i++;
@@ -202,7 +202,7 @@ DFUsortfield decodeDFUsortfield(const char * s)
         s++;
     }
     unsigned i=0;
-    loop {
+    for (;;) {
         const char *cmp=DFUsortfields[i].str;
         if (!*cmp||(DFUsortfields[i].val==(int)DFUsf_term))
             return DFUsf_term;
@@ -225,7 +225,7 @@ StringBuffer &encodeDFUsortfield(DFUsortfield fmt,StringBuffer &str,bool incmodi
     }
     fmt = (DFUsortfield)(((int)fmt)&0xff);
     unsigned i=0;
-    loop {
+    for (;;) {
         if ((DFUsortfields[i].val==(int)DFUsf_term)||(DFUsortfields[i].val==(int)fmt))
             break;
         i++;
@@ -1151,7 +1151,7 @@ public:
     void setLogicalName(const char *val)
     {
         const char *tail=val;
-        loop {
+        for (;;) {
             const char *n = strstr(tail,"::");
             if (!n)
                 break;
@@ -2483,7 +2483,7 @@ public:
             CriticalBlock block(crit);
             subscribe();
         }
-        loop {
+        for (;;) {
             DFUstate ret = queryProgress(true)->getState();
             switch (ret) {
             case DFUstate_aborted:

+ 3 - 3
dali/dfuXRefLib/XRefFilesNode.cpp

@@ -111,7 +111,7 @@ static bool checkPartsInCluster(const char *title,const char *clustername, IProp
         unsigned pn = part.getPropInt("Num");
         for (int rep=0;rep<2;rep++) {
             i = 0;
-            loop {
+            for (;;) {
                 i++;
                 xpath.clear().appendf(rep?"RNode[%d]":"Node[%d]",i);
                 if (!part.hasProp(xpath.str())) 
@@ -172,7 +172,7 @@ bool CXRefFilesNode::RemovePhysical(const char *Partmask,IUserDescriptor* udesc,
         /////////////////////////////////
         StringBuffer xpath;
         unsigned i = 0;
-        loop {
+        for (;;) {
             i++;
             xpath.clear().appendf("Node[%d]",i);
             if (!part.hasProp(xpath.str())) 
@@ -183,7 +183,7 @@ bool CXRefFilesNode::RemovePhysical(const char *Partmask,IUserDescriptor* udesc,
             files.append(rmtFile);
         }
         i = 0;
-        loop {
+        for (;;) {
             i++;
             xpath.clear().appendf("RNode[%d]",i);
             if (!part.hasProp(xpath.str())) 

+ 3 - 3
dali/dfuXRefLib/dfurdir.cpp

@@ -66,7 +66,7 @@ public:
         Owned<IFile> dir = createIFile(rfn);
         if (!port) {
             unsigned retrycount = 0;
-            loop {
+            for (;;) {
                 try {
                     dir->isDirectory(); // kludge to force connection
                     break;
@@ -177,7 +177,7 @@ IPropertyTree *getDirectory(const char * directory, INode * node, unsigned short
 {
     //DBGLOG("IPropertyTree * getDirectory");
     unsigned retries = 0;
-    loop {
+    for (;;) {
         StringAttr nextDir;
         try {
             Owned<IPropertyTree> dirTree = createPTree("machine");
@@ -187,7 +187,7 @@ IPropertyTree *getDirectory(const char * directory, INode * node, unsigned short
 
             XREFDirectoryBuilder builder;
             const char * cur = directory;
-            loop
+            for (;;)
             {
                 const char * sep = strchr(cur, ';');
                 if (sep)

+ 7 - 7
dali/dfuXRefLib/dfuxreflib.cpp

@@ -230,7 +230,7 @@ StringBuffer &substnum(StringBuffer &str,const char *sub,unsigned n)
 static StringBuffer &makeScopeQuery(const char *scope,StringBuffer &query)
 {
     const char *s=scope;
-    loop {
+    for (;;) {
         const char *e=strstr(s,"::");
         if (s!=scope)
             query.append('/');
@@ -251,7 +251,7 @@ static const char *splitScope(const char *name,StringBuffer &scope)
 {
     const char *s=strstr(name,"::");
     if (s) {
-        loop {
+        for (;;) {
             const char *ns = strstr(s+2,"::");
             if (!ns)
                 break;
@@ -846,7 +846,7 @@ static bool constructLogicalName(const char *fullname,const char *basedir,String
     if (!*fullname)
         return false;
     const char *s=fullname;
-    loop {
+    for (;;) {
         const char *e=s;
         while (*e&&!isPathSepChar(*e)) 
             e++;
@@ -860,7 +860,7 @@ static bool constructLogicalName(const char *fullname,const char *basedir,String
     const char *ext = strchr(s,'.');
     if (!ext)
         return false;
-    loop {
+    for (;;) {
         const char *ne = strchr(ext+1,'.');
         if (!ne)
             break;
@@ -922,7 +922,7 @@ static bool parseFileName(const char *name,StringBuffer &mname,unsigned &num,uns
         name = nonrepdir.str();
     num = 0;
     max = 0;
-    loop {
+    for (;;) {
         char c=*name;
         if (!c)
             break;
@@ -1520,7 +1520,7 @@ void loadFromDFS(CXRefManagerBase &manager,IGroup *grp,unsigned numdirs,const ch
                 const char *partmask = file.queryProp("@partmask");
                 const char *partdir = file.queryProp("@directory");
                 int replicateoffset = file.getPropInt("@replicateOffset",1);
-                loop {
+                for (;;) {
                     RemoteFilename rfn; 
                     IGroup *grp = lnentry->queryGroup();
                     if (!grp) {
@@ -1908,7 +1908,7 @@ class CXRefManager: public CXRefManagerBase
             void scanfile(SocketEndpoint &ep,const char *fullname,IPropertyTree *file)
             {
                 const char * tail = fullname;
-                loop {
+                for (;;) {
                     const char *s = strchr(tail,pathsepchar);
                     if (!s)
                         break;

+ 1 - 1
dali/dfuplus/dfuplus.cpp

@@ -121,7 +121,7 @@ bool CDfuPlusHelper::runLocalDaFileSvr(SocketEndpoint &listenep,bool requireauth
         dafsthread.setown(thr.getClear());
     }
     else {
-        loop {
+        for (;;) {
             Sleep(500);
             if (thr->idleTime()>timeout) {
                 thr->stop();

+ 3 - 3
dali/ft/daftdir.cpp

@@ -396,7 +396,7 @@ bool processDirCommand(ISocket * masterSocket, MemoryBuffer & cmd, MemoryBuffer
 
     StringAttr nextDir;
     const char * cur = directory;
-    loop
+    for (;;)
     {
         const char * sep = strchr(cur, ';');
         if (sep)
@@ -471,7 +471,7 @@ bool DirectoryThread::performCommand()
             throwError1(RFSERR_TimeoutWaitConnect, url.str());
 
         bool done;
-        loop
+        for (;;)
         {
             msg.clear();
             if (!catchReadBuffer(socket, msg, FTTIME_DIRECTORY))
@@ -834,7 +834,7 @@ void doPhysicalCopy(IPropertyTree * source, const char * target, IPropertyTree *
             throwError1(RFSERR_TimeoutWaitConnect, url.str());
 
         bool done;
-        loop
+        for (;;)
         {
             msg.clear();
             if (!catchReadBuffer(socket, msg, FTTIME_DIRECTORY))

+ 5 - 5
dali/ft/daftformat.cpp

@@ -984,7 +984,7 @@ void CCsvQuickPartitioner::findSplitPoint(offset_t splitOffset, PartitionCursor
                 {
                     //For large
                     size32_t ensureSize = numInBuffer-bufferOffset;
-                    loop
+                    for (;;)
                     {
                         try
                         {
@@ -1323,7 +1323,7 @@ void CUtfQuickPartitioner::findSplitPoint(offset_t splitOffset, PartitionCursor
                 {
                     //For large
                     size32_t ensureSize = numInBuffer-bufferOffset;
-                    loop
+                    for (;;)
                     {
                         try
                         {
@@ -1524,7 +1524,7 @@ offset_t XmlSplitter::getHeaderLength(BufferedDirectReader & reader)
     offset_t startOfHeader = reader.tell();
     offset_t startOfLine = startOfHeader;
 
-    loop
+    for (;;)
     {
         if (reader.ensure(maxElementLength) == 0)
             throwError(DFTERR_CannotFindFirstXmlRecord);
@@ -1573,7 +1573,7 @@ offset_t XmlSplitter::getFooterLength(BufferedDirectReader & reader, offset_t si
     offset_t xmlFooterOffset = (offset_t)-1;
     bool inTag = false;
 
-    loop
+    for (;;)
     {
         if (reader.ensure(maxElementLength) == 0)
         {
@@ -1754,7 +1754,7 @@ void CXmlQuickPartitioner::findSplitPoint(offset_t splitOffset, PartitionCursor
         if (numInBuffer != bufferOffset)
         {
             size32_t ensureSize = numInBuffer-bufferOffset;
-            loop
+            for (;;)
             {
                 size32_t sizeAvailable = numInBuffer - bufferOffset;
                 size32_t sizeRecord = splitter.getEndOfRecord(buffer+bufferOffset, sizeAvailable);

+ 4 - 4
dali/ft/filecopy.cpp

@@ -244,7 +244,7 @@ bool FileTransferThread::catchReadBuffer(ISocket * socket, MemoryBuffer & msg, u
     unsigned nowTime = msTick();
 
     unsigned abortCheckTimeout = 120*1000;
-    loop
+    for (;;)
     {
         try
         {
@@ -377,7 +377,7 @@ bool FileTransferThread::performTransfer()
             throwError1(RFSERR_TimeoutWaitConnect, url.str());
 
         bool done;
-        loop
+        for (;;)
         {
             msg.clear();
             if (!catchReadBuffer(socket, msg, FTTIME_PROGRESS))
@@ -495,7 +495,7 @@ int FileSizeThread::run()
     try
     {
         RemoteFilename remoteFilename;
-        loop
+        for (;;)
         {
             cur.clear();
             cs.enter();
@@ -1824,7 +1824,7 @@ void FileSprayer::gatherFileSizes(FilePartInfoArray & fileSizeQueue, bool errorI
             threads.append(*new FileSizeThread(fileSizeQueue, fileSizeCS, compressedInput&&!copyCompressed, errorIfMissing));
         for (idx = 0; idx < numThreads; idx++)
             threads.item(idx).start();
-        loop {
+        for (;;) {
             bool alldone = true;
             StringBuffer err;
             for (idx = 0; idx < numThreads; idx++) {

+ 1 - 1
dali/ft/fttransform.cpp

@@ -522,7 +522,7 @@ void TransferServer::appendTransformed(unsigned chunkIndex, ITransformer * input
     const offset_t startInputOffset = curPartition.inputOffset;
     const offset_t startOutputOffset = curPartition.outputOffset;
 
-    loop
+    for (;;)
     {
         unsigned gotLength = input->getBlock(out);
         totalLengthRead  += gotLength;

+ 2 - 2
dali/fuse/dafuse.cpp

@@ -587,7 +587,7 @@ class CFuseDaliDFS: public CFuseBase
         if (pos==1)
             if (filler(buf, "..", &s, ++pos))
                 return 0;
-        loop {
+        for (;;) {
             bool isscope;
             const char *fn = dci->get((unsigned)pos-2,isscope);
             if (!fn)
@@ -654,7 +654,7 @@ class CFuseDaliDFS: public CFuseBase
             }
             offset_t base;
             unsigned pn = file->getPositionPart(pos,base);
-            loop {
+            for (;;) {
                 if (pn==NotFound)
                     break;
                 IDistributedFilePart &part = file->queryPart(pn);

+ 1 - 1
dali/sasha/sacmd.cpp

@@ -533,7 +533,7 @@ public:
     bool send(INode *node,unsigned timeout)
     {
         unsigned retries = 3;
-        loop {
+        for (;;) {
             try {
                 CMessageBuffer mb;
                 serialize(mb);

+ 1 - 1
dali/sasha/sacoalescer.cpp

@@ -51,7 +51,7 @@ void coalesceDatastore(bool force)
 
         offset_t minDeltaSize = force?0:coalesceProps->getPropInt64("@minDeltaSize", DEFAULT_MINDELTASIZE);
 
-        loop {
+        for (;;) {
             PROGLOG("COALESCER: dataPath=%s, backupPath=%s, minDeltaSize = %" I64F "dK", dataPath.str(), backupPath.str(), (unsigned __int64) minDeltaSize);
             unsigned configFlags = SH_External|SH_CheckNewDelta;
             configFlags |= coalesceProps->getPropBool("@recoverFromIncErrors", false) ? SH_RecoverFromIncErrors : 0;

+ 2 - 2
dali/sasha/saxref.cpp

@@ -47,7 +47,7 @@ inline bool nextCsvToken(const char *&s,StringBuffer &tok)
 {
     if (!s)
         return false;
-    loop {
+    for (;;) {
         if (!*s)
             return false;
         if (*s!=',')
@@ -55,7 +55,7 @@ inline bool nextCsvToken(const char *&s,StringBuffer &tok)
         s++;
     }
     const char *e = s;
-    loop {
+    for (;;) {
         if (!*e||(*e==','))
             break;
         e++;

+ 1 - 1
dali/security/capmaker.cpp

@@ -34,7 +34,7 @@ static unsigned csvread(IIOStream &stream, char *dst, unsigned max, bool stopEOL
 {
     char *p = dst;
     char c;
-    loop
+    for (;;)
     { 
         if (!stream.read(1, &c))
             return 0;

+ 1 - 1
ecl/ecl-bundle/ecl-bundle.cpp

@@ -80,7 +80,7 @@ static int versionCompare(const char *v1, const char *v2, bool strict)
     a1.appendList(v1, ".");
     a2.appendList(v2, ".");
     int i = 0;
-    loop
+    for (;;)
     {
         if (a1.isItem(i) && a2.isItem(i))
         {

+ 7 - 7
ecl/eclagent/eclagent.cpp

@@ -194,7 +194,7 @@ public:
     virtual int run()
     {
         port = HTHOR_DEBUG_BASE_PORT;
-        loop 
+        for (;;)
         {
             try 
             {
@@ -2569,7 +2569,7 @@ bool EclAgent::changePersistLockMode(IRemoteConnection *persistLock, unsigned mo
     //possible.  Otherwise lots of workunits each trying to convert read locks to write locks will mean
     //that the read lock is never released by all the workunits at the same time, so no workunit can progress.
     unsigned timeout = repeat ? PERSIST_LOCK_TIMEOUT : 0;
-    loop
+    for (;;)
     {
         try
         {
@@ -2612,7 +2612,7 @@ IRemoteConnection *EclAgent::getPersistReadLock(const char * logicalName)
 
     LOG(MCrunlock, unknownJob, "Waiting for persist read lock for %s", name);
     Owned<IRemoteConnection> persistLock;
-    loop
+    for (;;)
     {
         try
         {
@@ -2650,7 +2650,7 @@ bool EclAgent::isPersistUptoDate(Owned<IRemoteConnection> &persistLock, IRuntime
     //Loop trying to get a write lock - if it fails, then release the read lock, otherwise
     //you can get a deadlock with several things waiting to read, and none being able to write.
     bool rebuildAllPersists = globals->getPropBool("REBUILDPERSISTS", false);   // Useful for debugging purposes
-    loop
+    for (;;)
     {
         StringBuffer dummy;
         if (checkPersistUptoDate(item, logicalName, eclCRC, allCRC, isFile, dummy) && !rebuildAllPersists)
@@ -3085,7 +3085,7 @@ void EclAgent::abortMonitor()
 {
     StringBuffer errorText;
     unsigned guillotineleft = 0;
-    loop {
+    for (;;) {
         unsigned waittime = ABORT_CHECK_INTERVAL;   
         if (abortmonitor->guillotinetimeout) {
             if (guillotineleft==0) {
@@ -3165,7 +3165,7 @@ IGroup *EclAgent::getHThorGroup(StringBuffer &out)
     unsigned ins = 1;
     SocketEndpoint ep(0,queryMyNode()->endpoint());
     Owned<IGroup> mygrp = createIGroup(1,&ep);
-    loop
+    for (;;)
     {
         Owned<IGroup> grp = queryNamedGroupStore().lookup(mygroupname.str());
         if (!grp)
@@ -4110,7 +4110,7 @@ public:
         {
             if (forceEOF)
                 return NULL;
-            loop
+            for (;;)
             {
                 const void *ret = InputProbe::nextRow();
                 if (!ret)

+ 2 - 2
ecl/eclagent/eclgraph.cpp

@@ -1138,7 +1138,7 @@ void EclGraph::createFromXGMML(ILoadedDllEntry * dll, IPropertyTree * xgmml, boo
 
             EclSubGraph * targetGraph = NULL;
             unsigned targetGraphContext = -1;
-            loop
+            for (;;)
             {
                 targetGraph = targetActivity->subgraph;
                 targetGraphContext = targetGraph->parentActivityId;
@@ -1483,7 +1483,7 @@ void EclAgent::executeThorGraph(const char * graphName)
         unlockWorkUnit();
         if (WUStatePaused == queryWorkUnit()->getState()) // check initial state - and wait if paused
         {
-            loop
+            for (;;)
             {
                 WUAction action = wuFactory->waitForWorkUnitAction(wuid, queryWorkUnit()->getAction());
                 if (action == WUActionUnknown)

+ 2 - 2
ecl/eclcc/eclcc.cpp

@@ -886,7 +886,7 @@ static bool findFilenameInSearchPath(StringBuffer & attributePath, const char *
 {
     const char * cur = searchPath;
     unsigned lenSource = strlen(expandedSourceName);
-    loop
+    for (;;)
     {
         const char * sep = strchr(cur, ENVSEPCHAR);
         StringBuffer curExpanded;
@@ -2329,7 +2329,7 @@ public:
     }
     virtual int run()
     {
-        loop
+        for (;;)
         {
             fileReady.wait();
             IFile * next = queue.dequeue();

+ 1 - 1
ecl/eclccserver/eclccserver.cpp

@@ -138,7 +138,7 @@ public:
         wu->subscribe(SubscribeOptionAbort);
         try
         {
-            loop
+            for (;;)
             {
                 if (sem.wait(2000))
                     break;

+ 2 - 2
ecl/eclcmd/eclcmd_common.cpp

@@ -489,7 +489,7 @@ public:
         if (pipe->hasOutput())
         {
            byte buf[4096];
-           loop
+           for (;;)
            {
                 size32_t read = pipe->read(sizeof(buf),buf);
                 if (!read)
@@ -536,7 +536,7 @@ private:
         virtual int run()
         {
            byte buf[4096];
-           loop
+           for (;;)
            {
                 size32_t read = pipe->readError(sizeof(buf), buf);
                 if (!read)

+ 2 - 2
ecl/eclplus/main.cpp

@@ -84,7 +84,7 @@ void promptFor(const char *prompt, const char *prop, bool hide, IProperties * gl
         DWORD dwInputMode;
         GetConsoleMode(hStdIn, &dwInputMode);   
         SetConsoleMode(hStdIn, dwInputMode & ~ENABLE_LINE_INPUT & ~ENABLE_ECHO_INPUT);
-        loop
+        for (;;)
         {
             /* read a character from the console input */   
             char ch;
@@ -107,7 +107,7 @@ void promptFor(const char *prompt, const char *prop, bool hide, IProperties * gl
             ioctl(fn, TCSETA, &t);
         }
 #endif
-        loop
+        for (;;)
         {
             char ch = fgetc(stdin);
             if (ch == '\n' || ch=='\r' || !ch)

+ 5 - 5
ecl/hql/hqlattr.cpp

@@ -1955,7 +1955,7 @@ unsigned isStreamingActivity(IHqlExpression * expr)
 
 bool isInlineTrivialDataset(IHqlExpression * expr)
 {
-    loop
+    for (;;)
     {
         switch (expr->getOperator())
         {
@@ -1986,7 +1986,7 @@ bool isInlineTrivialDataset(IHqlExpression * expr)
 
 bool isTrivialDataset(IHqlExpression * expr)
 {
-    loop
+    for (;;)
     {
         if (isInlineTrivialDataset(expr))
             return true;
@@ -2079,7 +2079,7 @@ bool increasesRowSize(IHqlExpression * expr)
 
 bool isLimitedDataset(IHqlExpression * expr, bool onFailOnly)
 {
-    loop
+    for (;;)
     {
         if (expr->hasAttribute(limitAtom))
             return true;
@@ -2134,7 +2134,7 @@ bool containsAnyActions(IHqlExpression * expr)
 
 unsigned getCardinality(IHqlExpression * expr)
 {
-    loop
+    for (;;)
     {
         switch (expr->getOperator())
         {
@@ -3137,7 +3137,7 @@ IHqlExpression * queryFixedRowCount(IHqlExpression * expr)
 
 IHqlExpression * queryAttribute(ITypeInfo * type, IAtom * search)
 {
-    loop
+    for (;;)
     {
         typemod_t curModifier = type->queryModifier();
         switch (curModifier)

+ 1 - 1
ecl/hql/hqldsparam.cpp

@@ -184,7 +184,7 @@ IHqlExpression* HqlGram::queryFieldMap(IHqlExpression* expr)
 {
     if (!fieldMapUsed)
         return NULL;
-    loop
+    for (;;)
     {
         if (expr == NULL)
             return NULL;

+ 2 - 2
ecl/hql/hqlesp.cpp

@@ -45,7 +45,7 @@ static bool extractAttributeReference(StringBuffer & attributeName, const char *
 {
     const char * dot = NULL;
     const char * cur = text;
-    loop
+    for (;;)
     {
         char next = *cur;
         if (next == '.' || next == '/')
@@ -98,7 +98,7 @@ static void parseAttribute(IPropertyTree *destTree, const char *text, const char
 
             while (isspace(*text)) text++;
             const char * form = text;
-            loop
+            for (;;)
             {
                 if (text[0]=='*' && text[1]=='/')
                 {

+ 19 - 19
ecl/hql/hqlexpr.cpp

@@ -693,7 +693,7 @@ extern HQL_API IHqlExpression * queryOperator(node_operator search, const HqlExp
 
 extern HQL_API IHqlExpression * queryAnnotation(IHqlExpression * expr, annotate_kind search)
 {
-    loop
+    for (;;)
     {
         annotate_kind kind = expr->getAnnotationKind();
         if (kind == search)
@@ -706,7 +706,7 @@ extern HQL_API IHqlExpression * queryAnnotation(IHqlExpression * expr, annotate_
 
 extern HQL_API IHqlExpression * cloneAnnotationKind(IHqlExpression * donor, IHqlExpression * expr, annotate_kind search)
 {
-    loop
+    for (;;)
     {
         annotate_kind kind = donor->getAnnotationKind();
         if (kind == annotate_none)
@@ -723,7 +723,7 @@ extern HQL_API IHqlExpression * cloneAnnotationKind(IHqlExpression * donor, IHql
 
 extern HQL_API IHqlExpression * cloneInheritedAnnotations(IHqlExpression * donor, IHqlExpression * expr)
 {
-    loop
+    for (;;)
     {
         annotate_kind kind = donor->getAnnotationKind();
         if (kind == annotate_none)
@@ -783,7 +783,7 @@ extern HQL_API IHqlExpression * queryAnnotationAttribute(IAtom * search, IHqlExp
 
 extern HQL_API IHqlExpression * queryMetaAttribute(IAtom * search, IHqlExpression * expr)
 {
-    loop
+    for (;;)
     {
         annotate_kind kind = expr->getAnnotationKind();
         if (kind == annotate_none)
@@ -800,7 +800,7 @@ extern HQL_API IHqlExpression * queryMetaAttribute(IAtom * search, IHqlExpressio
 
 extern HQL_API void gatherMetaAttributes(HqlExprArray & matches, IAtom * search, IHqlExpression * expr)
 {
-    loop
+    for (;;)
     {
         annotate_kind kind = expr->getAnnotationKind();
         if (kind == annotate_none)
@@ -835,7 +835,7 @@ extern HQL_API void gatherAttributes(HqlExprArray & matches, IAtom * search, IHq
 extern HQL_API IHqlExpression * queryLocation(IHqlExpression * expr)
 {
     IHqlExpression * best = NULL;
-    loop
+    for (;;)
     {
         annotate_kind kind = expr->getAnnotationKind();
         if (kind == annotate_none)
@@ -850,7 +850,7 @@ extern HQL_API IHqlExpression * queryLocation(IHqlExpression * expr)
 
 extern HQL_API void gatherLocations(HqlExprCopyArray & matches, IHqlExpression * expr)
 {
-    loop
+    for (;;)
     {
         annotate_kind kind = expr->getAnnotationKind();
         if (kind == annotate_none)
@@ -3038,7 +3038,7 @@ bool isAggregateDataset(IHqlExpression * expr)
 
 bool isAggregatedDataset(IHqlExpression * expr)
 {
-    loop
+    for (;;)
     {
         if (isAggregateDataset(expr))
             return true;
@@ -3489,7 +3489,7 @@ unsigned CHqlExpression::numChildren() const
 
 inline bool matchesTypeCode(ITypeInfo * type, type_t search)
 {
-    loop
+    for (;;)
     {
         if (!type)
             return false;
@@ -3512,7 +3512,7 @@ bool CHqlExpression::isBoolean()
 bool CHqlExpression::isDataset()
 {
     ITypeInfo * cur = queryType();
-    loop
+    for (;;)
     {
         if (!cur)
             return false;
@@ -5283,7 +5283,7 @@ void CUsedTablesBuilder::removeParent(IHqlExpression * expr)
     IHqlExpression * sel = expr->queryNormalizedSelector();
     removeActive(sel);
 
-    loop
+    for (;;)
     {
         IHqlExpression * root = queryRoot(expr);
         if (!root || root->getOperator() != no_select)
@@ -12779,7 +12779,7 @@ extern IHqlExpression *createDatasetFromRow(IHqlExpression * ownedRow)
 
 inline IHqlExpression * normalizeSelectLhs(IHqlExpression * lhs, bool & isNew)
 {
-    loop
+    for (;;)
     {
         switch (lhs->getOperator())
         {
@@ -14694,7 +14694,7 @@ IHqlExpression * replaceSelectorDataset(IHqlExpression * expr, IHqlExpression *
 
 IHqlExpression * querySkipDatasetMeta(IHqlExpression * dataset)
 {
-    loop
+    for (;;)
     {
         switch (dataset->getOperator())
         {
@@ -15190,7 +15190,7 @@ unsigned unwoundCount(IHqlExpression * expr, node_operator op)
 
     unsigned count = 0;
     // comma almost always needs head recursion
-    loop
+    for (;;)
     {
         if (expr->getOperator() != op)
             return count+1;
@@ -16134,7 +16134,7 @@ IHqlExpression * convertToSimpleAggregate(IHqlExpression * expr)
         return NULL;
 
     IHqlExpression * ds = expr->queryChild(0);
-    loop
+    for (;;)
     {
         node_operator op = ds->getOperator();
         if ((op != no_sorted) && (op != no_distributed) && (op != no_unordered) && (op != no_preservemeta) && (op != no_alias_scope))
@@ -16326,7 +16326,7 @@ IHqlExpression * queryOriginalRecord(IHqlExpression * expr)
 
 IHqlExpression * queryOriginalTypeExpression(ITypeInfo * t)
 {
-    loop
+    for (;;)
     {
         typemod_t modifier = t->queryModifier();
         if (modifier == typemod_none)
@@ -16350,7 +16350,7 @@ IHqlExpression * queryOriginalRecord(ITypeInfo * t)
     if (!t)
         return NULL;
 
-    loop
+    for (;;)
     {
         typemod_t modifier = t->queryModifier();
         if (modifier == typemod_none)
@@ -16442,7 +16442,7 @@ IHqlExpression * queryNonDelayedBaseAttribute(IHqlExpression * expr)
     if (!expr)
         return NULL;
 
-    loop
+    for (;;)
     {
         node_operator op = expr->getOperator();
         switch (op)
@@ -16607,7 +16607,7 @@ extern HQL_API IPropertyTree * gatherAttributeDependencies(IEclRepository * data
     HqlLookupContext ctx(parseCtx, errorHandler);
     if (items && *items)
     {
-        loop
+        for (;;)
         {
             const char * comma = strchr(items, ',');
             if (!comma)

+ 8 - 8
ecl/hql/hqlgram2.cpp

@@ -490,7 +490,7 @@ void HqlGram::cleanCurTransform()
 {
     attribute pseudoErrPos;
     pseudoErrPos.pos.clear();
-    loop
+    for (;;)
     {
         IHqlExpression * ret = endTransform(pseudoErrPos);
         if (!ret)
@@ -1771,7 +1771,7 @@ IHqlExpression * HqlGram::forceEnsureExprType(IHqlExpression * expr, ITypeInfo *
 /* All in parms: linked */
 static bool containsSelect(IHqlExpression * expr, IHqlExpression * ds)
 {
-    loop
+    for (;;)
     {
         if (expr == ds)
             return true;
@@ -3067,7 +3067,7 @@ void HqlGram::processForwardModuleDefinition(const attribute & errpos)
     lexObject->getPosition(start);
     int prev = 0;
     YYSTYPE nextToken;
-    loop
+    for (;;)
     {
         int next = lexObject->yyLex(nextToken, false, NULL);
         switch (next)
@@ -6885,7 +6885,7 @@ IHqlExpression * HqlGram::createBuildFileFromTable(IHqlExpression * table, const
 
 IHqlExpression * queryRootIndex(IHqlExpression * index)
 {
-    loop
+    for (;;)
     {
         node_operator op = index->getOperator();
         if (op == no_compound)
@@ -7947,7 +7947,7 @@ bool HqlGram::isExplicitlyDistributed(IHqlExpression *e)
 
 static bool isFromFile(IHqlExpression * expr)
 {
-    loop
+    for (;;)
     {
         switch (expr->getOperator())
         {
@@ -8026,7 +8026,7 @@ bool HqlGram::isDiskFile(IHqlExpression * expr)
 
 bool HqlGram::isFilteredDiskFile(IHqlExpression * expr)
 {
-    loop
+    for (;;)
     {
         switch (expr->getOperator())
         {
@@ -9173,7 +9173,7 @@ bool HqlGram::isVirtualFunction(DefineIdSt * defineid, const attribute & errpos)
 //Allow the types to be grouped by different expressions, and sorted by different fields.
 static bool isEquivalentType(ITypeInfo * derivedType, ITypeInfo * baseType)
 {
-    loop
+    for (;;)
     {
         if (isSameUnqualifiedType(derivedType, baseType))
             return true;
@@ -10316,7 +10316,7 @@ void HqlGram::canNotAssignTypeWarn(ITypeInfo* expected, ITypeInfo* given, const
 IIdAtom * HqlGram::getNameFromExpr(attribute& attr)
 {
     OwnedHqlExpr expr = attr.getExpr();
-    loop
+    for (;;)
     {
         IHqlExpression * name = queryNamedSymbol(expr);
         if (name)

+ 2 - 2
ecl/hql/hqlir.cpp

@@ -976,7 +976,7 @@ private:
 void BinaryIRPlayer::process()
 {
     seq = 1;
-    loop
+    for (;;)
     {
         byte element;
         read(element);
@@ -1085,7 +1085,7 @@ exprid_t BinaryIRPlayer::readExpr()
     info.type = readId();
     info.id = readSymId();
     info.name = readName();
-    loop
+    for (;;)
     {
         exprid_t id = readId();
         if (!id)

+ 1 - 1
ecl/hql/hqlmeta.cpp

@@ -1774,7 +1774,7 @@ IHqlExpression * createMatchingDistribution(IHqlExpression * expr, const HqlExpr
 
 static IHqlExpression * queryColocalDataset(IHqlExpression * expr)
 {
-    loop
+    for (;;)
     {
         switch (expr->getOperator())
         {

+ 3 - 3
ecl/hql/hqlopt.cpp

@@ -579,7 +579,7 @@ IHqlExpression * CTreeOptimizer::optimizeAggregateDataset(IHqlExpression * trans
     bool insideShared = false;
     bool isScalarAggregate = (aggOp != no_newaggregate) && (aggOp != no_aggregate);
     bool isSimpleCount = isSimpleCountExistsAggregate(transformed, false, true);
-    loop
+    for (;;)
     {
         node_operator dsOp = ds->getOperator();
         IHqlExpression * next = NULL;
@@ -715,7 +715,7 @@ IHqlExpression * CTreeOptimizer::optimizeAggregateDataset(IHqlExpression * trans
 
 static IHqlExpression * skipMetaAliases(IHqlExpression * expr)
 {
-    loop
+    for (;;)
     {
         switch (expr->getOperator())
         {
@@ -1873,7 +1873,7 @@ bool CTreeOptimizer::isWorthMovingProjectOverLimit(IHqlExpression * project)
         return false;
 
     IHqlExpression * expr = project->queryChild(0);
-    loop
+    for (;;)
     {
         switch (expr->getOperator())
         {

+ 2 - 2
ecl/hql/hqlparse.cpp

@@ -680,7 +680,7 @@ void HqlLex::processEncrypted()
         return;
     }
     StringBuffer encoded64;
-    loop
+    for (;;)
     {
         if (yyLex(nextToken, false,0) != STRING_CONST)
         {
@@ -2509,7 +2509,7 @@ void HqlLex::enterEmbeddedMode()
 
 int HqlLex::yyLex(YYSTYPE & returnToken, bool lookup, const short * activeState)
 {
-    loop
+    for (;;)
     {
         while (inmacro)
         {

+ 1 - 1
ecl/hql/hqlpmap.cpp

@@ -932,7 +932,7 @@ bool leftRecordIsSubsetOfRight(IHqlExpression * left, IHqlExpression * right)
         if (nextLeft->isAttribute())
             continue;
         IHqlExpression * nextRight;
-        loop
+        for (;;)
         {
             nextRight = right->queryChild(rightIndex++);
             if (!nextRight)

+ 5 - 5
ecl/hql/hqlpregex.cpp

@@ -103,7 +103,7 @@ unsigned RegexParser::readNumber()
     if ((first < '0') || (first > '9'))
         illegal();
     unsigned value = (first - '0');
-    loop
+    for (;;)
     {
         unsigned x = next();
         if ((x < '0') || (x > '9'))
@@ -131,7 +131,7 @@ IHqlExpression * RegexParser::parse0()
     if (next() == '|' || next() == PatEOF || next() == ')')
         return createValue(no_null, makePatternType());
     OwnedHqlExpr prev = parse1();
-    loop
+    for (;;)
     {
         switch (next())
         {
@@ -150,7 +150,7 @@ IHqlExpression * RegexParser::parse0()
 IHqlExpression * RegexParser::parse1()
 {
     OwnedHqlExpr arg = parse2();
-    loop
+    for (;;)
     {
         unsigned low = 0;
         unsigned high = PATTERN_UNLIMITED_LENGTH;
@@ -292,7 +292,7 @@ IHqlExpression * RegexParser::parse2()
         const byte * start = cur;
         advance();
         unsigned restorePos = getPos();
-        loop
+        for (;;)
         {
             if (done())
                 break;
@@ -376,7 +376,7 @@ IHqlExpression * RegexParser::parseSetBound()
             {
                 advance();
                 StringBuffer name;
-                loop
+                for (;;)
                 {
                     unsigned c = nextAdvance();
                     if (c == PatEOF)

+ 1 - 1
ecl/hql/hqlrepository.cpp

@@ -91,7 +91,7 @@ IHqlExpression * getResolveAttributeFullPath(const char * attrname, unsigned loo
 {
     Linked<IHqlScope> parentScope = ctx.queryRepository()->queryRootScope();
     const char * item = attrname;
-    loop
+    for (;;)
     {
         const char * dot = strchr(item, '.');
         IIdAtom * moduleName;

+ 3 - 3
ecl/hql/hqlthql.cpp

@@ -231,7 +231,7 @@ StringBuffer &HqltHql::makeUniqueName(IHqlExpression * expr, StringBuffer &s)
             else
             {
                 const char * moduleNameText = str(lower(moduleName));
-                loop
+                for (;;)
                 {
                     const char * dot = strchr(moduleNameText, '.');
                     if (!dot)
@@ -282,7 +282,7 @@ void HqltHql::popMapping()
 
 IHqlExpression * HqltHql::queryMapped(IHqlExpression * expr)
 {
-    loop
+    for (;;)
     {
         IHqlExpression * extra = (IHqlExpression *)expr->queryTransformExtra();
         if (!extra || extra->isAttribute() || extra == expr)
@@ -836,7 +836,7 @@ void HqltHql::toECL(IHqlExpression *expr, StringBuffer &s, bool paren, bool inTy
     if(paren)
         s.append('(');
 
-    loop
+    for (;;)
     {
         annotate_kind kind = expr->getAnnotationKind();
         if ((kind == annotate_none) || (kind == annotate_symbol))

+ 7 - 7
ecl/hql/hqltrans.cpp

@@ -997,7 +997,7 @@ IHqlScope * QuickHqlTransformer::transform(IHqlScope * scope)
 
 void QuickHqlTransformer::setMapping(IHqlExpression * oldValue, IHqlExpression * newValue)
 {
-    loop
+    for (;;)
     {
         oldValue->setTransformExtra(newValue);
         IHqlExpression * body = oldValue->queryBody(true);
@@ -1019,7 +1019,7 @@ QuickExpressionReplacer::QuickExpressionReplacer()
 
 void QuickExpressionReplacer::setMapping(IHqlExpression * oldValue, IHqlExpression * newValue)
 {
-    loop
+    for (;;)
     {
         oldValue->setTransformExtra(newValue);
         IHqlExpression * body = oldValue->queryBody(true);
@@ -1670,7 +1670,7 @@ IHqlExpression * NewHqlTransformer::getTransformedChildren(IHqlExpression * expr
 
 void NewHqlTransformer::initializeActiveSelector(IHqlExpression * expr, IHqlExpression * transformed)
 {
-    loop
+    for (;;)
     {
         setTransformedSelector(expr->queryNormalizedSelector(), transformed->queryNormalizedSelector());
         if (!expr->queryDataset())  // parent could be a row. e.g., LEFT.childDataset
@@ -1716,7 +1716,7 @@ ANewTransformInfo * NewHqlTransformer::queryTransformExtra(IHqlExpression * expr
 
 void NewHqlTransformer::stopDatasetTransform(IHqlExpression * expr)
 {
-    loop
+    for (;;)
     {
         IHqlExpression * prev;
         do
@@ -1935,7 +1935,7 @@ void NewHqlTransformer::setMapping(IHqlExpression * oldValue, IHqlExpression * n
 
 void NewHqlTransformer::setMappingOnly(IHqlExpression * oldValue, IHqlExpression * newValue)
 {
-    loop
+    for (;;)
     {
         setTransformed(oldValue, newValue);
         IHqlExpression * body = oldValue->queryBody(true);
@@ -1968,7 +1968,7 @@ IHqlExpression * NewHqlTransformer::doUpdateOrphanedSelectors(IHqlExpression * e
 
     LinkedHqlExpr updated = transformed;
     IHqlExpression * ds = expr->queryChild(0);
-    loop
+    for (;;)
     {
         if (newDs == ds)
             return updated.getClear();
@@ -2103,7 +2103,7 @@ IHqlExpression * HqlMapSelectorTransformer::createTransformed(IHqlExpression * e
     //then ensure the selectors aren't replaced in this operator's arguments.
     IHqlExpression * dataset = expr->queryChild(0);
     IHqlExpression * walker = dataset;
-    loop
+    for (;;)
     {
         IHqlExpression * table = queryTable(walker);
         if (table)

+ 2 - 2
ecl/hql/hqlusage.cpp

@@ -61,7 +61,7 @@ static void calcNumUniqueExpressions(IHqlExpression * expr, ExpressionStatsInfo
     expr->setTransformExtraUnlinked(expr);
 
     //use head recursion
-    loop
+    for (;;)
     {
         info.count++;
         unsigned max = expr->numChildren();
@@ -556,7 +556,7 @@ void SourceFieldTracker::analyseExpr(IHqlExpression * expr)
 
 bool SourceFieldTracker::isSelected(IHqlExpression * expr) const
 {
-    loop
+    for (;;)
     {
         if (expr->getOperator() != no_select)
             return false;

+ 12 - 12
ecl/hql/hqlutil.cpp

@@ -398,7 +398,7 @@ bool containsOnlyLeft(IHqlExpression * expr, bool ignoreSelfOrFilepos)
 
 IHqlExpression * queryPhysicalRootTable(IHqlExpression * expr)
 {
-    loop
+    for (;;)
     {
         switch (expr->getOperator())
         {
@@ -1725,7 +1725,7 @@ public:
 static IHqlExpression * walkHints(IHqlExpression * expr, IHintVisitor & visitor)
 {
     //First look for any hint annotations.
-    loop
+    for (;;)
     {
         annotate_kind kind = expr->getAnnotationKind();
         if (kind == annotate_meta)
@@ -2975,7 +2975,7 @@ bool RecordSelectIterator::doNext()
 {
     while (indices.ordinality())
     {
-        loop
+        for (;;)
         {
             unsigned next = indices.tos();
             IHqlExpression & curRecord = records.tos();
@@ -3139,7 +3139,7 @@ bool transformListContainsSkip(IHqlExpression * transforms)
 
 IHqlExpression * queryNextRecordField(IHqlExpression * record, unsigned & idx)
 {
-    loop
+    for (;;)
     {
         IHqlExpression * cur = record->queryChild(idx++);
         if (!cur || cur->getOperator() == no_field)
@@ -3423,7 +3423,7 @@ IHqlExpression * queryNextMultiLevelDataset(IHqlExpression * expr, bool followAc
         return NULL;
 
     IHqlExpression * ds = root->queryChild(0);
-    loop
+    for (;;)
     {
         if (ds->isDataset())
             return ds;
@@ -4362,7 +4362,7 @@ IDefRecordElement * createMetaRecord(IHqlExpression * record, IMaxSizeCallback *
 
 static bool doContainsExpression(IHqlExpression * expr, IHqlExpression * search)
 {
-    loop
+    for (;;)
     {
         if (expr->queryTransformExtra())
             return false;
@@ -5563,7 +5563,7 @@ bool isConstantTransform(IHqlExpression * transform)
 //would be sensible to extend this to some simple expressions
 static bool isSimpleValue(IHqlExpression * expr)
 {
-    loop
+    for (;;)
     {
         if (expr->isConstant())
             return true;
@@ -5589,7 +5589,7 @@ static bool isSimpleValue(IHqlExpression * expr)
 
 IHqlExpression * queryUncastExpr(IHqlExpression * expr)
 {
-    loop
+    for (;;)
     {
         if (!isCast(expr))
             return expr;
@@ -7318,7 +7318,7 @@ extern HQL_API bool isSteppedDataset(IHqlExpression * expr)
 
 extern HQL_API IHqlExpression * queryFieldFromExpr(IHqlExpression * expr)
 {
-    loop
+    for (;;)
     {
         switch (expr->getOperator())
         {
@@ -7372,7 +7372,7 @@ extern HQL_API bool isFieldSelectedFromRecord(IHqlExpression * expr)
         return false;
     }
 
-    loop
+    for (;;)
     {
         switch (expr->getOperator())
         {
@@ -8985,7 +8985,7 @@ static IHqlExpression * transformAttributeToQuery(IHqlExpression * expr, HqlLook
 IHqlExpression * convertAttributeToQuery(IHqlExpression * expr, HqlLookupContext & ctx, bool syntaxCheck)
 {
     OwnedHqlExpr query = LINK(expr);
-    loop
+    for (;;)
     {
         OwnedHqlExpr transformed = transformAttributeToQuery(query, ctx, syntaxCheck);
         if (!transformed || transformed == query)
@@ -9072,7 +9072,7 @@ include a unique id.  The root table doesn't need to be modified because no sele
 
 IHqlExpression * queryTableOrSplitter(IHqlExpression * expr)
 {
-    loop
+    for (;;)
     {
         node_operator op = expr->getOperator();
         if (op == no_compound)

+ 1 - 1
ecl/hqlcpp/hqlalias.cpp

@@ -29,7 +29,7 @@
 
 static bool isSubsetOf(IHqlExpression * search, IHqlExpression * expr)
 {
-    loop
+    for (;;)
     {
         if (search->queryBody() == expr->queryBody())
             return true;

+ 3 - 3
ecl/hqlcpp/hqlckey.cpp

@@ -352,7 +352,7 @@ KeyedJoinInfo::~KeyedJoinInfo()
 
 IHqlExpression * KeyedJoinInfo::querySimplifiedKey(IHqlExpression * expr)
 {
-    loop
+    for (;;)
     {
         switch (expr->getOperator())
         {
@@ -769,7 +769,7 @@ IHqlExpression * KeyedJoinInfo::optimizeTransfer(HqlExprArray & fields, HqlExprA
             //Check for an expression of the form LEFT.x.y.z.a.b.c, but if any of x,y,z, are datasets then process later.
             IHqlExpression * cur = filter;
             IHqlExpression * ds;
-            loop
+            for (;;)
             {
                 ds = cur->queryChild(0);
                 //if a select from a dataset, then wait until we recurse to here
@@ -1680,7 +1680,7 @@ ABoundActivity * HqlCppTranslator::doBuildActivityKeyPatch(BuildCtx & ctx, IHqlE
 
 IHqlExpression * querySelectorTable(IHqlExpression * expr)
 {
-    loop
+    for (;;)
     {
         IHqlExpression * selector = expr->queryChild(0);
         if (selector->getOperator() != no_select)

+ 4 - 4
ecl/hqlcpp/hqlcpp.cpp

@@ -245,7 +245,7 @@ inline bool isPushed(const CHqlBoundExpr & bound)
 
 bool isSimpleTranslatedStringExpr(IHqlExpression * expr)
 {
-    loop
+    for (;;)
     {
         node_operator op = expr->getOperator();
 
@@ -292,7 +292,7 @@ bool isSimpleTranslatedExpr(IHqlExpression * expr)
         return true;
     }
 
-    loop
+    for (;;)
     {
         node_operator op = expr->getOperator();
 
@@ -368,7 +368,7 @@ IHqlExpression * getAddress(IHqlExpression * expr)
 IHqlExpression * getRawAddress(IHqlExpression * expr)
 {
     OwnedHqlExpr raw = getAddress(expr);
-    loop
+    for (;;)
     {
         switch (raw->getOperator())
         {
@@ -11718,7 +11718,7 @@ void HqlCppTranslator::buildCppFunctionDefinition(BuildCtx & ctx, IHqlExpression
     text.setLength(cleanupEmbeddedCpp(text.length(), (char*)text.str()));
 
     const char * start = text.str();
-    loop
+    for (;;)
     {
         char next = *start;
         if (next == '\n')

+ 3 - 3
ecl/hqlcpp/hqlcppds.cpp

@@ -1975,7 +1975,7 @@ IHqlExpression * HqlCppTranslator::buildSpillChildDataset(BuildCtx & ctx, IHqlEx
 
 IHqlExpression * HqlCppTranslator::forceInlineAssignDataset(BuildCtx & ctx, IHqlExpression * expr)
 {
-    loop
+    for (;;)
     {
         CHqlBoundExpr bound;
         if (expr->isPure() && ctx.getMatchExpr(expr, bound))
@@ -3659,7 +3659,7 @@ void HqlCppTranslator::buildDatasetAssign(BuildCtx & ctx, IHqlCppDatasetBuilder
             IHqlExpression * ds = expr->queryChild(0);
 #if 0
             HqlExprCopyArray selectors;
-            loop
+            for (;;)
             {
                 selectors.append(*ds->queryNormalizedSelector());
                 IHqlExpression * root = queryRoot(expr);
@@ -5577,7 +5577,7 @@ ABoundActivity * HqlCppTranslator::doBuildActivitySetGraphLoopResult(BuildCtx &
 
 static IHqlExpression * queryResultExpr(IHqlExpression * expr)
 {
-    loop
+    for (;;)
     {
         switch (expr->getOperator())
         {

+ 1 - 1
ecl/hqlcpp/hqlcpputil.cpp

@@ -416,7 +416,7 @@ bool mustInitializeField(IHqlExpression * field)
 
 bool worthGeneratingRowAsSingleActivity(IHqlExpression * expr)
 {
-    loop
+    for (;;)
     {
         switch (expr->getOperator())
         {

+ 2 - 2
ecl/hqlcpp/hqlcse.cpp

@@ -880,7 +880,7 @@ CseScopeInfo * CseScopeTransformer::calcCommonLocation(CseScopeInfo * extra)
 IHqlExpression * CseScopeTransformer::findAliasLocation(CseScopeInfo * extra)
 {
     CseScopeInfo * best = calcCommonLocation(extra);
-    loop
+    for (;;)
     {
         if (!best)
             return NULL;
@@ -903,7 +903,7 @@ CseScopeInfo * CseScopeTransformer::selectParent(CseScopeInfo * info)
 
 CseScopeInfo * CseScopeTransformer::findCommonPath(CseScopeInfo * left, CseScopeInfo * right)
 {
-    loop
+    for (;;)
     {
         if (!left || !right)
             return NULL;

+ 3 - 3
ecl/hqlcpp/hqlecl.cpp

@@ -147,7 +147,7 @@ void HqlDllGenerator::addLibrary(const char * name)
 void HqlDllGenerator::addLibrariesToCompiler()
 {
     unsigned idx=0;
-    loop
+    for (;;)
     {
         const char * lib = code->queryLibrary(idx);
         if (!lib)
@@ -157,7 +157,7 @@ void HqlDllGenerator::addLibrariesToCompiler()
         idx++;
     }
     idx=0;
-    loop
+    for (;;)
     {
         const char * obj = code->queryObjectFile(idx);
         if (!obj)
@@ -167,7 +167,7 @@ void HqlDllGenerator::addLibrariesToCompiler()
         idx++;
     }
     idx=0;
-    loop
+    for (;;)
     {
         const char * src = code->querySourceFile(idx);
         if (!src)

+ 2 - 2
ecl/hqlcpp/hqlhoist.cpp

@@ -459,7 +459,7 @@ ConditionalContextInfo * ConditionalContextTransformer::calcCommonLocation(Condi
 ConditionalContextInfo * ConditionalContextTransformer::findCandidateLocation(ConditionalContextInfo * extra)
 {
     ConditionalContextInfo * best = calcCommonLocation(extra);
-    loop
+    for (;;)
     {
         if (!best)
             return NULL;
@@ -480,7 +480,7 @@ ConditionalContextInfo * ConditionalContextTransformer::selectParent(Conditional
 
 ConditionalContextInfo * ConditionalContextTransformer::findCommonPath(ConditionalContextInfo * left, ConditionalContextInfo * right)
 {
-    loop
+    for (;;)
     {
         if (!left || !right)
             return NULL;

+ 8 - 8
ecl/hqlcpp/hqlhtcpp.cpp

@@ -477,7 +477,7 @@ public:
     inline bool isUsedUnconditionallyEnough(IHqlExpression * expr)
     {
         IHqlExpression * search = expr;
-        loop
+        for (;;)
         {
             if (isUsedUnconditionally(search))
                 return true;
@@ -1965,7 +1965,7 @@ void ActivityInstance::processAnnotations(IHqlExpression * expr)
     }
 
     IHqlExpression * cur = expr;
-    loop
+    for (;;)
     {
         IHqlExpression * body = cur->queryBody(true);
         if (cur == body)
@@ -2052,7 +2052,7 @@ void ActivityInstance::createGraphNode(IPropertyTree * defaultSubGraph, bool alw
     }
 
     IHqlExpression * cur = dataset;
-    loop
+    for (;;)
     {
         IHqlExpression * body = cur->queryBody(true);
         if (cur == body)
@@ -6296,7 +6296,7 @@ ABoundActivity * HqlCppTranslator::buildActivity(BuildCtx & ctx, IHqlExpression
 
     //Process any annotations first - but still pass the original expr to the doBuildActivtyXXX functions.
     IHqlExpression * cur = expr;
-    loop
+    for (;;)
     {
         IHqlExpression * body = cur->queryBody(true);
         if (cur == body)
@@ -7809,7 +7809,7 @@ void HqlCppTranslator::doBuildStmtSetResult(BuildCtx & ctx, IHqlExpression * exp
 
 static bool isFilePersist(IHqlExpression * expr)
 {
-    loop
+    for (;;)
     {
         switch (expr->getOperator())
         {
@@ -8260,7 +8260,7 @@ static void unwindAddFiles(HqlExprArray & args, IHqlExpression * expr, bool reqI
 
 static IHqlExpression * queryRootConcatActivity(IHqlExpression * expr)
 {
-    loop
+    for (;;)
     {
         node_operator curOp = expr->getOperator();
         switch (curOp)
@@ -9566,7 +9566,7 @@ void HqlCppTranslator::buildCsvListFunc(BuildCtx & classctx, const char * func,
             {
                 unsigned entry = 0;
                 const char * start  = defaultValue;
-                loop
+                for (;;)
                 {
                     const char * end = strchr(start, '|');
                     if (!end) end = start+strlen(start);
@@ -12663,7 +12663,7 @@ ABoundActivity * HqlCppTranslator::doBuildActivityIterate(BuildCtx & ctx, IHqlEx
 
 IHqlExpression * HqlCppTranslator::queryExpandAliasScope(BuildCtx & ctx, IHqlExpression * expr)
 {
-    loop
+    for (;;)
     {
         switch (expr->getOperator())
         {

+ 1 - 1
ecl/hqlcpp/hqlinline.cpp

@@ -592,7 +592,7 @@ bool activityNeedsParent(IHqlExpression * expr)
     case no_hqlproject:
     case no_newusertable:
         //Filters might be merged into projects, so need to walk the inputs.
-        loop
+        for (;;)
         {
             if (activityNeedsParent(expr))
                 return true;

+ 0 - 0
ecl/hqlcpp/hqliproj.cpp


Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików