aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2016-03-18 08:36:59 -0700
committerPaul Eggert2016-03-18 08:43:32 -0700
commitde7601f149a5fedc1f3f62c62ba94b9d0e3d2069 (patch)
tree45f4b9831b90d402b747d94aac05bcc07af5a39f /src
parent658aa2dae8093fede8c823090c67e02756dd6ed5 (diff)
downloademacs-de7601f149a5fedc1f3f62c62ba94b9d0e3d2069.tar.gz
emacs-de7601f149a5fedc1f3f62c62ba94b9d0e3d2069.zip
Port to GTK with strict C11 compiler
* src/gtkutil.c (xg_create_frame_widgets, xg_toggle_notify_cb): Cast from function type to void * where the C standard requires this. This works around a problem in the prototypes for g_signal_handler_find and g_signal_handlers_block_by_func, which use gpointer instead of GCallback. Found by using gcc -pedantic.
Diffstat (limited to 'src')
-rw-r--r--src/gtkutil.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 7dca5851f29..ba059b73a70 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -1300,7 +1300,7 @@ xg_create_frame_widgets (struct frame *f)
1300 if (! g_signal_handler_find (G_OBJECT (gs), 1300 if (! g_signal_handler_find (G_OBJECT (gs),
1301 G_SIGNAL_MATCH_FUNC, 1301 G_SIGNAL_MATCH_FUNC,
1302 0, 0, 0, 1302 0, 0, 0,
1303 G_CALLBACK (style_changed_cb), 1303 (gpointer) G_CALLBACK (style_changed_cb),
1304 0)) 1304 0))
1305 { 1305 {
1306 g_signal_connect (G_OBJECT (gs), "notify::gtk-theme-name", 1306 g_signal_connect (G_OBJECT (gs), "notify::gtk-theme-name",
@@ -1832,14 +1832,10 @@ xg_toggle_notify_cb (GObject *gobject, GParamSpec *arg1, gpointer user_data)
1832 1832
1833 if (!!visible != !!toggle_on) 1833 if (!!visible != !!toggle_on)
1834 { 1834 {
1835 g_signal_handlers_block_by_func (G_OBJECT (wtoggle), 1835 gpointer cb = (gpointer) G_CALLBACK (xg_toggle_visibility_cb);
1836 G_CALLBACK (xg_toggle_visibility_cb), 1836 g_signal_handlers_block_by_func (G_OBJECT (wtoggle), cb, gobject);
1837 gobject);
1838 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (wtoggle), visible); 1837 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (wtoggle), visible);
1839 g_signal_handlers_unblock_by_func 1838 g_signal_handlers_unblock_by_func (G_OBJECT (wtoggle), cb, gobject);
1840 (G_OBJECT (wtoggle),
1841 G_CALLBACK (xg_toggle_visibility_cb),
1842 gobject);
1843 } 1839 }
1844 x_gtk_show_hidden_files = visible; 1840 x_gtk_show_hidden_files = visible;
1845 } 1841 }