From: Michael Friedrich Date: Wed, 25 Sep 2013 09:31:35 +0000 (+0200) Subject: Fix unused parameter, missing initialization. X-Git-Tag: v0.0.3~422 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0b4c5547116ea0fd23e33000bcfaea15eb440f13;p=icinga2 Fix unused parameter, missing initialization. --- diff --git a/lib/db_ido/servicedbobject.cpp b/lib/db_ido/servicedbobject.cpp index 521107973..f5d278849 100644 --- a/lib/db_ido/servicedbobject.cpp +++ b/lib/db_ido/servicedbobject.cpp @@ -48,7 +48,7 @@ void ServiceDbObject::StaticInitialize(void) Service::OnDowntimeTriggered.connect(boost::bind(&ServiceDbObject::TriggerDowntime, _1, _2)); /* History */ - Service::OnAcknowledgementSet.connect(boost::bind(&ServiceDbObject::AddAcknowledgement, _1, _2, _3, _4, _5, _6)); + Service::OnAcknowledgementSet.connect(boost::bind(&ServiceDbObject::AddAcknowledgement, _1, _2, _3, _4, _5)); Service::OnNotificationSentToAllUsers.connect(bind(&ServiceDbObject::AddNotification, _1, _2, _3, _4, _5, _6)); } @@ -729,7 +729,7 @@ void ServiceDbObject::TriggerDowntime(const Service::Ptr& service, const Diction } void ServiceDbObject::AddAcknowledgement(const Service::Ptr& service, const String& author, const String& comment, - AcknowledgementType type, double expiry, const String& authority) + AcknowledgementType type, double expiry) { Host::Ptr host = service->GetHost(); diff --git a/lib/db_ido/servicedbobject.h b/lib/db_ido/servicedbobject.h index 204583a27..c4ed15191 100644 --- a/lib/db_ido/servicedbobject.h +++ b/lib/db_ido/servicedbobject.h @@ -66,7 +66,7 @@ private: static void TriggerDowntime(const Service::Ptr& service, const Dictionary::Ptr& downtime); /* History */ - static void AddAcknowledgement(const Service::Ptr& service, const String& author, const String& comment, AcknowledgementType type, double expiry, const String& authority); + static void AddAcknowledgement(const Service::Ptr& service, const String& author, const String& comment, AcknowledgementType type, double expiry); static void AddNotification(const Service::Ptr& service, const std::set& users, NotificationType type, const Dictionary::Ptr& cr, const String& author, const String& text); }; diff --git a/lib/icinga/compatutility.cpp b/lib/icinga/compatutility.cpp index e53c23fa9..103f8cf1f 100644 --- a/lib/icinga/compatutility.cpp +++ b/lib/icinga/compatutility.cpp @@ -100,8 +100,8 @@ Dictionary::Ptr CompatUtility::GetHostConfigAttributes(const Host::Ptr& host) Service::Ptr service = host->GetCheckService(); if (service) { - unsigned long notification_type_filter; - unsigned long notification_state_filter; + unsigned long notification_type_filter = 0; + unsigned long notification_state_filter = 0; ObjectLock olock(service); @@ -308,8 +308,8 @@ Dictionary::Ptr CompatUtility::GetServiceConfigAttributes(const Service::Ptr& se double notification_interval = -1; String notification_period; - unsigned long notification_type_filter; - unsigned long notification_state_filter; + unsigned long notification_type_filter = 0; + unsigned long notification_state_filter = 0; BOOST_FOREACH(const Notification::Ptr& notification, service->GetNotifications()) { if (notification_interval == -1 || notification->GetNotificationInterval() < notification_interval) @@ -324,7 +324,7 @@ Dictionary::Ptr CompatUtility::GetServiceConfigAttributes(const Service::Ptr& se if (notification->GetNotificationStateFilter()) notification_state_filter = notification->GetNotificationStateFilter(); - Log(LogDebug, "compatutility", "notification_type_filter: " + Convert::ToString(notification_type_filter) + " notification_state_filter: " + Convert::ToString(notification_state_filter)); + Log(LogDebug, "icinga", "notification_type_filter: " + Convert::ToString(notification_type_filter) + " notification_state_filter: " + Convert::ToString(notification_state_filter)); } @@ -454,7 +454,7 @@ Dictionary::Ptr CompatUtility::GetCustomVariableConfig(const DynamicObject::Ptr& } else if (object->GetType() == DynamicType::GetByName("User")) { custom = static_pointer_cast(object)->GetCustom(); } else { - Log(LogDebug, "compatutility", "unknown object type for custom vars"); + Log(LogDebug, "icinga", "unknown object type for custom vars"); return Dictionary::Ptr(); }