Quellcode durchsuchen

HPCC-8116 More compiler warning fixes

More components can now be built with -Wall set.

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman vor 9 Jahren
Ursprung
Commit
768bd70e74

+ 4 - 3
common/remote/rmtfile.cpp

@@ -618,7 +618,7 @@ class CScriptThread : public Thread
 public:
     IMPLEMENT_IINTERFACE;
     CScriptThread(SocketEndpoint &_ep,const char *_script)
-        : ep(_ep), script(_script)
+        : script(_script), ep(_ep)
     {
         ok = false;
     }
@@ -684,8 +684,9 @@ unsigned validateNodes(const SocketEndpointArray &epso,const char *dataDir, cons
         unsigned scripttimeout;
 public:
         casyncfor(const SocketEndpointArray &_eps,const IPointerArrayOf<ISocket> &_sockets,const char *_dataDir,const char *_mirrorDir,bool _chkv, const char *_script, unsigned _scripttimeout, const char *_filename,SocketEndpointArray &_failures, StringArray &_failedmessages,UnsignedArray &_failedcodes,CriticalSection &_sect)
-            : eps(_eps), sockets(_sockets), dataDir(_dataDir), mirrorDir(_mirrorDir),
-              failures(_failures), failedmessages(_failedmessages), failedcodes(_failedcodes), sect(_sect)
+            : eps(_eps), sockets(_sockets), failures(_failures),
+              failedmessages(_failedmessages), failedcodes(_failedcodes), sect(_sect),
+              dataDir(_dataDir), mirrorDir(_mirrorDir)
         { 
             chkv = _chkv;
             filename = _filename;

+ 1 - 1
common/remote/rmtsmtp.cpp

@@ -27,7 +27,7 @@
 class CSMTPValidator
 {
 public:
-    CSMTPValidator() : scanlist(false), value(NULL), finger(NULL), label(NULL) {}
+    CSMTPValidator() : value(NULL), finger(NULL), label(NULL), scanlist(false) {}
 
     void validateValue(char const * _value, char const * _label)
     {

+ 6 - 7
common/remote/sockfile.cpp

@@ -417,7 +417,7 @@ public:
     IMPLEMENT_IINTERFACE;
 
     CDafsException(int code,const char *_msg) 
-        : errcode(code), msg(_msg)
+        : msg(_msg), errcode(code)
     {
     };
 
@@ -2683,7 +2683,7 @@ class CAsyncCommandManager
         CAsyncCommandManager &parent;
     public:
         CAsyncJob(CAsyncCommandManager &_parent, const char *_uuid)
-            : parent(_parent), uuid(_uuid)
+            : uuid(_uuid), parent(_parent)
         {
             thread = new cThread(this);
             hash = hashc((const byte *)uuid.get(),uuid.length(),~0U);
@@ -2774,7 +2774,7 @@ class CAsyncCommandManager
                 offset_t &total;
             public:
                 cProgress(CriticalSection &_sect,offset_t &_done,offset_t &_total,CFPmode &_mode)
-                    : sect(_sect), done(_done), total(_total), mode(_mode)
+                    : sect(_sect), mode(_mode), done(_done), total(_total)
                 {
                 }
                 CFPmode onProgress(offset_t sizeDone, offset_t totalSize)
@@ -3391,7 +3391,6 @@ class CRemoteFileServer : public CInterface, implements IRemoteFileServer
 
     class CThrottler
     {
-        CRemoteFileServer &owner;
         Semaphore sem;
         CriticalSection crit, configureCrit;
         StringAttr title;
@@ -3403,7 +3402,7 @@ class CRemoteFileServer : public CInterface, implements IRemoteFileServer
         unsigned statsIntervalSecs;
 
     public:
-        CThrottler(CRemoteFileServer &_owner, const char *_title) : owner(_owner), title(_title)
+        CThrottler(const char *_title) : title(_title)
         {
             totalThrottleDelay = 0;
             limit = 0;
@@ -3806,7 +3805,7 @@ public:
     IMPLEMENT_IINTERFACE
 
     CRemoteFileServer(unsigned maxThreads, unsigned maxThreadsDelayMs, unsigned maxAsyncCopy)
-        : stdCmdThrottler(*this, "stdCmdThrotlter"), slowCmdThrottler(*this, "slowCmdThrotlter"), asyncCommandManager(maxAsyncCopy)
+        : asyncCommandManager(maxAsyncCopy), stdCmdThrottler("stdCmdThrotlter"), slowCmdThrottler("slowCmdThrotlter")
     {
         lasthandle = 0;
         selecthandler.setown(createSocketSelectHandler(NULL));
@@ -5087,7 +5086,7 @@ public:
         IpAddress ip;
         socket->getPeerAddress(ip);
         byte ipdata[16];
-        size32_t ipds = ip.getNetAddress(sizeof(ipdata),&ipdata);
+        ip.getNetAddress(sizeof(ipdata),&ipdata);
         mergeOnce(oncekey,sizeof(ipdata),&ipdata); // this is clients key
         OnceKey mykey;
         genOnce(mykey);

+ 1 - 1
initfiles/processor.cpp

@@ -32,7 +32,7 @@ string getFileVector(const char* fileName){
     textstream.close();
 
     string alltext;
-    for (int i=0; i < text.size(); i++)
+    for (unsigned int i=0; i < text.size(); i++)
         alltext += text[i];
 
     return alltext;

+ 14 - 14
roxie/roxiemem/roxiemem.cpp

@@ -346,6 +346,7 @@ static void initializeHeap(bool allowHugePages, bool allowTransparentHugePages,
                 heapTotalPages, (unsigned __int64) memsize, heapBase, (unsigned __int64) HEAP_ALIGNMENT_SIZE, heapBitmapSize);
 }
 
+#ifdef _USE_CPPUNIT
 static void adjustHeapSize(unsigned numPages)
 {
     memsize_t bitmapSize = (numPages + UNSIGNED_BITS - 1) / UNSIGNED_BITS;
@@ -355,6 +356,7 @@ static void adjustHeapSize(unsigned numPages)
     heapBitmapSize = (unsigned)bitmapSize;
     heapTotalPages = (unsigned)totalPages;
 }
+#endif
 
 extern void releaseRoxieHeap()
 {
@@ -446,6 +448,7 @@ extern StringBuffer &memstats(StringBuffer &stats)
     return stats.appendf("Heap size %u pages, %u free, largest block %u", heapTotalPages, freePages, maxBlock);
 }
 
+#ifdef _USE_CPPUNIT
 static void dumpHeapState()
 {
     StringBuffer s;
@@ -457,6 +460,7 @@ static void dumpHeapState()
 
     DBGLOG("Heap: %s", s.str());
 }
+#endif
 
 IPerfMonHook *createRoxieMemStatsPerfMonHook(IPerfMonHook *chain)
 {
@@ -741,7 +745,6 @@ static void subfree_aligned(void *ptr, unsigned pages = 1)
     unsigned wordOffset = (unsigned) (pageOffset / UNSIGNED_BITS);
     unsigned bitOffset = (unsigned) (pageOffset % UNSIGNED_BITS);
     unsigned mask = 1<<bitOffset;
-    unsigned nextPageOffset = (pageOffset+pages + (UNSIGNED_BITS-1)) / UNSIGNED_BITS;
     char * firstReleaseBlock = NULL;
     char * lastReleaseBlock = NULL;
     {
@@ -840,7 +843,6 @@ static void *subrealloc_aligned(void *ptr, unsigned pages, unsigned newPages)
     //If this function increases the size of the block, it is possible heapHWM could decrease - it will be
     //updated on the next multi-page allocation
     assertex(newPages > 0);
-    unsigned _pages = pages;
     memsize_t offset = (char *)ptr - heapBase;
     memsize_t pageOffset = offset / HEAP_ALIGNMENT_SIZE;
     if (!pages)
@@ -1145,8 +1147,8 @@ static void setParallelSyncReleaseGranularity(size_t granularity, unsigned scali
     parallelSyncReleaseThreshold = granularity * scaling;
 }
 #else
-const static size_t parallelSyncReleaseGranularity = DEFAULT_PARALLEL_SYNC_RELEASE_GRANULARITY;
-const static size_t parallelSyncReleaseThreshold = DEFAULT_PARALLEL_SYNC_RELEASE_THRESHOLD;
+// const static size_t parallelSyncReleaseGranularity = DEFAULT_PARALLEL_SYNC_RELEASE_GRANULARITY;
+// const static size_t parallelSyncReleaseThreshold = DEFAULT_PARALLEL_SYNC_RELEASE_THRESHOLD;
 #endif
 
 
@@ -1429,7 +1431,7 @@ protected:
     {
         dbgassertex(ptr);
         ptrdiff_t diff = ptr - (char *) this;
-        assert(diff < HEAP_ALIGNMENT_SIZE);
+        assert(diff < (ptrdiff_t) HEAP_ALIGNMENT_SIZE);
         return (unsigned) diff;
     }
 
@@ -2334,7 +2336,7 @@ class CHeap : public CInterface
     friend class HeapCompactState;
 public:
     CHeap(CChunkingRowManager * _rowManager, const IContextLogger &_logctx, const IRowAllocatorCache *_allocatorCache, unsigned _flags)
-        : logctx(_logctx), rowManager(_rowManager), allocatorCache(_allocatorCache), activeHeaplet(NULL), heaplets(NULL), flags(_flags)
+        : flags(_flags), rowManager(_rowManager), allocatorCache(_allocatorCache), logctx(_logctx)
     {
         atomic_set(&possibleEmptyPages, 0);
         atomic_set(&headMaybeSpace, BLOCKLIST_NULL);
@@ -2749,8 +2751,8 @@ protected:
 
 protected:
     unsigned flags; // before the pointer so it packs better in 64bit.
-    Heaplet * activeHeaplet; // which block is the current candidate for adding rows.
-    Heaplet * heaplets; // the linked list of heaplets for this heap
+    Heaplet * activeHeaplet = nullptr; // which block is the current candidate for adding rows.
+    Heaplet * heaplets = nullptr; // the linked list of heaplets for this heap
     CChunkingRowManager * rowManager;
     const IRowAllocatorCache *allocatorCache;
     const IContextLogger & logctx;
@@ -3119,7 +3121,6 @@ class BufferedRowCallbackManager
             ForEachItemIn(i, callbacks)
             {
                 const CallbackPair * iter = &callbacks.item(i);
-                unsigned curSlave = iter->first;
                 if ((iter->first == searchSlaveId) && (iter->second == searchCallback))
                 {
                     callbacks.remove(i);
@@ -3525,7 +3526,7 @@ protected:
 
 public:
     CChunkingRowManager(memsize_t _memLimit, ITimeLimiter *_tl, const IContextLogger &_logctx, const IRowAllocatorCache *_allocatorCache, bool _ignoreLeaks, bool _outputOOMReports)
-        : logctx(_logctx), allocatorCache(_allocatorCache), hugeHeap(this, _logctx, _allocatorCache)
+        : hugeHeap(this, _logctx, _allocatorCache), logctx(_logctx), allocatorCache(_allocatorCache)
     {
         logctx.Link();
         //Use roundup() to calculate the sizes of the different heaps, and double check that the heap mapping
@@ -4083,7 +4084,7 @@ public:
                     //very unusual: another thread may have just released a lot of memory (e.g., it has finished), but
                     //the empty pages haven't been cleaned up
                     releaseEmptyPages(querySlaveId(), true);
-                    if (numHeapPages == atomic_read(&totalHeapPages))
+                    if (numHeapPages == (unsigned) atomic_read(&totalHeapPages))
                     {
                         VStringBuffer msg("Memory limit exceeded: current %u, requested %u, limit %u", pageCount, numRequested, pageLimit);
                         logctx.CTXLOG("%s", msg.str());
@@ -4262,7 +4263,6 @@ protected:
     virtual memsize_t compactRows(memsize_t count, const void * * rows)
     {
         HeapCompactState state;
-        bool memoryAvailable = false;
         for (memsize_t i = 0; i < count; i++)
         {
             const void * row = rows[i];
@@ -4369,7 +4369,7 @@ class CCallbackRowManager : public CChunkingRowManager
 public:
 
     CCallbackRowManager(memsize_t _memLimit, ITimeLimiter *_tl, const IContextLogger &_logctx, const IRowAllocatorCache *_allocatorCache, bool _ignoreLeaks, bool _outputOOMReports)
-        : callbacks(this), CChunkingRowManager(_memLimit, _tl, _logctx, _allocatorCache, _ignoreLeaks, _outputOOMReports)
+        : CChunkingRowManager(_memLimit, _tl, _logctx, _allocatorCache, _ignoreLeaks, _outputOOMReports), callbacks(this)
     {
     }
 
@@ -5045,7 +5045,7 @@ class CDataBufferManager : public CInterface, implements IDataBufferManager
                         DBGLOG("RoxieMemMgr: DataBufferBottom::allocate() freeing DataBuffers Page - addr=%p", goer);
                     goer->~DataBufferBottom(); 
 #ifdef _DEBUG
-                    memset(goer, 0xcc, HEAP_ALIGNMENT_SIZE);
+                    memset((void *) goer, 0xcc, HEAP_ALIGNMENT_SIZE);
 #endif
                     subfree_aligned(goer, 1);
                     atomic_dec(&dataBufferPages);

+ 1 - 1
roxie/roxiemem/roxierowbuff.cpp

@@ -27,7 +27,7 @@
 namespace roxiemem {
 
 RoxieOutputRowArray::RoxieOutputRowArray(IRowManager * _rowManager, rowidx_t initialSize, size32_t _commitDelta, unsigned _allocatorId) :
-    rowManager(_rowManager), commitDelta(_commitDelta), allocatorId(_allocatorId)
+    rowManager(_rowManager), allocatorId(_allocatorId), commitDelta(_commitDelta)
 {
     if (initialSize)
     {

+ 1 - 1
rtl/eclrtl/eclregex.cpp

@@ -403,7 +403,7 @@ public:
         {
             uerr = U_ZERO_ERROR;
             int32_t start = matcher->start(uerr);
-            if (start==_srcLen) break;
+            if ((size32_t) start==_srcLen) break;
             int32_t end = matcher->end(uerr);
             int32_t numUChars = end - start;
 

+ 6 - 79
rtl/eclrtl/eclrtl.cpp

@@ -854,61 +854,6 @@ static void truncFixedReal(size32_t l, char * t, StringBuffer & temp)
     }
 }
 
-static void roundFixedReal(size32_t l, char * t, StringBuffer & temp)
-{
-    const char * str = temp.str();
-    unsigned len = temp.length();
-    if (len > l)
-    {
-        //If we don't lose significant digits left of the decimal point then truncate the string.
-        const char * dot = strchr(str, '.');
-        if (dot && ((size_t)(dot - str) <= l))
-        {
-            len = l;
-            //Unfortunately we now need to potentially round the number which could even lead to
-            //an extra digit, and failure to fit.  Is there a simpler way of handling this?
-            bool decimalIsNext = ((dot - str) == l);
-            char next = decimalIsNext ? dot[1] : str[len];
-            bool rounding = (next >= '5');
-            unsigned cur = len;
-            while ((cur > 0) && rounding)
-            {
-                next = str[cur-1];
-                if (next == '-')
-                    break;
-                if (next != '.')
-                {
-                    if (next != '9')
-                    {
-                        temp.setCharAt(cur-1, next+1);
-                        rounding = false;
-                        break;
-                    }
-                    else
-                        temp.setCharAt(cur-1, '0');
-                }
-                cur--;
-            }
-            if (rounding)
-            {
-                //Ugly, but it is an exceptional case.
-                if (!decimalIsNext)
-                    temp.insert(cur, '1');
-                else
-                    len++; // overflow
-            }
-        }
-    }
-
-    if (len > l)
-        memset(t,'*',l);
-    else
-    {
-        memcpy(t,temp.str(),len);
-        memset(t+len, ' ', l-len);
-    }
-}
-
 void rtlRealToStr(size32_t l, char * t, double val)
 {
     StringBuffer temp;
@@ -1471,7 +1416,7 @@ void rtlConcat(unsigned & tlen, char * * tgt, ...)
         unsigned len = va_arg(args, unsigned);
         if (len+1==0)
             break;
-        char * str = va_arg(args, char *);
+        va_arg(args, char *);  // Skip the string
         totalLength += len;
     }
     va_end(args);
@@ -1505,7 +1450,7 @@ void rtlConcatVStr(char * * tgt, ...)
         unsigned len = va_arg(args, unsigned);
         if (len+1==0)
             break;
-        char * str = va_arg(args, char *);
+        va_arg(args, char *);   // Skip the string
         totalLength += len;
     }
     va_end(args);
@@ -1539,7 +1484,7 @@ void rtlConcatUnicode(unsigned & tlen, UChar * * tgt, ...)
         unsigned len = va_arg(args, unsigned);
         if(len+1==0)
             break;
-        UChar * str = va_arg(args, UChar *);
+        va_arg(args, UChar *);   // Skip the string
         totalLength += len;
     }
     va_end(args);
@@ -1574,7 +1519,7 @@ void rtlConcatVUnicode(UChar * * tgt, ...)
         unsigned len = va_arg(args, unsigned);
         if(len+1==0)
             break;
-        UChar * str = va_arg(args, UChar *);
+        va_arg(args, UChar *);   // Skip the string
         totalLength += len;
     }
     va_end(args);
@@ -3004,24 +2949,6 @@ unsigned rtlCrc32(unsigned len, const void * buffer, unsigned crc)
 //=============================================================================
 // EBCDIC helper functions...
 
-static char ccsid819[] = "\
-\000\001\002\003\234\011\206\177\227\215\216\013\014\015\016\017\
-\020\021\022\023\235\205\010\207\030\031\222\217\034\035\036\037\
-\200\201\202\203\204\012\027\033\210\211\212\213\214\005\006\007\
-\220\221\026\223\224\225\226\004\230\231\232\233\024\025\236\032\
-\040\240\342\344\340\341\343\345\347\361\242\056\074\050\053\174\
-\046\351\352\353\350\355\356\357\354\337\041\044\052\051\073\254\
-\055\057\302\304\300\301\303\305\307\321\246\054\045\137\076\077\
-\370\311\312\313\310\315\316\317\314\140\072\043\100\047\075\042\
-\330\141\142\143\144\145\146\147\150\151\253\273\360\375\376\261\
-\260\152\153\154\155\156\157\160\161\162\252\272\346\270\306\244\
-\265\176\163\164\165\166\167\170\171\172\241\277\320\335\336\256\
-\136\243\245\267\251\247\266\274\275\276\133\135\257\250\264\327\
-\173\101\102\103\104\105\106\107\110\111\255\364\366\362\363\365\
-\175\112\113\114\115\116\117\120\121\122\271\373\374\371\372\377\
-\134\367\123\124\125\126\127\130\131\132\262\324\326\322\323\325\
-\060\061\062\063\064\065\066\067\070\071\263\333\334\331\332\237";
-
 static unsigned char ccsid1047[] = "\
 \000\001\002\003\234\011\206\177\227\215\216\013\014\015\016\017\
 \020\021\022\023\235\012\010\207\030\031\222\217\034\035\036\037\
@@ -3085,7 +3012,7 @@ void rtlStrToEStr(unsigned outlen, char *out, unsigned inlen, const char *in)
         out[i] = codepage[j];
     }
     for (;i<outlen; i++)
-        out[i] = codepage[' '];
+        out[i] = codepage[(unsigned) ' '];
 }
 
 //---------------------------------------------------------------------------
@@ -4711,7 +4638,7 @@ ECLRTL_API void rtlConcatUtf8(unsigned & tlen, char * * tgt, ...)
         unsigned len = va_arg(args, unsigned);
         if(len+1==0)
             break;
-        const char * str = va_arg(args, const char *);
+        va_arg(args, const char *);   // Skip the string
         totalLength += len;
         if (len > maxLength)
             maxLength = len;

+ 1 - 1
rtl/nbcd/nbcd.cpp

@@ -248,7 +248,7 @@ Decimal & Decimal::divide(const Decimal & other)
 
         if (q >= 5)
         {
-            for (unsigned roundDigit=0; roundDigit < iters; roundDigit++)
+            for (int roundDigit=0; roundDigit < iters; roundDigit++)
             {
                 unsigned next = digits[roundDigit]+1;
                 if (next == 10)

+ 1 - 1
system/lzma/LzmaEnc.cpp

@@ -416,7 +416,7 @@ SRes LzmaEnc_SetProps(CLzmaEncHandle pp, const CLzmaEncProps *props2)
   LzmaEncProps_Normalize(&props);
 
   if (props.lc > LZMA_LC_MAX || props.lp > LZMA_LP_MAX || props.pb > LZMA_PB_MAX ||
-      props.dictSize > (1 << kDicLogSizeMaxCompress) || props.dictSize > (1 << 30))
+      props.dictSize > (1u << kDicLogSizeMaxCompress) || props.dictSize > (1u << 30))
     return SZ_ERROR_PARAM;
   p->dictSize = props.dictSize;
   p->matchFinderCycles = props.mc;

+ 1 - 3
system/mp/mpbase.cpp

@@ -216,8 +216,6 @@ public:
             }
             if (r2==0)
                 return GRdisjoint;
-            bool notin1=false;
-            bool notin2=false;
             bool somematch=false;
             if (r1==r2) { // check for identical
                 r=r1;
@@ -698,7 +696,7 @@ IGroup *createIGroup(const char *endpointlist,unsigned short defport)
     if (oldform) {
         SocketListParser list(endpointlist);
         SocketEndpointArray eparray;
-        unsigned n = list.getSockets(eparray,defport);
+        list.getSockets(eparray,defport);
         return createIGroup(eparray);
     }
     return CGroup::fromText(endpointlist,defport);

+ 5 - 7
system/mp/mpcomm.cpp

@@ -151,6 +151,7 @@ public:
     }
 };
 
+#if 0
 class PacketHeaderV6 : public PacketHeader
 {
     unsigned senderex[4];                                                   // 32
@@ -165,7 +166,7 @@ class PacketHeaderV6 : public PacketHeader
     }
 
 };
-    
+#endif
 
 unsigned PacketHeader::nextseq=0;
 unsigned PacketHeader::lasttick=0;
@@ -435,7 +436,7 @@ public:
         ::Release(listensock);
     }
     int run();
-    void start(unsigned short port);
+    void startPort(unsigned short port);
     void stop()
     {
         if (running) {
@@ -1395,7 +1396,6 @@ class CMPPacketReader: public CInterface, public ISocketSelectNotify
     CMessageBuffer *activemsg;
     byte * activeptr;
     size32_t remaining;
-    byte *dataptr;
     CMPChannel *parent;
     CriticalSection sect;
 public:
@@ -1692,7 +1692,6 @@ bool CMPChannel::send(MemoryBuffer &mb, mptag_t tag, mptag_t replytag, CTimeMon
     // note must not adjust mb
     assertex(tag!=TAG_NULL);
     assertex(tm.timeout);
-    const byte *msg = (const byte *)mb.toByteArray();
     size32_t msgsize = mb.length();
     PacketHeader hdr(msgsize+sizeof(PacketHeader),localep,remoteep,tag,replytag);
     if (closed||(reply&&!isConnected())) {  // flag error if has been disconnected
@@ -1908,7 +1907,7 @@ void CMPConnectThread::checkSelfDestruct(void *p,size32_t sz)
 
 }
 
-void CMPConnectThread::start(unsigned short port)
+void CMPConnectThread::startPort(unsigned short port)
 {
     if (!listensock)
         listensock = ISocket::create(port, mpSoMaxConn);
@@ -2327,7 +2326,7 @@ unsigned CMPServer::probe(const SocketEndpoint *ep, mptag_t tag,CTimeMon &tm,Soc
 
 void CMPServer::start()
 {
-    connectthread->start(getPort());    
+    connectthread->startPort(getPort());
 }
 
 void CMPServer::stop()
@@ -2421,7 +2420,6 @@ public:
     {
         if (!dst)
             return false;
-        size32_t msgsize = mbuf.length();
         if (dst->equals(queryMyNode())) {
             CMessageBuffer *msg = new CMessageBuffer();
             mptag_t reply = mbuf.getReplyTag();

+ 1 - 1
system/mp/mplog.cpp

@@ -76,7 +76,7 @@ void LogMsgLogReceiverThread::stop()
 // CLogMsgLinkToChild
 
 CLogMsgLinkToChild::CLogMsgLinkToChild(MPLogId _cid, MPLogId _pid, INode * _childNode, bool isListener, bool _connected)
-    : cid(_cid), pid(_pid), childNode(_childNode), connected(_connected)
+    : childNode(_childNode), cid(_cid), pid(_pid), connected(_connected)
 {
     receiverThread.setown(new LogMsgLogReceiverThread(cid, childNode, isListener));
     receiverThread->start();

+ 2 - 2
system/mp/mplog.ipp

@@ -42,7 +42,7 @@ protected:
 class LogMsgLogReceiverThread : public LogMsgReceiverThread
 {
 public:
-    LogMsgLogReceiverThread(MPLogId _cid, INode * _child, bool _isListener) : LogMsgReceiverThread("LogMsgLogReceiver"), cid(_cid), childNode(_child), isListener(_isListener) {}
+    LogMsgLogReceiverThread(MPLogId _cid, INode * _child, bool _isListener) : LogMsgReceiverThread("LogMsgLogReceiver"), childNode(_child), cid(_cid), isListener(_isListener) {}
     int                       run();
     void                      stop();
 private:
@@ -135,7 +135,7 @@ private:
 class LinkToParentLogMsgHandler : public CInterface, implements ILogMsgHandler
 {
 public:
-    LinkToParentLogMsgHandler(MPLogId _cid, MPLogId _pid, INode * _parentNode, bool _connected) : cid(_cid), pid(_pid), parentNode(_parentNode), receiverThread(new LogMsgFilterReceiverThread(_pid, _parentNode)), connected(_connected) { receiverThread->setHandler(this); }
+    LinkToParentLogMsgHandler(MPLogId _cid, MPLogId _pid, INode * _parentNode, bool _connected) : parentNode(_parentNode), cid(_cid), pid(_pid), receiverThread(new LogMsgFilterReceiverThread(_pid, _parentNode)), connected(_connected) { receiverThread->setHandler(this); }
     ~LinkToParentLogMsgHandler() { if(connected) disconnect(); receiverThread->stop(); }
     IMPLEMENT_IINTERFACE;
     void                      handleMessage(LogMsg const & msg) const;

Datei-Diff unterdrückt, da er zu groß ist
+ 768 - 768
system/security/zcrypt/aes.cpp


+ 1 - 1
system/security/zcrypt/base64.cpp

@@ -98,7 +98,7 @@ ZBuffer& base64_decode(int inlen, const char *in, ZBuffer& data)
     {
         for(int i = 0; i < 64; ++i)
         {
-            BASE64_dec[BASE64_enc[i]] = i;
+            BASE64_dec[(int) BASE64_enc[i]] = i;
         }
 
         initialized = true;

+ 2 - 0
system/security/zcrypt/zcrypt.cpp

@@ -15,7 +15,9 @@
     limitations under the License.
 ############################################################################## */
 
+#ifdef _WIN32
 #pragma warning(disable: 4996)
+#endif
 #include "zcrypt.ipp"
 #include "aes.hpp"
 #include "base64.ipp"

+ 2 - 0
tools/esdlcomp/CMakeLists.txt

@@ -50,6 +50,8 @@ include_directories (
 ADD_DEFINITIONS( -D_CONSOLE -DESDLCOMP_EXPORTS )
 if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG)
     ADD_DEFINITIONS( -O0 )
+    set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/esdllex.cpp PROPERTIES COMPILE_FLAGS "-Wno-sign-compare -Wno-unused-function -Wno-unneeded-internal-declaration")
+    set_source_files_properties(esdlcomp.cpp PROPERTIES COMPILE_FLAGS "-Wno-unused-function")
 endif ()
 
 HPCC_ADD_LIBRARY ( esdlcomp SHARED ${SRCS} )

+ 2 - 1
tools/esdlcomp/esdlcomp.cpp

@@ -15,7 +15,9 @@
     limitations under the License.
 ############################################################################## */
 
+#ifdef _WIN32
 #pragma warning(disable:4786)
+#endif
 
 #include "esdl_utils.hpp"
 
@@ -1108,7 +1110,6 @@ ESDLcompiler::ESDLcompiler(const char * sourceFile, bool generatefile, const cha
     splitFilename(sourceFile, &prot, &srcDir, &name, &ext);
 
     filename = strdup(sourceFile);
-    size_t l = strlen(filename);
 
     yyin = fopen(sourceFile, "rt");
     if (!yyin)

+ 2 - 0
tools/esdlcomp/esdlgram.y

@@ -1,5 +1,7 @@
 %{
+#ifdef _WIN32
 #pragma warning(disable:4786)
+#endif
 
 #include <stdlib.h>
 #include <stdio.h>

+ 2 - 1
tools/esdlcomp/esdllex.l

@@ -7,6 +7,8 @@
 #include "esdlcomp.h"
 #include "esdlgram.h"
 
+#define register
+
 extern YYSTYPE yylval;
 extern unsigned linenum;
 
@@ -139,7 +141,6 @@ L?\"([^"\\\n]|{esc})*\" {
     {
         char *sval = (char *) malloc(yyleng+1);
 
-        char *thestr=(char*)yytext;
         strncpy(sval, (char *)yytext, yyleng);
         sval[yyleng]=0;
         yylval.setVal(sval);