]> granicus.if.org Git - icinga2/commitdiff
Fixed compiler warnings.
authorGunnar Beutner <gunnar.beutner@netways.de>
Sat, 4 Aug 2012 07:58:31 +0000 (09:58 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Sat, 4 Aug 2012 07:58:31 +0000 (09:58 +0200)
base/application.cpp
base/process.cpp
base/sysloglogger.cpp
base/tlsclient.cpp
components/delegation/delegationcomponent.cpp

index 0d0cd1a9badf5c12c270fdd520050d836313d737..54d7d348702bb2990f4be377afa51bc3dea554dc 100644 (file)
@@ -82,7 +82,9 @@ Application::Ptr Application::GetInstance(void)
  */
 void Application::RunEventLoop(void)
 {
+#ifdef _DEBUG
        double nextProfile = 0;
+#endif /* _DEBUG */
 
        while (!m_ShuttingDown) {
                Object::ClearHeldObjects();
@@ -148,7 +150,7 @@ String Application::GetExePath(void) const
                executablePath = argv0;
 
        bool foundSlash = false;
-       for (int i = 0; i < argv0.GetLength(); i++) {
+       for (size_t i = 0; i < argv0.GetLength(); i++) {
                if (argv0[i] == '/') {
                        foundSlash = true;
                        break;
index 01598b094f30394d70ad95db0004d030a77e3289..97ac045411b1714e57de95b70fc3c8e0038d5cc9 100644 (file)
@@ -199,6 +199,8 @@ bool Process::RunTask(void)
                outputbuf << "Process was terminated by signal " << WTERMSIG(status);
                output = outputbuf.str();
                exitcode = 128;
+       } else {
+               exitcode = 128;
        }
 #endif /* _MSC_VER */
 
index 94455cd56c80fad7552e6e1b311b63378391ced3..8b66997b949526793c3e9cfb789f837f1902bd55 100644 (file)
@@ -10,8 +10,6 @@ using namespace icinga;
  */
 void SyslogLogger::ProcessLogEntry(const LogEntry& entry)
 {
-       char timestamp[100];
-
        int severity;
        switch (entry.Severity) {
                case LogDebug:
index 2ba222d1450180264f7588bf471d29fda4c447a4..ac2fb522eb4bcccb9b14fc0c1206dbe608fd8e64 100644 (file)
@@ -112,13 +112,9 @@ shared_ptr<X509> TlsClient::GetPeerCertificate(void) const
  */
 void TlsClient::HandleReadable(void)
 {
-       int result;
-
        m_BlockRead = false;
        m_BlockWrite = false;
 
-       result = 0;
-
        for (;;) {
                char data[1024];
                int rc;
index e30d0429cd8a52a46876ab3cd95b5f600f3bf255..bc4a053af311357d7482180932fc079b1ef233e0 100644 (file)
@@ -95,7 +95,6 @@ void DelegationComponent::DelegationTimerHandler(void)
 
        std::random_shuffle(services.begin(), services.end());
 
-       bool need_clear = false;
        int delegated = 0;
 
        /* re-assign services */
@@ -135,7 +134,6 @@ void DelegationComponent::DelegationTimerHandler(void)
 
                /* clear the service's current checker */
                if (!checker.IsEmpty()) {
-                       need_clear = true;
                        service->SetChecker("");
 
                        if (oldEndpoint)