Fixed some compiler warnings.

This commit is contained in:
Gunnar Beutner 2013-02-01 15:44:03 +01:00
parent df1199f206
commit 7835563e03
7 changed files with 8 additions and 19 deletions

View File

@ -94,13 +94,11 @@ void CompatIdoComponent::Start(void)
{
const int StatusTimerInterval = 60;
const int ConfigTimerInterval = 3600;
const int ProgramStatusTimerInterval = 15;
//const int ProgramStatusTimerInterval = 15;
const double ReconnectTimerInterval = GetReconnectInterval();
/* FIXME - make this a config option when unix sockets are realdy */
bool IdoSocketType = true;
/* HINTS - XXX
* - only tcp sockets
* - only icinga idoutils 1.8

View File

@ -26,8 +26,6 @@ static int I2Stream_free(BIO *bi);
static int I2Stream_read(BIO *bi, char *out, int outl);
static int I2Stream_write(BIO *bi, const char *in, int inl);
static long I2Stream_ctrl(BIO *bi, int cmd, long num, void *ptr);
static int I2Stream_gets(BIO *bi, char *buf, int size);
static int I2Stream_puts(BIO *bi, const char *str);
#define BIO_TYPE_I2STREAM (99|0x0400|0x0100)

View File

@ -82,17 +82,14 @@ void StreamLogger::ProcessLogEntry(ostream& stream, bool tty, const LogEntry& en
strftime(timestamp, sizeof(timestamp), "%Y/%m/%d %H:%M:%S %z", &tmnow);
if (tty) {
String colorCode;
switch (entry.Severity) {
case LogWarning:
colorCode = "\x1b[1;33m"; // yellow;
stream << "\x1b[1;33m"; // yellow;
break;
case LogCritical:
colorCode = "\x1b[1;31m"; // red
stream << "\x1b[1;31m"; // red
break;
}
stream << colorCode;
}
stream << "[" << timestamp << "] "

View File

@ -31,7 +31,7 @@ bool I2_EXPORT TlsStream::m_SSLIndexInitialized = false;
* @param sslContext The SSL context for the client.
*/
TlsStream::TlsStream(const Stream::Ptr& innerStream, TlsRole role, shared_ptr<SSL_CTX> sslContext)
: m_InnerStream(innerStream), m_Role(role), m_SSLContext(sslContext),
: m_InnerStream(innerStream), m_SSLContext(sslContext), m_Role(role),
m_SendQueue(boost::make_shared<FIFO>()), m_RecvQueue(boost::make_shared<FIFO>())
{
m_InnerStream->OnDataAvailable.connect(boost::bind(&TlsStream::DataAvailableHandler, this));

View File

@ -198,8 +198,6 @@ void DowntimeProcessor::AddDowntimesToCache(const DynamicObject::Ptr& owner)
String id;
Dictionary::Ptr downtime;
BOOST_FOREACH(tie(id, downtime), downtimes) {
double end_time = downtime->Get("end_time");
int legacy_id = downtime->Get("legacy_id");
if (legacy_id >= m_NextDowntimeID)

View File

@ -141,10 +141,10 @@ void ExternalCommandProcessor::ProcessServiceCheckResult(double time, const vect
result->Set("state", PluginCheckTask::ExitStatusToState(exitStatus));
double now = Utility::GetTime();
result->Set("schedule_start", time);
result->Set("schedule_end", time);
result->Set("execution_start", time);
result->Set("execution_end", time);
result->Set("schedule_start", now);
result->Set("schedule_end", now);
result->Set("execution_start", now);
result->Set("execution_end", now);
result->Set("active", 0);
Logger::Write(LogInformation, "icinga", "Processing passive check result for service '" + arguments[1] + "'");

View File

@ -28,8 +28,6 @@ void NullCheckTask::ScriptFunc(const ScriptTask::Ptr& task, const vector<Value>&
if (arguments.size() < 1)
throw_exception(invalid_argument("Missing argument: Service must be specified."));
double now = Utility::GetTime();
Dictionary::Ptr cr = boost::make_shared<Dictionary>();
cr->Set("state", StateUnknown);