Warnings: fix missing function prototypes
authorFriedrich Beckmann <friedrich.beckmann@gmx.de>
Mon, 24 Aug 2020 20:46:48 +0000 (22:46 +0200)
committerFriedrich Beckmann <friedrich.beckmann@gmx.de>
Mon, 24 Aug 2020 20:46:48 +0000 (22:46 +0200)
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

src/ui/gui/dummy.c
src/ui/gui/main.c
src/ui/gui/psppire-dialog-action.c
src/ui/gui/psppire-dictview.c
src/ui/gui/psppire-scanf.c
src/ui/gui/psppire-selector.c
src/ui/gui/psppire-syntax-window.c
src/ui/gui/psppire-val-chooser.c
src/ui/gui/var-type-dialog.c

index e8ee492dc684110499a625782ffec134ccd0ce82..f103b7d4e44491fada59887f75f43eea7d0f042d 100644 (file)
@@ -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 ()
 {
index 51d225765c12796d21cdaf1aff7f8f02dc5a8eea..192676518cc41fb198ea882253a69c05872fb69b 100644 (file)
@@ -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 ()
 
 \f
 
-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));
index b44244132fa2b93fbe02bb3cebc3753729dbf459..f0caabae726872c980ce7e6a8ac6c0652f252713 100644 (file)
@@ -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");
index 8f4a677b29d03b640855f51768bbcfe52e54fc83..a2ab2ae36c45f0be9489be18ce2c7dfc9327ab88 100644 (file)
@@ -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)
index e91b03ee1d93dcdfbd56d51d7fd853319848a82a..1673eea965382d445b4dc0968bfe852a3bfca6a4 100644 (file)
@@ -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');
index 165d1faadcbd231d0c31ffae9ed5704291d5a08d..a551573fe9b215d2cf1b30c1361d661361f7ef75 100644 (file)
@@ -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
index f76b86dbfe264a45ad99d8a025964769ba15479e..61587c7d0067b44f1854be51f103516190ab633b 100644 (file)
@@ -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)
 {
index 2bdc3c551e984d281c9d44eb49e7860c8b234545..7e420d09cc5b29e254352cd7d85308a99d2d0f55 100644 (file)
@@ -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)
 {
index 84b8baca0f1401b7d81661e4d7579953bde40826..c6e0ca24d2ec9965b6bdd25d797bddbe2cecc166 100644 (file)
@@ -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]),