diff options
Diffstat (limited to 'src/Daemon')
| -rw-r--r-- | src/Daemon/CrashWatcher.cpp | 6 | ||||
| -rw-r--r-- | src/Daemon/Makefile.am | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/Daemon/CrashWatcher.cpp b/src/Daemon/CrashWatcher.cpp index d524e99..c06ad01 100644 --- a/src/Daemon/CrashWatcher.cpp +++ b/src/Daemon/CrashWatcher.cpp @@ -44,7 +44,7 @@ gboolean CCrashWatcher::handle_event_cb(GIOChannel *gio, GIOCondition condition, //char *buf = malloc(INOTIFY_BUFF_SIZE; char *buf = new char[INOTIFY_BUFF_SIZE]; gsize len; - int i = 0; + gsize i = 0; err = g_io_channel_read (gio, buf, INOTIFY_BUFF_SIZE, &len); if (err != G_IO_ERROR_NONE) { g_warning ("Error reading inotify fd: %d\n", err); @@ -52,7 +52,7 @@ gboolean CCrashWatcher::handle_event_cb(GIOChannel *gio, GIOCondition condition, } /* reconstruct each event and send message to the dbus */ while (i < len) { - const char *name; + const char *name = NULL; struct inotify_event *event; event = (struct inotify_event *) &buf[i]; @@ -220,8 +220,6 @@ void CCrashWatcher::StartWatch() /* daemon loop with glib */ void CCrashWatcher::GStartWatch() { - char action[FILENAME_MAX]; - struct inotify_event *pevent; g_io_add_watch (m_nGio, G_IO_IN, handle_event_cb, this); //enter the event loop g_main_run (m_nMainloop); diff --git a/src/Daemon/Makefile.am b/src/Daemon/Makefile.am index a9486bc..8a88fbc 100644 --- a/src/Daemon/Makefile.am +++ b/src/Daemon/Makefile.am @@ -1,7 +1,7 @@ sbin_PROGRAMS = crash-catcher crash_catcher_SOURCES = CrashWatcher.cpp CrashWatcher.h Daemon.cpp DBusServerProxy.h \ DBusCommon.h -crash_catcher_CPPFLAGS = -I../../lib/MiddleWare\ +crash_catcher_CPPFLAGS = -Wall -Werror -I../../lib/MiddleWare\ -I../../lib/DBus \ -DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" $(DBUS_GLIB_CFLAGS) $(DBUSCPP_CFLAGS) \ -DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" \ |
