Remove C99-obsoleted constructs
See [this development thread for a future Fedora change](https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/CJXKTLXJUPZ4F2C2VQOTNMEA5JAUPMBD/) or [the proposed change page](https://fedoraproject.org/wiki/Changes/PortingToModernC). These may be made stronger errors in GCC 14.
Testing Done:
Configured with `-Dc_args='-Werror=implicit-int -Werror=implicit-function-declaration -Werror=int-conversion -Werror=strict-prototypes -Werror=old-style-definition'` and compiled.
Reviewed at https://reviews.imfreedom.org/r/1973/
--- a/gnt-skel.c Tue Aug 16 00:57:30 2022 -0500
+++ b/gnt-skel.c Wed Oct 26 02:55:48 2022 -0500
@@ -100,7 +100,8 @@
/******************************************************************************
*****************************************************************************/
-GntWidget *gnt_skel_new()
GntWidget *widget = g_object_new(GNT_TYPE_SKEL, NULL);
GntSkel *skel = GNT_SKEL(widget);
--- a/gntcolors.c Tue Aug 16 00:57:30 2022 -0500
+++ b/gntcolors.c Wed Oct 26 02:55:48 2022 -0500
@@ -67,7 +67,8 @@
static gboolean init = FALSE;
@@ -131,7 +132,7 @@
if (can_use_custom_color())
--- a/gntcombobox.c Tue Aug 16 00:57:30 2022 -0500
+++ b/gntcombobox.c Wed Oct 26 02:55:48 2022 -0500
@@ -355,7 +355,8 @@
/******************************************************************************
*****************************************************************************/
-GntWidget *gnt_combo_box_new()
GntWidget *widget = g_object_new(GNT_TYPE_COMBO_BOX, NULL);
--- a/gntkeys.c Tue Aug 16 00:57:30 2022 -0500
+++ b/gntkeys.c Wed Oct 26 02:55:48 2022 -0500
@@ -37,7 +37,8 @@
static GHashTable *specials;
const char *controls[] = {"", "c-", "ctrl-", "ctr-", "ctl-", NULL};
const char *alts[] = {"", "alt-", "a-", "m-", "meta-", NULL};
@@ -301,7 +302,8 @@
/* this is purely for debugging purposes. */
void gnt_keys_print_combinations(void);
-void gnt_keys_print_combinations()
+gnt_keys_print_combinations(void) g_printerr("--------\n");
--- a/gntmain.c Tue Aug 16 00:57:30 2022 -0500
+++ b/gntmain.c Wed Oct 26 02:55:48 2022 -0500
@@ -439,7 +439,7 @@
@@ -616,7 +616,8 @@
wm = g_object_new(GNT_TYPE_WM, NULL);
@@ -708,7 +709,8 @@
clipboard = g_object_new(GNT_TYPE_CLIPBOARD, NULL);
GMainLoop *loop = g_main_loop_new(NULL, FALSE);
gnt_wm_set_mainloop(wm, loop);
@@ -782,7 +784,8 @@
gnt_wm_update_window(wm, widget);
/* Prevent io_invoke() from being called after wm is destroyed */
if (channel_error_callback) {
@@ -807,7 +810,8 @@
g_clear_pointer(&custom_config_dir, g_free);
-gboolean gnt_ascii_only()
@@ -869,12 +873,14 @@
gnt_clipboard_set_string(clipboard, string);
-GntClipboard *gnt_get_clipboard()
-gchar *gnt_get_clipboard_string()
+gnt_get_clipboard_string(void) return gnt_clipboard_get_string(clipboard);
@@ -927,7 +933,8 @@
-gboolean gnt_is_refugee()
gnt_wm_get_keypress_mode(wm) == GNT_KP_MODE_WAIT_ON_CHILD);
--- a/gntstyle.c Tue Aug 16 00:57:30 2022 -0500
+++ b/gntstyle.c Wed Oct 26 02:55:48 2022 -0500
@@ -423,7 +423,8 @@
read_general_style(gkfile);
for (i = 0; i < GNT_STYLES; i++)
@@ -434,7 +435,8 @@
-void gnt_uninit_styles()
for (i = 0; i < GNT_STYLES; i++) {
--- a/gnttextview.c Tue Aug 16 00:57:30 2022 -0500
+++ b/gnttextview.c Wed Oct 26 02:55:48 2022 -0500
@@ -496,7 +496,8 @@
/******************************************************************************
*****************************************************************************/
-GntWidget *gnt_text_view_new()
GntWidget *widget = g_object_new(GNT_TYPE_TEXT_VIEW, NULL);
--- a/gnttree.c Tue Aug 16 00:57:30 2022 -0500
+++ b/gnttree.c Wed Oct 26 02:55:48 2022 -0500
@@ -1272,7 +1272,8 @@
-GntWidget *gnt_tree_new()
return gnt_tree_new_with_columns(1);
--- a/gntwindow.c Tue Aug 16 00:57:30 2022 -0500
+++ b/gntwindow.c Wed Oct 26 02:55:48 2022 -0500
@@ -125,7 +125,8 @@
/******************************************************************************
*****************************************************************************/
-GntWidget *gnt_window_new()
GntWidget *widget = g_object_new(GNT_TYPE_WINDOW, NULL);
--- a/test.c Tue Aug 16 00:57:30 2022 -0500
+++ b/test.c Wed Oct 26 02:55:48 2022 -0500
@@ -42,7 +42,8 @@
--- a/test/file.c Tue Aug 16 00:57:30 2022 -0500
+++ b/test/file.c Wed Oct 26 02:55:48 2022 -0500
@@ -6,7 +6,8 @@
g_printerr("%s %s\n", path, filename);
freopen(".error", "w", stderr);
fprintf(stdout, "\x1b]1;\x07\x1b]2;TEST\x07");
--- a/test/key.c Tue Aug 16 00:57:30 2022 -0500
+++ b/test/key.c Wed Oct 26 02:55:48 2022 -0500
@@ -1,6 +1,7 @@
--- a/test/parse.c Tue Aug 16 00:57:30 2022 -0500
+++ b/test/parse.c Wed Oct 26 02:55:48 2022 -0500
@@ -1,6 +1,7 @@
--- a/test/wm.c Tue Aug 16 00:57:30 2022 -0500
+++ b/test/wm.c Wed Oct 26 02:55:48 2022 -0500
@@ -11,7 +11,7 @@
+ void (*func)(int, char**); cmd = gnt_entry_get_text(entry);
handle = g_module_open(cmd, G_MODULE_BIND_LOCAL);