Browse Source

mountd: Add static qualifier to missing variable declarations.

-Wmissing-variable-declarations is missing in gcc but available in clang.

Signed-off by: Rosen Penev <rosenp@gmail.com>
Rosen Penev 7 years ago
parent
commit
dd5799c9f8
6 changed files with 15 additions and 15 deletions
  1. 4 4
      autofs.c
  2. 1 1
      fs.c
  3. 2 2
      led.c
  4. 6 6
      mount.c
  5. 1 1
      signal.c
  6. 1 1
      timer.c

+ 4 - 4
autofs.c

@@ -30,11 +30,11 @@
 #include "include/ucix.h"
 #include "include/autofs.h"
 
-int fdin = 0; /* data coming out of the kernel */
-int fdout = 0;/* data going into the kernel */
-dev_t dev;
+static int fdin = 0; /* data coming out of the kernel */
+static int fdout = 0;/* data going into the kernel */
+static dev_t dev;
 
-time_t uci_timeout;
+static time_t uci_timeout;
 char uci_path[32];
 
 static void umount_autofs(void)

+ 1 - 1
fs.c

@@ -191,7 +191,7 @@ out:
 	return ret;
 }
 
-dfunc funcs[] = {
+static dfunc funcs[] = {
 	detect_ext23,
 	detect_exfat,
 	detect_fat,

+ 2 - 2
led.c

@@ -14,7 +14,7 @@
  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
  *
  *   Provided by fon.com
- *   Copyright (C) 2009 John Crispin <blogic@openwrt.org> 
+ *   Copyright (C) 2009 John Crispin <blogic@openwrt.org>
  */
 
 
@@ -27,7 +27,7 @@
 #include "include/timer.h"
 #include "include/led.h"
 
-char usbled[16];
+static char usbled[16];
 
 void led_ping(void)
 {

+ 6 - 6
mount.c

@@ -31,7 +31,7 @@
 
 int mount_new(char *path, char *dev);
 
-struct list_head mounts;
+static struct list_head mounts;
 
 struct mount {
 	struct list_head list;
@@ -48,7 +48,7 @@ struct mount {
 	int fs;
 };
 
-char *fs_names[] = {
+static char *fs_names[] = {
 	"",
 	"",
 	"mbr",
@@ -67,8 +67,8 @@ char *fs_names[] = {
 #define MAX_MOUNTED		32
 #define MAX_MOUNT_NAME	32
 
-char mounted[MAX_MOUNTED][3][MAX_MOUNT_NAME];
-int mounted_count = 0;
+static char mounted[MAX_MOUNTED][3][MAX_MOUNT_NAME];
+static int mounted_count = 0;
 extern char uci_path[32];
 
 static void mount_dump_uci_state(void)
@@ -663,8 +663,8 @@ static int dir_filter2(const struct dirent *a)
 	return 0;
 }
 #define MAX_BLOCK	64
-char block[MAX_BLOCK][MAX_BLOCK];
-int blk_cnt = 0;
+static char block[MAX_BLOCK][MAX_BLOCK];
+static int blk_cnt = 0;
 
 static int check_block(char *b)
 {

+ 1 - 1
signal.c

@@ -7,7 +7,7 @@
 #include "include/led.h"
 #include "include/signal.h"
 
-void (*crtlc_cb)(void) = 0;
+static void (*crtlc_cb)(void) = 0;
 
 static void handlerINT(int s)
 {

+ 1 - 1
timer.c

@@ -9,7 +9,7 @@
 
 /* when using this file, alarm() is used */
 
-struct list_head timers;
+static struct list_head timers;
 
 struct timer {
 	struct list_head list;