diff --git a/common/deftype/deftype.cpp b/common/deftype/deftype.cpp index 1a7c7d3e681..bca4e9cab1a 100644 --- a/common/deftype/deftype.cpp +++ b/common/deftype/deftype.cpp @@ -2623,8 +2623,8 @@ static ITypeInfo * getPromotedType(ITypeInfo * lType, ITypeInfo * rType, bool is type_t lcode = l->getTypeCode(); type_t rcode = r->getTypeCode(); - if ((lcode == type_any)) return LINK(r); - if ((rcode == type_any)) return LINK(l); + if (lcode == type_any) return LINK(r); + if (rcode == type_any) return LINK(l); if ((lcode == type_set) || (rcode == type_set)) return getPromotedSet(l, r, isCompare); if ((lcode == type_unicode) || (rcode == type_unicode)) diff --git a/common/thorhelper/thorcommon.cpp b/common/thorhelper/thorcommon.cpp index 1b21ae16cdb..b9ebc06bb69 100644 --- a/common/thorhelper/thorcommon.cpp +++ b/common/thorhelper/thorcommon.cpp @@ -1632,7 +1632,7 @@ class CDiskMerger : public CInterface, implements IDiskMerger { Owned out = createWriteBlock(); void * row; - while(row = rows->getNextSorted()) + while((row = rows->getNextSorted()) != NULL) out->putRow(row); } IRowStream *merge(ICompare *icompare, bool partdedup) diff --git a/common/thorhelper/thorsoapcall.cpp b/common/thorhelper/thorsoapcall.cpp index d168e193887..68602a58e47 100644 --- a/common/thorhelper/thorsoapcall.cpp +++ b/common/thorhelper/thorsoapcall.cpp @@ -150,7 +150,7 @@ class Url : public CInterface, implements IInterface { char *p; - if (p = strstr(urltext, "://")) + if ((p = strstr(urltext, "://")) != NULL) { *p = 0; p += 3; // skip past the colon-slash-slash @@ -160,7 +160,7 @@ class Url : public CInterface, implements IInterface else throw MakeStringException(-1, "Malformed URL"); - if (p = strchr(urltext, '@')) + if ((p = strchr(urltext, '@')) != NULL) { // extract username & password *p = 0; @@ -170,7 +170,7 @@ class Url : public CInterface, implements IInterface urltext = p; } - if (p = strchr(urltext, ':')) + if ((p = strchr(urltext, ':')) != NULL) { // extract the port *p = 0; @@ -180,7 +180,7 @@ class Url : public CInterface, implements IInterface host.append(urltext); - if (p = strchr(p, '/')) + if ((p = strchr(p, '/')) != NULL) path.append(p); else path.append("/"); @@ -195,7 +195,7 @@ class Url : public CInterface, implements IInterface else throw MakeStringException(-1, "Unsupported access method"); - if (p = strchr(urltext, '/')) + if ((p = strchr(urltext, '/')) != NULL) { *p = 0; p++; @@ -940,7 +940,7 @@ class CWSCHelper : public CInterface, implements IWSCHelper { return outputQ.dequeue(); } - else if ((done == numRowThreads)) + else if (done == numRowThreads) { complete = true; if (error.get()) diff --git a/deployment/deployutils/configenvhelper.cpp b/deployment/deployutils/configenvhelper.cpp index e90e98b7516..24aba76b45c 100644 --- a/deployment/deployutils/configenvhelper.cpp +++ b/deployment/deployutils/configenvhelper.cpp @@ -721,10 +721,10 @@ bool CConfigEnvHelper::deleteRoxieServers(const char* xmlArg) { IPropertyTree* pChild; //if atleast one slave, delete all slaves - while (pChild = pRoxieCluster->queryPropTree( "RoxieSlave[1]" )) + while ((pChild = pRoxieCluster->queryPropTree( "RoxieSlave[1]" )) != NULL) pRoxieCluster->removeTree( pChild ); - while (pChild = pRoxieCluster->queryPropTree( XML_TAG_ROXIE_SLAVE "[1]" )) + while ((pChild = pRoxieCluster->queryPropTree( XML_TAG_ROXIE_SLAVE "[1]" )) != NULL) pRoxieCluster->removeTree( pChild ); break; @@ -1144,7 +1144,7 @@ bool CConfigEnvHelper::GenerateFullRedConfig(IPropertyTree* pRoxie, int copies, void CConfigEnvHelper::RemoveSlaves(IPropertyTree* pRoxie, bool bLegacySlaves/*=false*/) { IPropertyTree* pChild; - while (pChild = pRoxie->queryPropTree( bLegacySlaves ? XML_TAG_ROXIE_SLAVE "[1]" : "RoxieSlave[1]")) + while ((pChild = pRoxie->queryPropTree( bLegacySlaves ? XML_TAG_ROXIE_SLAVE "[1]" : "RoxieSlave[1]")) != NULL) pRoxie->removeTree( pChild ); } diff --git a/esp/services/ws_machine/ws_machineService.cpp b/esp/services/ws_machine/ws_machineService.cpp index 7578e5666fb..1bd68b27754 100644 --- a/esp/services/ws_machine/ws_machineService.cpp +++ b/esp/services/ws_machine/ws_machineService.cpp @@ -1787,7 +1787,7 @@ bool Cws_machineEx::excludePartition(const char* partition) const for (it=itBegin; it != itEnd; it++) { const string& pattern = *it; - if (found = ::WildMatch(partition, partitionLen, pattern.c_str(), pattern.length(), false)) + if ((found = ::WildMatch(partition, partitionLen, pattern.c_str(), pattern.length(), false))) break; } } diff --git a/system/hrpc/hrpcmp.cpp b/system/hrpc/hrpcmp.cpp index a3ee02e7cbc..fa2ae04663b 100644 --- a/system/hrpc/hrpcmp.cpp +++ b/system/hrpc/hrpcmp.cpp @@ -551,7 +551,7 @@ HRPCmptransport* MakeHRPCmptransport(MpTransportStateCommon* s) // Intra Communication IHRPCtransport *MakeClientMpTransport( ICommunicator *comm, rank_t rank, mptag_t tag) { - if ((comm==NULL)) + if (comm==NULL) THROWHRPCEXCEPTION(HRPCERR_bad_address); // line below: check valid rank value is between 0 and ordinatlity-1 unsigned count = comm->queryGroup().ordinality(); diff --git a/system/jhtree/keydiff.cpp b/system/jhtree/keydiff.cpp index 51d9a9fd4a2..b5a609aae42 100644 --- a/system/jhtree/keydiff.cpp +++ b/system/jhtree/keydiff.cpp @@ -173,7 +173,7 @@ class RowBuffer size32_t buffSize() { return buffsize; } size32_t rowSize() { return thisrowsize; } - size32_t serializeRowSize() { return thisrowsize+sizeof(offset_t)+isVar?sizeof(size32_t):0; } + size32_t serializeRowSize() { return thisrowsize+sizeof(offset_t)+(isVar?sizeof(size32_t):0); } size32_t serialize(void *dst) { diff --git a/system/jlib/jcomp.cpp b/system/jlib/jcomp.cpp index 0178b21bb55..efedaed4b6b 100644 --- a/system/jlib/jcomp.cpp +++ b/system/jlib/jcomp.cpp @@ -186,7 +186,7 @@ static void doSetCompilerPath(const char * path, const char * includes, const ch int r = stat(fname.str(), &filestatus); if ( (r != 0) || (!S_ISREG(filestatus.st_mode)) - || (filestatus.st_mode&(S_IXOTH|S_IXGRP|S_IXUSR)==0)) + || ((filestatus.st_mode&(S_IXOTH|S_IXGRP|S_IXUSR))==0)) { if (r == -1) errno = ENOENT; #endif diff --git a/system/jlib/jptree.cpp b/system/jlib/jptree.cpp index ef6884026cb..1f3aadea25e 100644 --- a/system/jlib/jptree.cpp +++ b/system/jlib/jptree.cpp @@ -4443,7 +4443,7 @@ class CXMLReader : public CXMLReaderBase, implements IXMLReader if (ignoreNameSpaces) { const char *colon; - if (colon = strchr(tagName.str(), ':')) + if ((colon = strchr(tagName.str(), ':')) != NULL) tagName.remove(0, (size32_t)(colon - tagName.str() + 1)); } iEvent->beginNode(tagName.toCharArray(), startOffset); @@ -4748,7 +4748,7 @@ class CPullXMLReader : public CXMLReaderBase, implements IPullXMLReader if (ignoreNameSpaces) { const char *colon; - if (colon = strchr(stateInfo->wnsTag, ':')) + if ((colon = strchr(stateInfo->wnsTag, ':')) != NULL) stateInfo->wnsTag = colon+1; } endOfRoot = false;