diff options
author | ed <ed@FreeBSD.org> | 2012-10-19 05:43:38 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2012-10-19 05:43:38 +0000 |
commit | fbb83e78c0ca90b09e1e9c0a76030f46f419dcaf (patch) | |
tree | 4ffbcf3b1f945e0ae5715cc8c2500ff622b14872 /bin/rcp | |
parent | c6ac8508b2ea2c486313c4fbfef377e83807af8f (diff) | |
download | FreeBSD-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 'bin/rcp')
-rw-r--r-- | bin/rcp/rcp.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/bin/rcp/rcp.c b/bin/rcp/rcp.c index 3357705..186dde6 100644 --- a/bin/rcp/rcp.c +++ b/bin/rcp/rcp.c @@ -76,12 +76,13 @@ __FBSDID("$FreeBSD$"); #define OPTIONS "46dfprt" -struct passwd *pwd; -u_short port; -uid_t userid; -int errs, rem; -int pflag, iamremote, iamrecursive, targetshouldbedirectory; -int family = PF_UNSPEC; +static struct passwd *pwd; +static u_short port; +static uid_t userid; +static int errs, rem; +int iamremote; +static int pflag, iamrecursive, targetshouldbedirectory; +static int family = PF_UNSPEC; static int argc_copy; static const char **argv_copy; @@ -89,7 +90,7 @@ static const char **argv_copy; static char period[] = "."; #define CMDNEEDS 64 -char cmd[CMDNEEDS]; /* must hold "rcp -r -p -d\0" */ +static char cmd[CMDNEEDS]; /* must hold "rcp -r -p -d\0" */ int response(void); void rsource(char *, struct stat *); |