]> granicus.if.org Git - icinga2/commitdiff
Fix compiler warnings 5297/head
authorGunnar Beutner <gunnar.beutner@icinga.com>
Mon, 29 May 2017 07:13:19 +0000 (09:13 +0200)
committerGunnar Beutner <gunnar.beutner@icinga.com>
Mon, 29 May 2017 07:13:19 +0000 (09:13 +0200)
refs #5287

lib/perfdata/graphitewriter.cpp
lib/remote/jsonrpcconnection.cpp

index df493d7d2ceaa2f14462852a25e29e85b9418c99..febc8dfbbcf5374b2fcfa5f0d71ff26a46efe1af 100644 (file)
@@ -136,8 +136,6 @@ void GraphiteWriter::Reconnect(void)
 
        SetShouldConnect(true);
 
-       bool reconnect = false;
-
        if (GetConnected())
                return;
 
index ef8ef0d89ba9aa97e8843a93c5de99aea7957ce4..5ad7fd0ad7621d6c160bfc07f222d1410da0056d 100644 (file)
@@ -347,9 +347,9 @@ int JsonRpcConnection::GetWorkQueueCount(void)
 
 int JsonRpcConnection::GetWorkQueueLength(void)
 {
-       size_t itemCount = 0;
+       int itemCount = 0;
 
-       for (size_t i = 0; i < GetWorkQueueCount(); i++) {
+       for (int i = 0; i < GetWorkQueueCount(); i++) {
                itemCount += l_JsonRpcConnectionWorkQueues[i].GetLength();
        }
 
@@ -365,7 +365,7 @@ double JsonRpcConnection::GetWorkQueueRate(void)
        if (count == 0)
                return 0.0;
 
-       for (size_t i = 0; i < count; i++) {
+       for (int i = 0; i < count; i++) {
                rate += l_JsonRpcConnectionWorkQueues[i].GetTaskCount(60) / 60.0;
        }