From: Gunnar Beutner Date: Thu, 10 May 2012 11:17:15 +0000 (+0200) Subject: Fixed more compilation warnings. X-Git-Tag: v0.0.1~532 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0c8932d2d955ce14dd0e214fab975d564bfa55d1;p=icinga2 Fixed more compilation warnings. --- diff --git a/base/dictionary.cpp b/base/dictionary.cpp index af4eeeed1..d98daa440 100644 --- a/base/dictionary.cpp +++ b/base/dictionary.cpp @@ -255,11 +255,11 @@ void Dictionary::AddUnnamedProperty(const Variant& value) { map::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); diff --git a/icinga/virtualendpoint.cpp b/icinga/virtualendpoint.cpp index 85cf6afeb..20a1a0573 100644 --- a/icinga/virtualendpoint.cpp +++ b/icinga/virtualendpoint.cpp @@ -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; }