summaryrefslogtreecommitdiffstats
path: root/sbin/mount_fusefs
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2012-10-19 05:43:38 +0000
committered <ed@FreeBSD.org>2012-10-19 05:43:38 +0000
commitfbb83e78c0ca90b09e1e9c0a76030f46f419dcaf (patch)
tree4ffbcf3b1f945e0ae5715cc8c2500ff622b14872 /sbin/mount_fusefs
parentc6ac8508b2ea2c486313c4fbfef377e83807af8f (diff)
downloadFreeBSD-src-fbb83e78c0ca90b09e1e9c0a76030f46f419dcaf.zip
FreeBSD-src-fbb83e78c0ca90b09e1e9c0a76030f46f419dcaf.tar.gz
Fix warnings found by -Wmising-variable-declarations.
This self-written compiler warning, which is hopefully going to be committed into LLVM sources soon, warns about potentially missing `static' keywords, similar to -Wmissing-prototypes. - bin/pax: Move external declaration of chdname and s_mask into extern.h. - bin/setfacl: Move setfacl.c-specific stuff out of setfacl.h. - sbin/mount_fusefs: Remove char *progname; use getprogname(). - others: add `static' where possible.
Diffstat (limited to 'sbin/mount_fusefs')
-rw-r--r--sbin/mount_fusefs/mount_fusefs.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/sbin/mount_fusefs/mount_fusefs.c b/sbin/mount_fusefs/mount_fusefs.c
index 2dff27b..797aba7 100644
--- a/sbin/mount_fusefs/mount_fusefs.c
+++ b/sbin/mount_fusefs/mount_fusefs.c
@@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$");
#include <fcntl.h>
#include <signal.h>
#include <getopt.h>
-#include <libgen.h>
#include <limits.h>
#include <osreldate.h>
#include <paths.h>
@@ -61,7 +60,7 @@ void helpmsg(void);
void showversion(void);
int init_backgrounded(void);
-struct mntopt mopts[] = {
+static struct mntopt mopts[] = {
#define ALTF_PRIVATE 0x01
{ "private", 0, ALTF_PRIVATE, 1 },
{ "neglect_shares", 0, 0x02, 1 },
@@ -93,14 +92,12 @@ struct mntval {
int mv_len;
};
-struct mntval mvals[] = {
+static struct mntval mvals[] = {
{ ALTF_MAXREAD, NULL, 0 },
{ ALTF_SUBTYPE, NULL, 0 },
{ 0, NULL, 0 }
};
-char *progname;
-
#define DEFAULT_MOUNT_FLAGS ALTF_PRIVATE | ALTF_SYNC_UNMOUNT
int
@@ -133,8 +130,6 @@ main(int argc, char *argv[])
char *ep;
char *daemon_str = NULL, *daemon_opts = NULL;
- progname = argv[0];
-
/*
* We want a parsing routine which is not sensitive to
* the position of args/opts; it should extract the
@@ -432,7 +427,7 @@ void
__usage_short(void) {
fprintf(stderr,
"usage:\n%s [-A|-S|-v|-V|-h|-D daemon|-O args|-s special|-m node|-o option...] special node [daemon args...]\n\n",
- basename(progname));
+ getprogname());
}
void
OpenPOWER on IntegriCloud