diff options
-rw-r--r-- | usr.bin/make/Makefile | 2 | ||||
-rw-r--r-- | usr.bin/make/suff.c | 20 |
2 files changed, 10 insertions, 12 deletions
diff --git a/usr.bin/make/Makefile b/usr.bin/make/Makefile index 40903eb..bbb03de 100644 --- a/usr.bin/make/Makefile +++ b/usr.bin/make/Makefile @@ -8,7 +8,7 @@ SRCS= arch.c buf.c cond.c dir.c for.c hash.c hash_tables.c job.c \ lst.c main.c make.c parse.c str.c suff.c targ.c util.c var.c NO_WERROR= -WARNS?= 3 +WARNS?= 4 NO_SHARED?= YES CFLAGS+=-DMAKE_VERSION=\"5200408120\" diff --git a/usr.bin/make/suff.c b/usr.bin/make/suff.c index 4ef59b6..75bae20 100644 --- a/usr.bin/make/suff.c +++ b/usr.bin/make/suff.c @@ -1503,15 +1503,15 @@ SuffFindArchiveDeps(GNode *gn, Lst *slst) { char *eoarch; /* End of archive portion */ char *eoname; /* End of member portion */ + char *name; /* Start of member's name */ + char *p1; GNode *mem; /* Node for member */ - /* Variables to be copied from the member node */ - static char *const copy[] = { + Suff *ms; /* Suffix descriptor for member */ + + static const char *copy[] = { TARGET, /* Must be first */ PREFIX, /* Must be second */ }; - int i; /* Index into copy and vals */ - Suff *ms; /* Suffix descriptor for member */ - char *name; /* Start of member's name */ /* * The node is an archive(member) pair. so we must find a @@ -1547,11 +1547,10 @@ SuffFindArchiveDeps(GNode *gn, Lst *slst) /* * Copy in the variables from the member node to this one. */ - for (i = (sizeof(copy) / sizeof(copy[0]))-1; i >= 0; i--) { - char *p1; - Var_Set(copy[i], Var_Value(copy[i], mem, &p1), gn); - free(p1); - } + Var_Set(copy[1], Var_Value(copy[1], mem, &p1), gn); + free(p1); + Var_Set(copy[0], Var_Value(copy[0], mem, &p1), gn); + free(p1); ms = mem->suffix; if (ms == NULL) { @@ -1563,7 +1562,6 @@ SuffFindArchiveDeps(GNode *gn, Lst *slst) ms = suffNull; } - /* * Set the other two local variables required for this target. */ |