]> granicus.if.org Git - icinga2/commitdiff
Fixed more compilation warnings.
authorGunnar Beutner <gunnar.beutner@netways.de>
Thu, 10 May 2012 11:17:15 +0000 (13:17 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Thu, 10 May 2012 11:17:15 +0000 (13:17 +0200)
base/dictionary.cpp
icinga/virtualendpoint.cpp

index af4eeeed144ef6bf8be20f3676c67645f78839e1..d98daa440bdb033fc9a24ef18db3602235b86aee 100644 (file)
@@ -255,11 +255,11 @@ void Dictionary::AddUnnamedProperty(const Variant& value)
 {
        map<string, Variant>::const_iterator it;
        string key;
+       long index = GetLength();
        do {
-               long index = GetLength();
-       
                stringstream s;
-               s << "_" << GetLength();
+               s << "_" << index;
+               index++;
 
                key = s.str();
                it = m_Data.find(key);
index 85cf6afeb8e6bb28ef2a856b9503219c06d911b4..20a1a05737a94ed89afd42216578b9f835245a35 100644 (file)
@@ -24,7 +24,7 @@ using namespace icinga;
 string VirtualEndpoint::GetAddress(void) const
 {
        char address[50];
-       sprintf(address, "virtual:%p", this);
+       sprintf(address, "virtual:%p", (void *)this);
        return address;
 }