Fix missing initializer warning in gio/inotify/inotify-kernel.c:ik_source_new()

gio/inotify/inotify-kernel.c: In function ‘ik_source_new’:
gio/inotify/inotify-kernel.c:377:3: error: missing initializer for field ‘finalize’ of ‘GSourceFuncs’ {aka ‘struct _GSourceFuncs’}
  377 |   };
      |   ^
In file included from glib/giochannel.h:33,
                 from glib/glib.h:54,
                 from gio/inotify/inotify-kernel.c:30:
glib/gmain.h:272:14: note: ‘finalize’ declared here
  272 |   void     (*finalize) (GSource    *source); /* Can be NULL */
      |              ^~~~~~~~
This commit is contained in:
Emmanuel Fleury 2020-11-16 18:56:20 +01:00
parent 805053d09b
commit 3b02d4641e

View File

@ -372,8 +372,8 @@ ik_source_new (gboolean (* callback) (ik_event_t *event))
{
static GSourceFuncs source_funcs = {
NULL, NULL,
ik_source_dispatch
/* should have a finalize, but it will never happen */
ik_source_dispatch,
NULL, NULL, NULL
};
InotifyKernelSource *iks;
GSource *source;