Add static qualifiers where appropriate.
authorJohn Darrington <john@darrington.wattle.id.au>
Sat, 12 Sep 2020 05:31:58 +0000 (07:31 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Sat, 12 Sep 2020 05:31:41 +0000 (07:31 +0200)
A number of items were defined in global scope.  This change
puts them into file scope.

src/libpspp/temp-file.c
src/ui/gui/main.c
src/ui/gui/psppire-output-view.c
src/ui/gui/psppire-output-window.c

index 03e6f18e61229e4717e2881e51d4728f2cc5cf5c..cc90a37559b2cb532e8cc60f5589da531b8bd211 100644 (file)
@@ -43,7 +43,7 @@
 static void cleanup (void);
 
 static struct temp_dir *temp_dir;
 static void cleanup (void);
 
 static struct temp_dir *temp_dir;
-struct hmapx map;
+static struct hmapx map;
 
 static void
 setup (void)
 
 static void
 setup (void)
index 894a2147fc28b11d4434414e7aa562a89423368b..a7e09af8064513d130dfd57fd892dd68f4fd1ad1 100644 (file)
@@ -95,8 +95,8 @@ init_dispatch (GSource * ss, GSourceFunc callback, gpointer user_data)
 static GSourceFuncs init_funcs =
   { init_prepare, init_check, init_dispatch, NULL, NULL, NULL };
 
 static GSourceFuncs init_funcs =
   { init_prepare, init_check, init_dispatch, NULL, NULL, NULL };
 
-GtkWidget *wsplash = 0;
-gint64 start_time = 0;
+static GtkWidget *wsplash = 0;
+static gint64 start_time = 0;
 
 
 static GtkWidget *
 
 
 static GtkWidget *
index 7e8b5b3560c11baa069938cb39532d583a340eb2..4296409120214f545149f0920cb60ea6f2865841 100644 (file)
@@ -801,7 +801,7 @@ CT ( ctn8, "image/svg+xml", 0, SELECT_FMT_SVG )
 #define CT(ID, TARGET, FLAGS, INFO) static gchar ID[] = TARGET;
 CBTARGETS
 #undef CT
 #define CT(ID, TARGET, FLAGS, INFO) static gchar ID[] = TARGET;
 CBTARGETS
 #undef CT
-gchar ctnlast[] = "application/vnd.oasis.opendocument.text";
+static gchar ctnlast[] = "application/vnd.oasis.opendocument.text";
 
 static const GtkTargetEntry targets[] = {
 #define CT(ID, TARGET, FLAGS, INFO) { ID, FLAGS, INFO },
 
 static const GtkTargetEntry targets[] = {
 #define CT(ID, TARGET, FLAGS, INFO) { ID, FLAGS, INFO },
index 458769d583c040fd745f9ef346e0fda36c753f23..5d13ecd1ed21adff8bcf3abb3e57fd4bb98a23e0 100644 (file)
@@ -237,7 +237,7 @@ enum
 
 #define N_EXTENSIONS (n_FT - 1)
 
 
 #define N_EXTENSIONS (n_FT - 1)
 
-struct file_types ft[n_FT] = {
+static const struct file_types ft[n_FT] = {
   {N_("Infer file type from extension"),  NULL},
   {N_("SPSS Viewer (*.spv)"),             ".spv"},
   {N_("PDF (*.pdf)"),                     ".pdf"},
   {N_("Infer file type from extension"),  NULL},
   {N_("SPSS Viewer (*.spv)"),             ".spv"},
   {N_("PDF (*.pdf)"),                     ".pdf"},