From 9a139b26b256c9be5133b1ad74be34f706767283 Mon Sep 17 00:00:00 2001 From: Peter Avalos Date: Sat, 9 Sep 2006 02:21:49 +0000 Subject: [PATCH] Cast sentinel for execl*() to (char *) to quiet gcc4 warnings. --- games/atc/input.c | 6 +++--- games/cribbage/instr.c | 4 ++-- games/phantasia/misc.c | 4 ++-- games/rogue/machdep.c | 4 ++-- games/wump/wump.c | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/games/atc/input.c b/games/atc/input.c index eef1280caa..e8a6f96119 100644 --- a/games/atc/input.c +++ b/games/atc/input.c @@ -35,7 +35,7 @@ * * @(#)input.c 8.1 (Berkeley) 5/31/93 * $FreeBSD: src/games/atc/input.c,v 1.7 2000/02/27 23:02:47 mph Exp $ - * $DragonFly: src/games/atc/input.c,v 1.3 2006/08/08 15:03:02 pavalos Exp $ + * $DragonFly: src/games/atc/input.c,v 1.4 2006/09/09 02:21:49 pavalos Exp $ */ /* @@ -364,10 +364,10 @@ gettoken(void) base = shell; else base++; - execl(shell, base, 0); + execl(shell, base, (char *) NULL); } else - execl(_PATH_BSHELL, "sh", 0); + execl(_PATH_BSHELL, "sh", (char *) NULL); exit(0); /* oops */ } diff --git a/games/cribbage/instr.c b/games/cribbage/instr.c index 7c6682adf9..bb40f3f3e6 100644 --- a/games/cribbage/instr.c +++ b/games/cribbage/instr.c @@ -32,7 +32,7 @@ * * @(#)instr.c 8.1 (Berkeley) 5/31/93 * $FreeBSD: src/games/cribbage/instr.c,v 1.5 1999/12/12 03:04:15 billf Exp $ - * $DragonFly: src/games/cribbage/instr.c,v 1.3 2005/08/03 13:31:00 eirikn Exp $ + * $DragonFly: src/games/cribbage/instr.c,v 1.4 2006/09/09 02:21:49 pavalos Exp $ */ #include @@ -70,7 +70,7 @@ instructions(void) if ((pager = rindex(path, '/')) != NULL) ++pager; pager = path; - execlp(path, pager, _PATH_INSTR, NULL); + execlp(path, pager, _PATH_INSTR, (char *) NULL); fprintf(stderr, "cribbage: %s.\n", strerror(errno)); _exit(1); default: diff --git a/games/phantasia/misc.c b/games/phantasia/misc.c index c925fdb826..ccfe9267c6 100644 --- a/games/phantasia/misc.c +++ b/games/phantasia/misc.c @@ -2,7 +2,7 @@ * misc.c Phantasia miscellaneous support routines * * $FreeBSD: src/games/phantasia/misc.c,v 1.7 1999/11/16 02:57:34 billf Exp $ - * $DragonFly: src/games/phantasia/misc.c,v 1.6 2006/08/03 16:40:46 swildner Exp $ + * $DragonFly: src/games/phantasia/misc.c,v 1.7 2006/09/09 02:21:49 pavalos Exp $ */ #include @@ -997,7 +997,7 @@ static const char *deathmesg[] = { cleanup(FALSE); execl(_PATH_GAMEPROG, "phantasia", "-s", - (Wizard ? "-S": (char *) NULL), 0); + (Wizard ? "-S": (char *) NULL), (char *) NULL); exit(0); /*NOTREACHED*/ } diff --git a/games/rogue/machdep.c b/games/rogue/machdep.c index a91f1f0287..cc9d0da59c 100644 --- a/games/rogue/machdep.c +++ b/games/rogue/machdep.c @@ -35,7 +35,7 @@ * * @(#)machdep.c 8.1 (Berkeley) 5/31/93 * $FreeBSD: src/games/rogue/machdep.c,v 1.6.2.1 2001/12/17 12:43:23 phantom Exp $ - * $DragonFly: src/games/rogue/machdep.c,v 1.3 2006/09/02 19:31:07 pavalos Exp $ + * $DragonFly: src/games/rogue/machdep.c,v 1.4 2006/09/09 02:21:49 pavalos Exp $ */ /* @@ -541,7 +541,7 @@ md_shell(const char *shell) if (!fork()) { /* revoke */ setgid(getgid()); - execl(shell, shell, 0); + execl(shell, shell, (char *) NULL); } wait((int *)w); } diff --git a/games/wump/wump.c b/games/wump/wump.c index 1e32675650..57317289e8 100644 --- a/games/wump/wump.c +++ b/games/wump/wump.c @@ -37,7 +37,7 @@ * @(#) Copyright (c) 1989, 1993 The Regents of the University of California. All rights reserved. * @(#)wump.c 8.1 (Berkeley) 5/31/93 * $FreeBSD: src/games/wump/wump.c,v 1.13.2.1 2000/08/17 06:24:54 jhb Exp $ - * $DragonFly: src/games/wump/wump.c,v 1.4 2005/03/15 20:53:43 dillon Exp $ + * $DragonFly: src/games/wump/wump.c,v 1.5 2006/09/09 02:21:49 pavalos Exp $ */ /* @@ -751,7 +751,7 @@ puff of greasy black smoke! (poof)\n"); err(1, "open %s", _PATH_WUMPINFO); if (dup2(fd, 0) == -1) err(1, "dup2"); - (void)execl("/bin/sh", "sh", "-c", pager, NULL); + (void)execl("/bin/sh", "sh", "-c", pager, (char *) NULL); err(1, "exec sh -c %s", pager); case -1: err(1, "fork"); -- 2.41.0