Date: Thu, 19 Aug 2021 17:48:41 GMT From: Kyle Evans <kevans@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: bfd70233c3e2 - main - crunchgen: fix remaining issues under WARNS=6 Message-ID: <202108191748.17JHmfLs043828@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=bfd70233c3e2bc5c29db6f96fb90b58439908d29 commit bfd70233c3e2bc5c29db6f96fb90b58439908d29 Author: Kyle Evans <kevans@FreeBSD.org> AuthorDate: 2021-08-19 06:22:16 +0000 Commit: Kyle Evans <kevans@FreeBSD.org> CommitDate: 2021-08-19 17:47:48 +0000 crunchgen: fix remaining issues under WARNS=6 Entirely variables that should be static, save for one 'no previous declaration' in mkskel.sh. Reviewed by: arichardson, imp Differential Revision: https://reviews.freebsd.org/D31610 --- usr.sbin/crunch/crunchgen/crunchgen.c | 43 ++++++++++++++++++----------------- usr.sbin/crunch/crunchgen/mkskel.sh | 1 + 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/usr.sbin/crunch/crunchgen/crunchgen.c b/usr.sbin/crunch/crunchgen/crunchgen.c index c6cf2a08cc7b..94792c5ec50b 100644 --- a/usr.sbin/crunch/crunchgen/crunchgen.c +++ b/usr.sbin/crunch/crunchgen/crunchgen.c @@ -85,27 +85,28 @@ typedef struct prog { /* global state */ -strlst_t *buildopts = NULL; -strlst_t *srcdirs = NULL; -strlst_t *libs = NULL; -strlst_t *libs_so = NULL; -prog_t *progs = NULL; - -char confname[MAXPATHLEN], infilename[MAXPATHLEN]; -char outmkname[MAXPATHLEN], outcfname[MAXPATHLEN], execfname[MAXPATHLEN]; -char tempfname[MAXPATHLEN], cachename[MAXPATHLEN], curfilename[MAXPATHLEN]; -bool tempfname_initialized = false; -char outhdrname[MAXPATHLEN] ; /* user-supplied header for *.mk */ -const char *objprefix; /* where are the objects ? */ -const char *path_make; -int linenum = -1; -int goterror = 0; - -int verbose, readcache; /* options */ -int reading_cache; -int makeobj = 0; /* add 'make obj' rules to the makefile */ - -int list_mode; +static strlst_t *buildopts = NULL; +static strlst_t *srcdirs = NULL; +static strlst_t *libs = NULL; +static strlst_t *libs_so = NULL; +static prog_t *progs = NULL; + +static char confname[MAXPATHLEN], infilename[MAXPATHLEN]; +static char outmkname[MAXPATHLEN], outcfname[MAXPATHLEN], execfname[MAXPATHLEN]; +static char tempfname[MAXPATHLEN], cachename[MAXPATHLEN]; +static char curfilename[MAXPATHLEN]; +static bool tempfname_initialized = false; +static char outhdrname[MAXPATHLEN] ; /* user-supplied header for *.mk */ +static const char *objprefix; /* where are the objects ? */ +static const char *path_make; +static int linenum = -1; +static int goterror = 0; + +static int verbose, readcache; /* options */ +static int reading_cache; +static int makeobj = 0; /* add 'make obj' rules to the makefile */ + +static int list_mode; /* general library routines */ diff --git a/usr.sbin/crunch/crunchgen/mkskel.sh b/usr.sbin/crunch/crunchgen/mkskel.sh index 274bb7274cbd..3e5a1618e4ad 100644 --- a/usr.sbin/crunch/crunchgen/mkskel.sh +++ b/usr.sbin/crunch/crunchgen/mkskel.sh @@ -4,6 +4,7 @@ cat <<!EOF /* File created via mkskel.sh */ +extern const char *crunched_skel[]; const char *crunched_skel[] = { !EOF
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202108191748.17JHmfLs043828>