silence some util/makdefs.c src/mdlib warnings

In file included from makedefs.c:213:0:
../src/mdlib.c: In function ‘runtime_info_init’:
../src/mdlib.c:808:12: warning: variable ‘timeresult’ set but not used [-Wunused-but-set-variable]
     time_t timeresult;
            ^~~~~~~~~~
makedefs.c: In function ‘do_date’:
makedefs.c:1140:16: warning: unused variable ‘ind’ [-Wunused-variable]
     const char ind[] = "    ";
                ^~~
makedefs.c:1139:9: warning: unused variable ‘steps’ [-Wunused-variable]
     int steps = 0;
         ^~~~~
makedefs.c: In function ‘do_monstr’:
makedefs.c:1934:12: warning: variable ‘j’ set but not used [-Wunused-but-set-variable]
     int i, j;
            ^
This commit is contained in:
nhmall
2020-10-10 08:55:43 -04:00
parent 3d6551a70e
commit 55d1d547a6
2 changed files with 19 additions and 25 deletions

View File

@@ -1136,8 +1136,6 @@ do_date()
char *c, cbuf[60], buf[BUFSZ];
const char *ul_sfx;
#if defined(CROSSCOMPILE) && !defined(CROSSCOMPILE_TARGET)
int steps = 0;
const char ind[] = " ";
const char *xpref = "HOST_";
#else
const char *xpref = (const char *) 0;
@@ -1931,7 +1929,7 @@ void
do_monstr()
{
struct permonst *ptr;
int i, j;
int i;
/* Don't break anything for ports that haven't been updated. */
printf("DEPRECATION WARNINGS:\n");
@@ -1973,7 +1971,7 @@ do_monstr()
/* output derived monstr values as a comment */
Fprintf(ofp, "\n\n/*\n * default mons[].difficulty values\n *\n");
for (ptr = &mons[0], j = 0; ptr->mlet; ptr++) {
for (ptr = &mons[0]; ptr->mlet; ptr++) {
i = mstrength(ptr);
Fprintf(ofp, "%-24s %2u\n", ptr->mname, (unsigned int) (uchar) i);
}