Module Name: src
Committed By: rillig
Date: Sat Aug 22 09:51:57 UTC 2020
Modified Files:
src/usr.bin/make: job.c
Log Message:
make(1): fix constness of shellArgv
This is needed to build with -DCLEANUP, which apparently nobody did for
the last 17 years, or at least since -Werror was introduced.
To generate a diff of this commit:
cvs rdiff -u -r1.208 -r1.209 src/usr.bin/make/job.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/make/job.c
diff -u src/usr.bin/make/job.c:1.208 src/usr.bin/make/job.c:1.209
--- src/usr.bin/make/job.c:1.208 Sat Aug 22 08:01:34 2020
+++ src/usr.bin/make/job.c Sat Aug 22 09:51:57 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: job.c,v 1.208 2020/08/22 08:01:34 rillig Exp $ */
+/* $NetBSD: job.c,v 1.209 2020/08/22 09:51:57 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: job.c,v 1.208 2020/08/22 08:01:34 rillig Exp $";
+static char rcsid[] = "$NetBSD: job.c,v 1.209 2020/08/22 09:51:57 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)job.c 8.2 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: job.c,v 1.208 2020/08/22 08:01:34 rillig Exp $");
+__RCSID("$NetBSD: job.c,v 1.209 2020/08/22 09:51:57 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -300,7 +300,7 @@ const char *shellPath = NULL, /* f
* executable image */
*shellName = NULL; /* last component of shell */
char *shellErrFlag = NULL;
-static const char *shellArgv = NULL; /* Custom shell args */
+static char *shellArgv = NULL; /* Custom shell args */
STATIC Job *job_table; /* The structures that describe them */
@@ -2458,7 +2458,7 @@ Job_ParseShell(char *line)
line++;
}
- free(UNCONST(shellArgv));
+ free(shellArgv);
memset(&newShell, 0, sizeof(newShell));