summaryrefslogtreecommitdiffstats
path: root/src/Daemon
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-08-09 12:11:03 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-08-09 12:11:03 +0200
commit3bab9d79a01ac70a78c012eaa82dccaaa5c59ee5 (patch)
treeb22cb40eac1cff376d2cb0abb066202fe414eae3 /src/Daemon
parent5bfd6ac66529ed1976db7df0ab4853eec855e411 (diff)
downloadabrt-3bab9d79a01ac70a78c012eaa82dccaaa5c59ee5.tar.gz
abrt-3bab9d79a01ac70a78c012eaa82dccaaa5c59ee5.tar.xz
abrt-3bab9d79a01ac70a78c012eaa82dccaaa5c59ee5.zip
fix compile-time warnings.
One fix (in CCrashWatcher::GetPluginsInfo) needs closer look, others are "trivially correct" Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'src/Daemon')
-rw-r--r--src/Daemon/CrashWatcher.cpp6
-rw-r--r--src/Daemon/Daemon.cpp5
-rw-r--r--src/Daemon/MiddleWare.cpp4
3 files changed, 11 insertions, 4 deletions
diff --git a/src/Daemon/CrashWatcher.cpp b/src/Daemon/CrashWatcher.cpp
index cba81f14..697a9a04 100644
--- a/src/Daemon/CrashWatcher.cpp
+++ b/src/Daemon/CrashWatcher.cpp
@@ -200,6 +200,9 @@ void *CCrashWatcher::create_report(void *arg)
free(thread_data->UID);
free(thread_data->dest);
free(thread_data);
+
+ /* Bogus value. pthreads require us to return void* */
+ return NULL;
}
gboolean CCrashWatcher::cron_activation_periodic_cb(gpointer data)
@@ -885,4 +888,7 @@ vector_map_string_string_t CCrashWatcher::GetPluginsInfo()
}
Warning(e.what());
}
+ // TODO: is it right? I added it just to disable a warning...
+ // but maybe returning empty map is wrong here?
+ return vector_map_string_string_t();
}
diff --git a/src/Daemon/Daemon.cpp b/src/Daemon/Daemon.cpp
index b8b350c4..3a6c8fc9 100644
--- a/src/Daemon/Daemon.cpp
+++ b/src/Daemon/Daemon.cpp
@@ -17,6 +17,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+#include "abrtlib.h"
#include "CrashWatcher.h"
#include "ABRTException.h"
#include <iostream>
@@ -93,8 +94,8 @@ int main(int argc, char** argv)
* Otherwise fprintf(stderr) dumps messages into random fds, etc. */
close(STDOUT_FILENO);
close(STDERR_FILENO);
- dup(0);
- dup(0);
+ xdup(0);
+ xdup(0);
}
g_pCrashWatcher = new CCrashWatcher(DEBUG_DUMPS_DIR);
if (daemonize)
diff --git a/src/Daemon/MiddleWare.cpp b/src/Daemon/MiddleWare.cpp
index 2a8688e7..6ebeffda 100644
--- a/src/Daemon/MiddleWare.cpp
+++ b/src/Daemon/MiddleWare.cpp
@@ -28,8 +28,8 @@
CMiddleWare::CMiddleWare(const std::string& pPluginsConfDir,
const std::string& pPluginsLibDir) :
m_pPluginManager(NULL),
- m_bOpenGPGCheck(true),
- m_sPluginsConfDir(pPluginsConfDir)
+ m_sPluginsConfDir(pPluginsConfDir),
+ m_bOpenGPGCheck(true)
{
m_pPluginManager = new CPluginManager(pPluginsConfDir, pPluginsLibDir);
m_pPluginManager->LoadPlugins();