From 0c8932d2d955ce14dd0e214fab975d564bfa55d1 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Thu, 10 May 2012 13:17:15 +0200 Subject: [PATCH] Fixed more compilation warnings. --- base/dictionary.cpp | 6 +++--- icinga/virtualendpoint.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) 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; }