Jelajahi Sumber

Merge pull request #12946 from ghalliday/issue22761

HPCC-22761 Fix various non symptomatic issues found by analyser

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 5 tahun lalu
induk
melakukan
f28f50ad32

+ 3 - 0
common/workunit/workunit.cpp

@@ -10854,6 +10854,8 @@ void readRow(StringBuffer &out, MemoryBuffer &in, TypeInfoArray &types, StringAt
             case 8:
                 in.read(cvald);
                 break;
+            default:
+                throwUnexpected();
             }
             outputXmlReal(cvald, name.text, out);
             break;
@@ -11121,6 +11123,7 @@ void CLocalWUResult::addResultRaw(unsigned len, const void *data, WUResultFormat
         formatStr = "csv";
         break;
     default:
+        existingFormat = nullptr;
         p->removeProp("@format");
         break;
     }

+ 1 - 1
dali/dfuXRefLib/XRefFilesNode.cpp

@@ -377,7 +377,7 @@ bool CXRefFilesNode::AttachPhysical(const char *Partmask,IUserDescriptor* udesc,
         const char* _node = part.queryProp("Node[1]");
         if (!_node||!*_node)
             _node = part.queryProp("RNode[1]");
-        if (!*_node||!*_node) {
+        if (!_node||!*_node) {
             OERRLOG("%s - could not attach (missing part info)",Partmask);
             errstr.appendf("ERROR: %s - could not attach (missing part info)",Partmask);
             return false;

+ 1 - 1
deployment/configenv/common/GenEnvRules.cpp

@@ -122,7 +122,7 @@ bool GenEnvRules::isValidServerCombo(const char* server1, const char* server2) c
 
    const char * propname = "avoid_combo";
 
-   if (!foundInProp(propname, s1.str()) && !foundInProp(propname, s1.str()))
+   if (!foundInProp(propname, s1.str()) && !foundInProp(propname, s2.str()))
      return true;
 
    return false;;

+ 1 - 1
ecl/hql/hqlfilter.cpp

@@ -553,7 +553,7 @@ void FilterExtractor::expandSelects(IHqlExpression * expr, IHqlSimpleScope * exp
                         ITypeInfo * exprType = expr->queryType();
                         ITypeInfo * matchType = match->queryType();
                         if ((exprType->getSize() != matchType->getSize()) ||
-                            (exprType->getTypeCode() == type_bitfield || exprType->getTypeCode() == type_bitfield))
+                            (exprType->getTypeCode() == type_bitfield || matchType->getTypeCode() == type_bitfield))
                             firstOffsetField = keyableSelects.ordinality();
                     }
 

+ 1 - 1
esp/tools/soapplus/msggenerator.cpp

@@ -347,7 +347,7 @@ void MessageGenerator::genNonRoxieMessage(const char* method, const char* templa
     if (schema)
     {
         const char* ns = schema->queryProp("@targetNamespace");
-        if(ns && ns && !m_ecl2esp)
+        if(ns && *ns && !m_ecl2esp)
             message.appendf("  <%s  xmlns=\"%s\">", element, ns);
         else
             message.appendf("  <%s>", element);

+ 1 - 1
system/mp/test/mptest.cpp

@@ -998,7 +998,7 @@ void MPMultiMTSendRecv(ICommunicator* comm, int counter)
         assertex(r_counter == 0);
         PROGLOG("Rank %d sent %d messages", rank, (counter-s_counter));
         PROGLOG("Rank %d received %d messages", rank, (counter-r_counter));
-        delete validate;
+        delete [] validate;
     }
     comm->barrier();
 }