[glib: 14/15] Fixing missing initializer warnings in glib/tests/mainloop.c
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 14/15] Fixing missing initializer warnings in glib/tests/mainloop.c
- Date: Sat, 14 Nov 2020 11:44:47 +0000 (UTC)
commit e7c1b2a4840f4c2eea55967e2cd8a223f4a14376
Author: Emmanuel Fleury <emmanuel fleury gmail com>
Date: Sun Nov 8 22:50:50 2020 +0100
Fixing missing initializer warnings in glib/tests/mainloop.c
glib/tests/mainloop.c:55:1: error: missing initializer for field ‘closure_callback’ of ‘GSourceFuncs’
{aka ‘struct _GSourceFuncs’}
55 | };
| ^
In file included from glib/giochannel.h:33,
from glib/glib.h:54,
from glib/tests/mainloop.c:23:
glib/gmain.h:276:19: note: ‘closure_callback’ declared here
276 | GSourceFunc closure_callback;
| ^~~~~~~~~~~~~~~~
glib/tests/mainloop.c:422:1: error: missing initializer for field ‘closure_callback’ of ‘GSourceFuncs’
{aka ‘struct _GSourceFuncs’}
422 | };
| ^
In file included from glib/giochannel.h:33,
from glib/glib.h:54,
from glib/tests/mainloop.c:23:
glib/gmain.h:276:19: note: ‘closure_callback’ declared here
276 | GSourceFunc closure_callback;
| ^~~~~~~~~~~~~~~~
glib/tests/mainloop.c: In function ‘test_ready_time’:
glib/tests/mainloop.c:946:3: error: missing initializer for field ‘finalize’ of ‘GSourceFuncs’ {aka
‘struct _GSourceFuncs’}
946 | };
| ^
In file included from glib/giochannel.h:33,
from glib/glib.h:54,
from glib/tests/mainloop.c:23:
glib/gmain.h:272:14: note: ‘finalize’ declared here
272 | void (*finalize) (GSource *source); /* Can be NULL */
| ^~~~~~~~
glib/tests/mainloop.c: In function ‘test_unref_while_pending’:
glib/tests/mainloop.c:1088:3: error: missing initializer for field ‘closure_callback’ of ‘GSourceFuncs’
{aka ‘struct _GSourceFuncs’}
1088 | static GSourceFuncs funcs = { trivial_prepare, NULL, NULL, trivial_finalize };
| ^~~~~~
In file included from glib/giochannel.h:33,
from glib/glib.h:54,
from glib/tests/mainloop.c:23:
glib/gmain.h:276:19: note: ‘closure_callback’ declared here
276 | GSourceFunc closure_callback;
| ^~~~~~~~~~~~~~~~
In file included from glib/glibconfig.h:9,
from glib/gtypes.h:32,
from glib/galloca.h:32,
from glib/glib.h:30,
from glib/tests/mainloop.c:23:
glib/tests/mainloop.c: In function ‘test_source_unix_fd_api’:
glib/tests/mainloop.c:1403:3: error: missing initializer for field ‘finalize’ of ‘GSourceFuncs’ {aka
‘struct _GSourceFuncs’}
1403 | };
| ^
In file included from glib/giochannel.h:33,
from glib/glib.h:54,
from glib/tests/mainloop.c:23:
glib/gmain.h:272:14: note: ‘finalize’ declared here
272 | void (*finalize) (GSource *source); /* Can be NULL */
| ^~~~~~~~
glib/tests/mainloop.c: At top level:
glib/tests/mainloop.c:1843:1: error: missing initializer for field ‘closure_callback’ of ‘GSourceFuncs’
{aka ‘struct _GSourceFuncs’}
1843 | };
| ^
In file included from glib/giochannel.h:33,
from glib/glib.h:54,
from glib/tests/mainloop.c:23:
glib/gmain.h:276:19: note: ‘closure_callback’ declared here
276 | GSourceFunc closure_callback;
| ^~~~~~~~~~~~~~~~
glib/tests/mainloop.c:1919:1: error: missing initializer for field ‘closure_callback’ of ‘GSourceFuncs’
{aka ‘struct _GSourceFuncs’}
1919 | };
| ^
In file included from glib/giochannel.h:33,
from glib/glib.h:54,
from glib/tests/mainloop.c:23:
glib/gmain.h:276:19: note: ‘closure_callback’ declared here
276 | GSourceFunc closure_callback;
| ^~~~~~~~~~~~~~~~
glib/tests/mainloop.c:2002:1: error: missing initializer for field ‘closure_callback’ of ‘GSourceFuncs’
{aka ‘struct _GSourceFuncs’}
2002 | };
| ^
In file included from glib/giochannel.h:33,
from glib/glib.h:54,
from glib/tests/mainloop.c:23:
glib/gmain.h:276:19: note: ‘closure_callback’ declared here
276 | GSourceFunc closure_callback;
| ^~~~~~~~~~~~~~~~
glib/tests/mainloop.c | 24 ++++++++++++++++++------
1 file changed, 18 insertions(+), 6 deletions(-)
---
diff --git a/glib/tests/mainloop.c b/glib/tests/mainloop.c
index 5cdb2a467..16763a0ea 100644
--- a/glib/tests/mainloop.c
+++ b/glib/tests/mainloop.c
@@ -51,6 +51,8 @@ static GSourceFuncs funcs = {
prepare,
check,
dispatch,
+ NULL,
+ NULL,
NULL
};
@@ -419,6 +421,8 @@ static GSourceFuncs counter_source_funcs = {
NULL,
counter_source_dispatch,
NULL,
+ NULL,
+ NULL
};
static GSource *
@@ -942,7 +946,7 @@ test_ready_time (void)
GThread *thread;
GSource *source;
GSourceFuncs source_funcs = {
- NULL, NULL, ready_time_dispatch
+ NULL, NULL, ready_time_dispatch, NULL, NULL, NULL
};
GMainLoop *loop;
@@ -1085,7 +1089,9 @@ trivial_finalize (GSource *source)
static void
test_unref_while_pending (void)
{
- static GSourceFuncs funcs = { trivial_prepare, NULL, NULL, trivial_finalize };
+ static GSourceFuncs funcs = {
+ trivial_prepare, NULL, NULL, trivial_finalize, NULL, NULL
+ };
GMainContext *context;
GSource *source;
@@ -1399,7 +1405,7 @@ static void
test_source_unix_fd_api (void)
{
GSourceFuncs no_funcs = {
- NULL, NULL, return_true
+ NULL, NULL, return_true, NULL, NULL, NULL
};
GSource *source_a;
GSource *source_b;
@@ -1839,7 +1845,9 @@ static GSourceFuncs source_funcs = {
prepare,
check,
dispatch,
- finalize
+ finalize,
+ NULL,
+ NULL
};
static void
@@ -1915,7 +1923,9 @@ static GSourceFuncs source_with_source_funcs = {
NULL,
NULL,
NULL,
- finalize_source_with_source
+ finalize_source_with_source,
+ NULL,
+ NULL
};
static void
@@ -1998,7 +2008,9 @@ static GSourceFuncs source_with_source_funcs_dispatch = {
NULL,
NULL,
dispatch_source_with_source,
- finalize_source_with_source
+ finalize_source_with_source,
+ NULL,
+ NULL
};
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]