From fddead5303b6d8d64b39d0b252404786810c6613 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Mon, 24 Nov 2014 18:24:47 +0100 Subject: [PATCH] Fix some compiler warnings fixes #7826 --- lib/base/scriptutils.cpp | 2 +- lib/config/expression.cpp | 2 ++ lib/icinga/dependency.hpp | 2 +- lib/icinga/notification.hpp | 2 +- lib/icinga/scheduleddowntime.hpp | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/base/scriptutils.cpp b/lib/base/scriptutils.cpp index 5f5a08bdd..1109a2729 100644 --- a/lib/base/scriptutils.cpp +++ b/lib/base/scriptutils.cpp @@ -156,7 +156,7 @@ void ScriptUtils::Log(const std::vector& arguments) message = arguments[2]; } - if (message.IsString() || !message.IsObjectType() && !message.IsObjectType()) + if (message.IsString() || (!message.IsObjectType() && !message.IsObjectType())) ::Log(severity, facility, message); else ::Log(severity, facility, JsonEncode(message)); diff --git a/lib/config/expression.cpp b/lib/config/expression.cpp index bd5bb7852..da9e32f1f 100644 --- a/lib/config/expression.cpp +++ b/lib/config/expression.cpp @@ -352,6 +352,8 @@ Value ConditionalExpression::DoEvaluate(VMFrame& frame, DebugHint *dhint) const return m_TrueBranch->Evaluate(frame, dhint); else if (m_FalseBranch) return m_FalseBranch->Evaluate(frame, dhint); + + return Empty; } Value ReturnExpression::DoEvaluate(VMFrame& frame, DebugHint *dhint) const diff --git a/lib/icinga/dependency.hpp b/lib/icinga/dependency.hpp index afea95920..27d0c5d8d 100644 --- a/lib/icinga/dependency.hpp +++ b/lib/icinga/dependency.hpp @@ -28,7 +28,7 @@ namespace icinga { class ApplyRule; -class VMFrame; +struct VMFrame; class Host; class Service; diff --git a/lib/icinga/notification.hpp b/lib/icinga/notification.hpp index 4bc864331..3c1457e1f 100644 --- a/lib/icinga/notification.hpp +++ b/lib/icinga/notification.hpp @@ -68,7 +68,7 @@ enum NotificationType class NotificationCommand; class Checkable; class ApplyRule; -class VMFrame; +struct VMFrame; class Host; class Service; diff --git a/lib/icinga/scheduleddowntime.hpp b/lib/icinga/scheduleddowntime.hpp index 45fb63f3f..5a709686c 100644 --- a/lib/icinga/scheduleddowntime.hpp +++ b/lib/icinga/scheduleddowntime.hpp @@ -29,7 +29,7 @@ namespace icinga { class ApplyRule; -class VMFrame; +struct VMFrame; class Host; class Service;