Merge branch 'feature/compiler-warnings-5349' into next

Fixes #5349
This commit is contained in:
Gunnar Beutner 2013-12-17 07:57:32 +01:00
commit cbd4c6d6ae
7 changed files with 14 additions and 20 deletions

View File

@ -42,10 +42,6 @@ using namespace icinga;
REGISTER_TYPE(CompatLogger);
REGISTER_SCRIPTFUNCTION(ValidateRotationMethod, &CompatLogger::ValidateRotationMethod);
CompatLogger::CompatLogger(void)
: m_LastRotation(0)
{ }
/**
* @threadsafety Always.
*/

View File

@ -39,16 +39,12 @@ public:
DECLARE_PTR_TYPEDEFS(CompatLogger);
DECLARE_TYPENAME(CompatLogger);
CompatLogger(void);
static void ValidateRotationMethod(const String& location, const Dictionary::Ptr& attrs);
protected:
virtual void Start(void);
private:
double m_LastRotation;
void WriteLine(const String& line);
void Flush(void);

View File

@ -34,7 +34,7 @@ using namespace icinga;
int ThreadPool::m_NextID = 1;
ThreadPool::ThreadPool(int max_threads)
: m_ID(m_NextID++), m_Stopped(false), m_MaxThreads(max_threads)
: m_ID(m_NextID++), m_MaxThreads(max_threads), m_Stopped(false)
{
if (m_MaxThreads != -1 && m_MaxThreads < sizeof(m_Queues) / sizeof(m_Queues[0]))
m_MaxThreads = sizeof(m_Queues) / sizeof(m_Queues[0]);

View File

@ -548,8 +548,6 @@ String CompatUtility::GetServiceNotificationNotificationOptions(const Service::P
{
ASSERT(service->OwnsLock());
bool is_hostcheck = (service->GetHost()->GetCheckService() == service);
unsigned long notification_type_filter = 0;
unsigned long notification_state_filter = 0;

View File

@ -86,8 +86,6 @@ std::pair<double, double> ScheduledDowntime::FindNextSegment(void)
ObjectLock olock(ranges);
BOOST_FOREACH(const Dictionary::Pair& kv, ranges) {
tm rangeref;
Dictionary::Ptr segment = LegacyTimePeriod::FindNextSegment(kv.first, kv.second, &reference);
if (!segment)

View File

@ -285,6 +285,9 @@ void Service::ProcessCheckResult(const CheckResult::Ptr& cr, const String& autho
recovery = false;
switch (cr->GetState()) {
case StateOK:
/* Nothing to do here. */
break;
case StateWarning:
SetLastStateWarning(Utility::GetTime());
break;

View File

@ -149,15 +149,18 @@ void ClassCompiler::HandleClass(const Klass& klass, const ClassDebugInfo& locp)
/* StaticGetFieldId */
std::cout << "\t" << "static int StaticGetFieldId(const String& name)" << std::endl
<< "\t" << "{" << std::endl
<< "\t\t" << "int offset = ";
<< "\t" << "{" << std::endl;
if (!klass.Parent.empty())
std::cout << "TypeImpl<" << klass.Parent << ">::StaticGetFieldCount()";
else
std::cout << "0";
if (!klass.Fields.empty()) {
std::cout << "\t\t" << "int offset = ";
std::cout << ";" << std::endl << std::endl;
if (!klass.Parent.empty())
std::cout << "TypeImpl<" << klass.Parent << ">::StaticGetFieldCount()";
else
std::cout << "0";
std::cout << ";" << std::endl << std::endl;
}
std::map<int, std::vector<std::pair<int, std::string> > > jumptable;