diff options
author | Ed Schouten <ed@FreeBSD.org> | 2012-10-20 10:33:15 +0000 |
---|---|---|
committer | Ed Schouten <ed@FreeBSD.org> | 2012-10-20 10:33:15 +0000 |
commit | eccad222770297bdd2787e31cd37b906edba62c6 (patch) | |
tree | 27b346e0c9d07492d198e14e7d63aab1892e4ff2 /libexec/talkd | |
parent | 186475e2ddef1d1675250461ba544cfef31e587b (diff) | |
download | src-eccad222770297bdd2787e31cd37b906edba62c6.tar.gz src-eccad222770297bdd2787e31cd37b906edba62c6.zip |
More -Wmissing-variable-declarations fixes.
In addition to adding missing `static' keywords:
- bin/dd: Pull in `extern.h' to guarantee consistency with source file.
- libexec/rpc.rusersd: Move shared globals into an extern.h.
- libexec/talkd: Move `debug' and `hostname' into extern.h.
- usr.bin/cksum: Put counters in extern.h, as they are used by ckdist/mtree.
- usr.bin/m4: Move `end_result' into extern.h.
- usr.sbin/services_mkdb: Move shared globals into an extern.h.
Notes
Notes:
svn path=/head/; revision=241777
Diffstat (limited to 'libexec/talkd')
-rw-r--r-- | libexec/talkd/announce.c | 2 | ||||
-rw-r--r-- | libexec/talkd/extern.h | 3 | ||||
-rw-r--r-- | libexec/talkd/process.c | 2 | ||||
-rw-r--r-- | libexec/talkd/table.c | 5 | ||||
-rw-r--r-- | libexec/talkd/talkd.c | 10 |
5 files changed, 10 insertions, 12 deletions
diff --git a/libexec/talkd/announce.c b/libexec/talkd/announce.c index 869197e5c52c..83c96b724c01 100644 --- a/libexec/talkd/announce.c +++ b/libexec/talkd/announce.c @@ -60,8 +60,6 @@ static const char rcsid[] = #include "ttymsg.h" #include "extern.h" -extern char hostname[]; - /* * Announce an invitation to talk. */ diff --git a/libexec/talkd/extern.h b/libexec/talkd/extern.h index cb231a95d134..a91cb25a71e1 100644 --- a/libexec/talkd/extern.h +++ b/libexec/talkd/extern.h @@ -25,6 +25,9 @@ * $FreeBSD$ */ +extern int debug; +extern char hostname[]; + int announce(CTL_MSG *, const char *); int delete_invite(u_int32_t); void do_announce(CTL_MSG *, CTL_RESPONSE *); diff --git a/libexec/talkd/process.c b/libexec/talkd/process.c index 18ddc42aff1f..1c5108fc7d59 100644 --- a/libexec/talkd/process.c +++ b/libexec/talkd/process.c @@ -63,8 +63,6 @@ static const char rcsid[] = #include "extern.h" -extern int debug; - void process_request(CTL_MSG *mp, CTL_RESPONSE *rp) { diff --git a/libexec/talkd/table.c b/libexec/talkd/table.c index dcaed9c2a3e3..5ad7b61bdf7a 100644 --- a/libexec/talkd/table.c +++ b/libexec/talkd/table.c @@ -64,8 +64,7 @@ static const char rcsid[] = #define NIL ((TABLE_ENTRY *)0) -extern int debug; -struct timeval tp; +static struct timeval tp; typedef struct table_entry TABLE_ENTRY; @@ -78,7 +77,7 @@ struct table_entry { static void delete(TABLE_ENTRY *); -TABLE_ENTRY *table = NIL; +static TABLE_ENTRY *table = NIL; /* * Look in the table for an invitation that matches the current diff --git a/libexec/talkd/talkd.c b/libexec/talkd/talkd.c index e81cec6eb74d..56ce4414c106 100644 --- a/libexec/talkd/talkd.c +++ b/libexec/talkd/talkd.c @@ -69,13 +69,13 @@ static const char rcsid[] = #include "extern.h" -CTL_MSG request; -CTL_RESPONSE response; +static CTL_MSG request; +static CTL_RESPONSE response; -int debug = 0; -long lastmsgtime; +int debug = 0; +static long lastmsgtime; -char hostname[MAXHOSTNAMELEN]; +char hostname[MAXHOSTNAMELEN]; #define TIMEOUT 30 #define MAXIDLE 120 |