From ebd0025f033ecf8f21d42e6a2c80ac312ec8116f Mon Sep 17 00:00:00 2001 From: Jiri Moskovcak Date: Fri, 27 Feb 2009 16:01:57 +0100 Subject: - fixed few gcc warnings - added scrolled window for long reports - fixes for all issues identified in review (awilliam@redhat.com) --- src/Daemon/CrashWatcher.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/Daemon/CrashWatcher.cpp') 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); -- cgit