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
g_value_unset (&value);
}
- g_list_foreach (l, (GFunc) (void (*)(void)) gtk_tree_path_free, NULL);
+ g_list_foreach (l, GFUNC_COMPAT_CAST (gtk_tree_path_free), NULL);
g_list_free (l);
if (acr->update) acr->update (acr->update_data);
gtk_list_store_remove (acr->list_store, &iter);
- g_list_foreach (l, (GFunc) (void (*)(void)) gtk_tree_path_free, NULL);
+ g_list_foreach (l, GFUNC_COMPAT_CAST (gtk_tree_path_free), NULL);
g_list_free (l);
}
result = (l != NULL);
- g_list_foreach (l, (GFunc) (void (*)(void)) gtk_tree_path_free, NULL);
+ g_list_foreach (l, GFUNC_COMPAT_CAST (gtk_tree_path_free), NULL);
g_list_free (l);
return result;
#include <stdlib.h>
#include "psppire-dialog.h"
#include "builder-wrapper.h"
+#include "helper.h"
#include "gettext.h"
#define _(msgid) gettext (msgid)
gtk_tree_model_row_changed (model, rows->data, &iter);
finish:
- g_list_foreach (rows, (GFunc) (void (*)(void)) gtk_tree_path_free, NULL);
+ g_list_foreach (rows, GFUNC_COMPAT_CAST (gtk_tree_path_free), NULL);
g_list_free (rows);
var_unref (var);
}
gtk_widget_set_sensitive (rd->change_button, FALSE);
}
- g_list_foreach (rows, (GFunc) (void (*)(void)) gtk_tree_path_free, NULL);
+ g_list_foreach (rows, GFUNC_COMPAT_CAST (gtk_tree_path_free), NULL);
g_list_free (rows);
}
gtk_tree_model_row_changed (model, rows->data, &iter);
finish:
- g_list_foreach (rows, (GFunc) (void (*)(void)) gtk_tree_path_free, NULL);
+ g_list_foreach (rows, GFUNC_COMPAT_CAST (gtk_tree_path_free), NULL);
g_list_free (rows);
}
}
- g_list_foreach (rows, (GFunc) (void (*)(void)) gtk_tree_path_free, NULL);
+ g_list_foreach (rows, GFUNC_COMPAT_CAST (gtk_tree_path_free), NULL);
g_list_free (rows);
}
#include "psppire-dict.h"
#include "psppire-select-dest.h"
#include "psppire-means-layer.h"
+#include "helper.h"
#include <gtk/gtk.h>
}
/* Delete list of RowRefs and its contents */
- g_list_foreach (selected_rows, (GFunc) (void (*)(void)) gtk_tree_row_reference_free, NULL);
+ g_list_foreach (selected_rows, GFUNC_COMPAT_CAST (gtk_tree_row_reference_free), NULL);
g_list_free (selected_rows);
}
);
}
- g_list_foreach (selected_rows, (GFunc) (void (*)(void)) gtk_tree_path_free, NULL);
+ g_list_foreach (selected_rows, GFUNC_COMPAT_CAST (gtk_tree_path_free), NULL);
g_list_free (selected_rows);
refilter (selector);