From: Friedrich Beckmann Date: Mon, 24 Aug 2020 20:46:48 +0000 (+0200) Subject: Warnings: fix missing function prototypes X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d9a8216021edbb6b94dce664a5cda991f8d34ea0;p=pspp Warnings: fix missing function prototypes In most cases I added the static qualifier which was missing. Some functions are never called so I either removed them or I put them in #if DEBUG --- diff --git a/src/ui/gui/dummy.c b/src/ui/gui/dummy.c index e8ee492dc6..f103b7d4e4 100644 --- a/src/ui/gui/dummy.c +++ b/src/ui/gui/dummy.c @@ -39,6 +39,10 @@ const struct ag_func ag_func[1]; int F_8_0; +int var_is_numeric (void); +int tt_options_dialog_run (void); +int agr_func_tab (void); + int var_is_numeric () { diff --git a/src/ui/gui/main.c b/src/ui/gui/main.c index 51d225765c..192676518c 100644 --- a/src/ui/gui/main.c +++ b/src/ui/gui/main.c @@ -51,7 +51,7 @@ static gboolean -show_version_and_exit () +show_version_and_exit (void) { version_etc (stdout, "psppire", PACKAGE_NAME, PACKAGE_VERSION, "Ben Pfaff", "John Darrington", "Jason Stover", NULL_SENTINEL); @@ -63,19 +63,19 @@ show_version_and_exit () -gboolean +static gboolean init_prepare (GSource * source, gint * timeout_) { return TRUE; } -gboolean +static gboolean init_check (GSource * source) { return TRUE; } -gboolean +static gboolean init_dispatch (GSource * ss, GSourceFunc callback, gpointer user_data) { struct init_source *is = (struct init_source *) ss; @@ -249,7 +249,7 @@ on_activate (GApplication * app, gpointer ud) wait_for_splash (app, x); } -GtkWindow * +static GtkWindow * find_empty_data_window (GApplication *app) { GList *wl = gtk_application_get_windows (GTK_APPLICATION (app)); @@ -263,7 +263,7 @@ find_empty_data_window (GApplication *app) return NULL; } -GtkWindow * +static GtkWindow * find_psppire_window (GApplication *app) { GList *wl = gtk_application_get_windows (GTK_APPLICATION (app)); diff --git a/src/ui/gui/psppire-dialog-action.c b/src/ui/gui/psppire-dialog-action.c index b44244132f..f0caabae72 100644 --- a/src/ui/gui/psppire-dialog-action.c +++ b/src/ui/gui/psppire-dialog-action.c @@ -165,7 +165,7 @@ on_destroy_dataset (GObject *w) This is useful for storing the state of dialogs so they can persist between invocations. */ -GHashTable * +static GHashTable * psppire_dialog_action_get_hash_table (PsppireDialogAction *act) { GHashTable *t = g_object_get_data (G_OBJECT (act->toplevel), "thing-table"); diff --git a/src/ui/gui/psppire-dictview.c b/src/ui/gui/psppire-dictview.c index 8f4a677b29..a2ab2ae36c 100644 --- a/src/ui/gui/psppire-dictview.c +++ b/src/ui/gui/psppire-dictview.c @@ -702,13 +702,6 @@ psppire_dict_view_init (PsppireDictView *dict_view) G_CALLBACK (show_menu), NULL); } - -GtkWidget* -psppire_dict_view_new (void) -{ - return GTK_WIDGET (g_object_new (psppire_dict_view_get_type (), NULL)); -} - static struct variable * psppire_dict_view_iter_to_var (PsppireDictView *dict_view, GtkTreeIter *top_iter) diff --git a/src/ui/gui/psppire-scanf.c b/src/ui/gui/psppire-scanf.c index e91b03ee1d..1673eea965 100644 --- a/src/ui/gui/psppire-scanf.c +++ b/src/ui/gui/psppire-scanf.c @@ -336,7 +336,7 @@ psppire_scanf_init (PsppireScanf *w) gtk_orientable_set_orientation (GTK_ORIENTABLE (w), GTK_ORIENTATION_HORIZONTAL); } -gchar +static gchar psppire_get_conversion_char (PsppireScanf *w, gint n) { g_return_val_if_fail (n < w->d.count, '\0'); diff --git a/src/ui/gui/psppire-selector.c b/src/ui/gui/psppire-selector.c index 165d1faadc..a551573fe9 100644 --- a/src/ui/gui/psppire-selector.c +++ b/src/ui/gui/psppire-selector.c @@ -100,6 +100,7 @@ on_row_inserted (PsppireSelector *selector) static GObjectClass * parent_class = NULL; +#if DEBUG static void dump_hash_entry (gpointer key, gpointer value, gpointer obj) { @@ -124,7 +125,7 @@ psppire_selector_show_map (PsppireSelector *obj) g_print ("%s %p\n", __FUNCTION__, obj); g_hash_table_foreach (class->source_hash, dump_hash_entry, obj); } - +#endif static void diff --git a/src/ui/gui/psppire-syntax-window.c b/src/ui/gui/psppire-syntax-window.c index f76b86dbfe..61587c7d00 100644 --- a/src/ui/gui/psppire-syntax-window.c +++ b/src/ui/gui/psppire-syntax-window.c @@ -1054,7 +1054,7 @@ error_dialog (GtkWindow *w, const gchar *filename, GError *err) /* Loads the buffer from the file called FILENAME */ -gboolean +static gboolean syntax_load (PsppireWindow *window, const gchar *filename, const gchar *encoding, gpointer not_used) { diff --git a/src/ui/gui/psppire-val-chooser.c b/src/ui/gui/psppire-val-chooser.c index 2bdc3c551e..7e420d09cc 100644 --- a/src/ui/gui/psppire-val-chooser.c +++ b/src/ui/gui/psppire-val-chooser.c @@ -408,15 +408,6 @@ psppire_val_chooser_init (PsppireValChooser *vr) gtk_widget_show_all (grid); } - -GtkWidget* -psppire_val_chooser_new (void) -{ - return GTK_WIDGET (g_object_new (psppire_val_chooser_get_type (), NULL)); -} - - - static void psppire_val_chooser_realize (GtkWidget *w) { diff --git a/src/ui/gui/var-type-dialog.c b/src/ui/gui/var-type-dialog.c index 84b8baca0f..c6e0ca24d2 100644 --- a/src/ui/gui/var-type-dialog.c +++ b/src/ui/gui/var-type-dialog.c @@ -758,7 +758,7 @@ psppire_var_type_dialog_constructor (GType type, /* Set a particular button to be active */ -void +static void var_type_dialog_set_active_button (PsppireVarTypeDialog *dialog, gint b) { gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->radioButton[b]),