HPCC-22761 Fix various non symptomatic issues found by analyser Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
@@ -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);
@@ -11121,6 +11123,7 @@ void CLocalWUResult::addResultRaw(unsigned len, const void *data, WUResultFormat
formatStr = "csv";
default:
+ existingFormat = nullptr;
p->removeProp("@format");
@@ -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;
@@ -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;;
@@ -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();
@@ -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);
@@ -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();