Browse Source

Merge pull request #7969 from richardkchapman/aci-typo

HPCC-14557 Typos in aci.cpp give compiler errors
HPCC-14558 Wc++11-narrowing errors on latest OSX builds Aci typo

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>
Gavin Halliday 9 years ago
parent
commit
3c545e42a9

+ 1 - 1
common/workunit/workunit.cpp

@@ -1828,7 +1828,7 @@ public:
 
 extern WORKUNIT_API bool isSpecialResultSequence(unsigned sequence)
 {
-    switch (sequence)
+    switch ((int) sequence)
     {
     case ResultSequenceInternal:
     case ResultSequenceOnce:

+ 1 - 1
esp/clients/LoggingClient/LogThread.cpp

@@ -754,7 +754,7 @@ bool CLogThread::FlattenTree(IArrayOf<IEspLogInfo>& valueArray,IPropertyTree& tr
             else
             {
                 const char* _value = tree.queryProp(node.queryName());
-                if(tree.hasProp(node.queryName())==true && _value!=0 && _value!='\0')
+                if(tree.hasProp(node.queryName())==true && _value!=0 && *_value!='\0')
                 {
                     Value.appendf("%s",tree.queryProp(node.queryName()));
                     IClientLogInfo& logElement = addLogInfoElement(valueArray);

+ 2 - 2
esp/esdllib/esdl_def.cpp

@@ -1893,7 +1893,7 @@ public:
     {
         if (filename && *filename)
         {
-            if (def->added.getValue(filename) == false)
+            if (!def->added.getValue(filename))
             {
                 StringBuffer dbgstr;
                 dbgstr.appendN(indent, ' ').append("Adding: ").append(filename);
@@ -1963,7 +1963,7 @@ void EsdlDefinition::addDefinitionFromXML(const StringBuffer & xmlDef, const cha
     if (!esdlDefId || !*esdlDefId)
         DBGLOG("XML ESDL definition cannot be loaded with out definition ID.");
 
-    if (added.getValue(esdlDefId) == false)
+    if (!added.getValue(esdlDefId))
     {
         DBGLOG("Loading XML ESDL definition: %s",esdlDefId);
         TimeSection ts("adding XML ESDL definition");

+ 2 - 2
plugins/redis/redis.cpp

@@ -226,7 +226,7 @@ void Connection::redisConnect()
         context = ::redisConnect(ip.str(), port);
     else
     {
-        unsigned _timeLeft = timeLeft();
+        int _timeLeft = (int) timeLeft();
         struct timeval to = { _timeLeft/1000, (_timeLeft%1000)*1000 };
         context = ::redisConnectWithTimeout(ip.str(), port, to);
     }
@@ -280,7 +280,7 @@ unsigned Connection::timeLeft()
 }
 void Connection::redisSetTimeout()
 {
-    unsigned _timeLeft = timeLeft();
+    int _timeLeft = (int) timeLeft();
     if (_timeLeft == 0)
         return;
     struct timeval to = { _timeLeft/1000, (_timeLeft%1000)*1000 };

+ 2 - 2
roxie/ccd/ccdcontext.cpp

@@ -1870,7 +1870,7 @@ protected:
     IPropertyTree &useContext(unsigned sequence)
     {
         checkAbort();
-        switch (sequence)
+        switch ((int) sequence)
         {
         case ResultSequenceStored:
             if (context)
@@ -1908,7 +1908,7 @@ protected:
     IDeserializedResultStore &useResultStore(unsigned sequence)
     {
         checkAbort();
-        switch (sequence)
+        switch ((int) sequence)
         {
         case ResultSequenceOnce:
             return factory->queryOnceResultStore();

+ 2 - 2
system/security/LdapSecurity/aci.cpp

@@ -142,7 +142,7 @@ public:
                 curptr++;
             if(*curptr != '\0')
                 curptr++;
-            while(*curptr != '"' && curptr != '\0')
+            while(*curptr != '"' && *curptr != '\0')
             {
                 m_targetattr.append(*curptr);
                 curptr++;
@@ -162,7 +162,7 @@ public:
             if(strncmp(curptr, "ldap:///", 8) == 0)
                 curptr += 8;
 
-            while(*curptr != '"' && curptr != '\0')
+            while(*curptr != '"' && *curptr != '\0')
             {
                 m_target.append(*curptr);
                 curptr++;

+ 1 - 1
tools/esdlcmd-xml/esdl2xml.hpp

@@ -47,7 +47,7 @@ public:
 
     void transform(const char * source, const char * outdir="", StringBuffer * out=NULL, bool outputIncludes=true, bool includedESDL=false)
     {
-        if (added.getValue(source) == false)
+        if (!added.getValue(source))
         {
             if (optVerbose)
             {