Date: Fri, 27 Aug 2021 01:12:37 GMT From: Kyle Evans <kevans@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 62885c0f0e57 - stable/12 - crunchgen: fix remaining issues under WARNS=6 Message-ID: <202108270112.17R1CbYv037972@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=62885c0f0e57aa39c9a374a9bbd2147519a5003e commit 62885c0f0e57aa39c9a374a9bbd2147519a5003e Author: Kyle Evans <kevans@FreeBSD.org> AuthorDate: 2021-08-19 06:22:16 +0000 Commit: Kyle Evans <kevans@FreeBSD.org> CommitDate: 2021-08-27 01:10:58 +0000 crunchgen: fix remaining issues under WARNS=6 Entirely variables that should be static, save for one 'no previous declaration' in mkskel.sh. (cherry picked from commit bfd70233c3e2bc5c29db6f96fb90b58439908d29) --- 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?202108270112.17R1CbYv037972>