summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2020-04-07 21:47:01 +0200
committerYorhel <git@yorhel.nl>2020-04-08 10:58:53 +0200
commit84834ff37040a084b3d830ff62f1166460d58719 (patch)
tree3c970dce160aa985945c4b39008ba89841c18a0e
parent53e5080d9ac5a6af7a6c665abb5c60975bacfe64 (diff)
Declare file local variables static
(cherry picked from commit ad5b7fce74a3b7b0ed726620c81ea552c643cdad)
-rw-r--r--src/dir_export.c2
-rw-r--r--src/dir_import.c2
-rw-r--r--src/exclude.c2
-rw-r--r--src/help.c4
-rw-r--r--src/util.c2
5 files changed, 6 insertions, 6 deletions
diff --git a/src/dir_export.c b/src/dir_export.c
index 56e4155..6a7fe8d 100644
--- a/src/dir_export.c
+++ b/src/dir_export.c
@@ -34,7 +34,7 @@
static FILE *stream;
/* Stack of device IDs, also used to keep track of the level of nesting */
-struct stack {
+static struct stack {
uint64_t *list;
int size, top;
} stack;
diff --git a/src/dir_import.c b/src/dir_import.c
index a41b86c..3a5c2a3 100644
--- a/src/dir_import.c
+++ b/src/dir_import.c
@@ -59,7 +59,7 @@ int dir_import_active = 0;
/* Use a struct for easy batch-allocation and deallocation of state data. */
-struct ctx {
+static struct ctx {
FILE *stream;
int line;
diff --git a/src/exclude.c b/src/exclude.c
index cc5c57a..c9fb7f5 100644
--- a/src/exclude.c
+++ b/src/exclude.c
@@ -31,7 +31,7 @@
#include <fnmatch.h>
-struct exclude {
+static struct exclude {
char *pattern;
struct exclude *next;
} *excludes = NULL;
diff --git a/src/help.c b/src/help.c
index c1b2f63..f6e91c5 100644
--- a/src/help.c
+++ b/src/help.c
@@ -29,11 +29,11 @@
#include <string.h>
-int page, start;
+static int page, start;
#define KEYS 19
-const char *keys[KEYS*2] = {
+static const char *keys[KEYS*2] = {
/*|----key----| |----------------description----------------|*/
"up, k", "Move cursor up",
"down, j", "Move cursor down",
diff --git a/src/util.c b/src/util.c
index 6cf4080..8448956 100644
--- a/src/util.c
+++ b/src/util.c
@@ -38,7 +38,7 @@ int uic_theme;
int winrows, wincols;
int subwinr, subwinc;
int si;
-char thou_sep;
+static char thou_sep;
char *cropstr(const char *from, int s) {