diff options
author | Ed Schouten <ed@FreeBSD.org> | 2012-10-19 05:43:38 +0000 |
---|---|---|
committer | Ed Schouten <ed@FreeBSD.org> | 2012-10-19 05:43:38 +0000 |
commit | ae824d80f28cd14c0c0ec75076c796e6a369bc18 (patch) | |
tree | 4ffbcf3b1f945e0ae5715cc8c2500ff622b14872 /sbin/mount_fusefs | |
parent | 8241616dc534f6cf0c95abe6b61bc2bb0378fc91 (diff) | |
download | src-ae824d80f28cd14c0c0ec75076c796e6a369bc18.tar.gz src-ae824d80f28cd14c0c0ec75076c796e6a369bc18.zip |
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.
Notes
Notes:
svn path=/head/; revision=241720
Diffstat (limited to 'sbin/mount_fusefs')
-rw-r--r-- | sbin/mount_fusefs/mount_fusefs.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/sbin/mount_fusefs/mount_fusefs.c b/sbin/mount_fusefs/mount_fusefs.c index 2dff27b818e3..797aba7228a4 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 |