X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fhelper.h;h=8d18fcf4b44e4b318d5bb29eb4686f389d77afa7;hb=373132ca89b003b116d69a987a43f3f9cceae33a;hp=c1d93a8c033dbc5db277a74e9a109251a2bbd654;hpb=f9f8fdb02ec2d1721a3529a42d57415ea55e049b;p=pspp diff --git a/src/ui/gui/helper.h b/src/ui/gui/helper.h index c1d93a8c03..8d18fcf4b4 100644 --- a/src/ui/gui/helper.h +++ b/src/ui/gui/helper.h @@ -65,5 +65,13 @@ psppire_box_pack_start_defaults (GtkBox *box, GtkWidget *widget) gtk_box_pack_start (box, widget, TRUE, TRUE, 0); } +/* Starting with gcc8 the warning Wcast-function-type will + trigger if no intermediate (void (*)(void)) cast is done + for a function cast to GFunc when the number of parameters + is not 2. The reason is that the compiler behaviour in this + situation is undefined according to C standard although many + implementations rely on this. */ +#define GFUNC_COMPAT_CAST(x) ((GFunc) (void (*)(void)) (x)) + #endif