Avoid compilation warnings

* src/implicit.c: (pattern_search):
* src/main.c: (main): Avoid compilation warnings for variables
only used when compiling a debug version with assertions.
This commit is contained in:
Eli Zaretskii 2022-09-24 21:15:41 +03:00
parent 990d6f9b9a
commit caad0e2181
2 changed files with 3 additions and 3 deletions

View file

@ -234,7 +234,9 @@ pattern_search (struct file *file, int archive,
We may replace % by $(*F) for second expansion, increasing the length. */
size_t deplen = namelen + max_pattern_dep_length + 4;
char *depname = alloca (deplen);
#ifndef NDEBUG
char *dend = depname + deplen;
#endif
/* The start and length of the stem of FILENAME for the current rule. */
const char *stem = 0;

View file

@ -2558,13 +2558,11 @@ main (int argc, char **argv, char **envp)
for (; *av; ++av, ++nv)
{
size_t len;
char *f;
char *a = *av;
const char *mf = makefiles->list[mfidx];
len = strlen (a);
assert (len > 0);
assert (strlen (a) > 0);
*nv = a;