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 /usr.bin/m4 | |
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 'usr.bin/m4')
-rw-r--r-- | usr.bin/m4/expr.c | 2 | ||||
-rw-r--r-- | usr.bin/m4/extern.h | 1 | ||||
-rw-r--r-- | usr.bin/m4/gnum4.c | 2 | ||||
-rw-r--r-- | usr.bin/m4/main.c | 2 | ||||
-rw-r--r-- | usr.bin/m4/parser.y | 9 |
5 files changed, 12 insertions, 4 deletions
diff --git a/usr.bin/m4/expr.c b/usr.bin/m4/expr.c index 85bd8f1e912b..8a64217b5768 100644 --- a/usr.bin/m4/expr.c +++ b/usr.bin/m4/expr.c @@ -24,7 +24,7 @@ __FBSDID("$FreeBSD$"); #include "extern.h" int32_t end_result; -const char *copy_toeval; +static const char *copy_toeval; int yyerror(const char *msg); extern void yy_scan_string(const char *); diff --git a/usr.bin/m4/extern.h b/usr.bin/m4/extern.h index 9054d22860b7..ccb2e77045e7 100644 --- a/usr.bin/m4/extern.h +++ b/usr.bin/m4/extern.h @@ -43,6 +43,7 @@ extern unsigned long expansion_id; /* expr.c */ extern int expr(const char *); +extern int32_t end_result; /* gnum4.c */ extern void addtoincludepath(const char *); diff --git a/usr.bin/m4/gnum4.c b/usr.bin/m4/gnum4.c index 861279c06f31..342751a15215 100644 --- a/usr.bin/m4/gnum4.c +++ b/usr.bin/m4/gnum4.c @@ -59,7 +59,7 @@ int mimic_gnu = 0; * Then M4PATH env variable */ -struct path_entry { +static struct path_entry { char *name; struct path_entry *next; } *first, *last; diff --git a/usr.bin/m4/main.c b/usr.bin/m4/main.c index 6b3cad43855d..c8de97c8bbf4 100644 --- a/usr.bin/m4/main.c +++ b/usr.bin/m4/main.c @@ -85,7 +85,7 @@ struct keyblk { int ktyp; /* keyword type */ }; -struct keyblk keywrds[] = { /* m4 keywords to be installed */ +static struct keyblk keywrds[] = { /* m4 keywords to be installed */ { "include", INCLTYPE }, { "sinclude", SINCTYPE }, { "define", DEFITYPE }, diff --git a/usr.bin/m4/parser.y b/usr.bin/m4/parser.y index 14959738bdff..2239cf39c18d 100644 --- a/usr.bin/m4/parser.y +++ b/usr.bin/m4/parser.y @@ -17,10 +17,17 @@ * * $FreeBSD$ */ + #include <math.h> +#include <stddef.h> +#include <stdio.h> #include <stdint.h> + +#include "mdef.h" +#include "extern.h" + #define YYSTYPE int32_t -extern int32_t end_result; + extern int yylex(void); extern int yyerror(const char *); %} |