fixed clang warnings
authorVictor Kirhenshtein <victor@netxms.org>
Thu, 6 Oct 2016 12:36:46 +0000 (15:36 +0300)
committerVictor Kirhenshtein <victor@netxms.org>
Thu, 6 Oct 2016 12:36:46 +0000 (15:36 +0300)
src/server/core/admin.cpp
src/server/core/node.cpp
src/server/tools/nxdbmgr/nxdbmgr.cpp

index 07a1bb9..787ebcb 100644 (file)
@@ -159,6 +159,7 @@ THREAD_RESULT THREAD_CALL LocalAdminListener(void *pArg)
             errorCount = 0;
          }
          ThreadSleepMs(500);
+         continue;
       }
 
       errorCount = 0;     // Reset consecutive errors counter
index a3f121d..36f1a7e 100644 (file)
@@ -6738,7 +6738,7 @@ void Node::checkSubnetBinding()
       {
          InetAddress addr(m_ipAddress);
          addr.setMaskBits((addr.getFamily() == AF_INET) ? ConfigReadInt(_T("DefaultSubnetMaskIPv4"), 24) : ConfigReadInt(_T("DefaultSubnetMaskIPv6"), 64));
-                  pSubnet = createSubnet(addr, true);
+                  createSubnet(addr, true);
       }
    }
 
index 9d969a7..ef7af2c 100644 (file)
@@ -241,7 +241,7 @@ bool SQLBatch(const TCHAR *pszBatch)
    batch.replace(_T("$SQL:INT64"), g_pszSqlType[g_dbSyntax][SQL_TYPE_INT64]);
 
    pszQuery = pszBuffer = batch.getBuffer();
-   while(1)
+   while(true)
    {
       ptr = _tcschr(pszQuery, _T('\n'));
       if (ptr != NULL)
@@ -277,6 +277,8 @@ bool SQLBatch(const TCHAR *pszBatch)
                        }
                }
 
+               if (ptr == NULL)
+                  break;
       ptr++;
       pszQuery = ptr;
    }