Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make make(1): fix prototype of Suff_EndTransform
details: https://anonhg.NetBSD.org/src/rev/b6aa89ae529d
branches: trunk
changeset: 954854:b6aa89ae529d
user: rillig <rillig%NetBSD.org@localhost>
date: Sat Sep 12 15:21:25 2020 +0000
description:
make(1): fix prototype of Suff_EndTransform
diffstat:
usr.bin/make/nonints.h | 4 ++--
usr.bin/make/parse.c | 15 +++++++++++----
usr.bin/make/suff.c | 19 ++++++-------------
3 files changed, 19 insertions(+), 19 deletions(-)
diffs (122 lines):
diff -r 672d719110c8 -r b6aa89ae529d usr.bin/make/nonints.h
--- a/usr.bin/make/nonints.h Sat Sep 12 15:15:51 2020 +0000
+++ b/usr.bin/make/nonints.h Sat Sep 12 15:21:25 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nonints.h,v 1.110 2020/09/12 15:15:51 rillig Exp $ */
+/* $NetBSD: nonints.h,v 1.111 2020/09/12 15:21:25 rillig Exp $ */
/*-
* Copyright (c) 1988, 1989, 1990, 1993
@@ -156,7 +156,7 @@
void Suff_ClearSuffixes(void);
Boolean Suff_IsTransform(char *);
GNode *Suff_AddTransform(char *);
-int Suff_EndTransform(void *, void *);
+void Suff_EndTransform(GNode *);
void Suff_AddSuffix(const char *, GNode **);
Lst Suff_GetPath(char *);
void Suff_DoPaths(void);
diff -r 672d719110c8 -r b6aa89ae529d usr.bin/make/parse.c
--- a/usr.bin/make/parse.c Sat Sep 12 15:15:51 2020 +0000
+++ b/usr.bin/make/parse.c Sat Sep 12 15:21:25 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.292 2020/09/12 14:41:00 rillig Exp $ */
+/* $NetBSD: parse.c,v 1.293 2020/09/12 15:21:25 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: parse.c,v 1.292 2020/09/12 14:41:00 rillig Exp $";
+static char rcsid[] = "$NetBSD: parse.c,v 1.293 2020/09/12 15:21:25 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: parse.c,v 1.292 2020/09/12 14:41:00 rillig Exp $");
+__RCSID("$NetBSD: parse.c,v 1.293 2020/09/12 15:21:25 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -2842,6 +2842,13 @@
}
}
+static int
+SuffEndTransform(void *target, void *unused MAKE_ATTR_UNUSED)
+{
+ Suff_EndTransform(target);
+ return 0;
+}
+
/*-
*-----------------------------------------------------------------------
* ParseFinishLine --
@@ -2860,7 +2867,7 @@
{
if (inLine) {
if (targets != NULL) {
- Lst_ForEach(targets, Suff_EndTransform, NULL);
+ Lst_ForEach(targets, SuffEndTransform, NULL);
Lst_Destroy(targets, ParseHasCommands);
}
targets = NULL;
diff -r 672d719110c8 -r b6aa89ae529d usr.bin/make/suff.c
--- a/usr.bin/make/suff.c Sat Sep 12 15:15:51 2020 +0000
+++ b/usr.bin/make/suff.c Sat Sep 12 15:21:25 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: suff.c,v 1.149 2020/09/12 15:15:51 rillig Exp $ */
+/* $NetBSD: suff.c,v 1.150 2020/09/12 15:21:25 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: suff.c,v 1.149 2020/09/12 15:15:51 rillig Exp $";
+static char rcsid[] = "$NetBSD: suff.c,v 1.150 2020/09/12 15:21:25 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)suff.c 8.4 (Berkeley) 3/21/94";
#else
-__RCSID("$NetBSD: suff.c,v 1.149 2020/09/12 15:15:51 rillig Exp $");
+__RCSID("$NetBSD: suff.c,v 1.150 2020/09/12 15:21:25 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -616,16 +616,11 @@
* of the affected suffixes are altered.
*
* Input:
- * gnp Node for transformation
- *
- * Results:
- * 0, so that Lst_ForEach continues
+ * gn Node for transformation
*/
-int
-Suff_EndTransform(void *gnp, void *dummy MAKE_ATTR_UNUSED)
+void
+Suff_EndTransform(GNode *gn)
{
- GNode *gn = (GNode *)gnp;
-
if ((gn->type & OP_DOUBLEDEP) && !Lst_IsEmpty(gn->cohorts))
gn = LstNode_Datum(Lst_Last(gn->cohorts));
if ((gn->type & OP_TRANSFORM) && Lst_IsEmpty(gn->commands) &&
@@ -666,8 +661,6 @@
} else if (gn->type & OP_TRANSFORM) {
SUFF_DEBUG1("transformation %s complete\n", gn->name);
}
-
- return 0;
}
/* Called from Suff_AddSuffix via Lst_ForEach to search through the list of
Home |
Main Index |
Thread Index |
Old Index