Cast sentinel for execl*() to (char *) to quiet gcc4 warnings.
authorPeter Avalos <pavalos@dragonflybsd.org>
Sat, 9 Sep 2006 02:21:49 +0000 (02:21 +0000)
committerPeter Avalos <pavalos@dragonflybsd.org>
Sat, 9 Sep 2006 02:21:49 +0000 (02:21 +0000)
games/atc/input.c
games/cribbage/instr.c
games/phantasia/misc.c
games/rogue/machdep.c
games/wump/wump.c

index eef1280..e8a6f96 100644 (file)
@@ -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 */
                        }
index 7c6682a..bb40f3f 100644 (file)
@@ -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 <sys/wait.h>
@@ -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:
index c925fdb..ccfe926 100644 (file)
@@ -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 <string.h>
@@ -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*/
        }
index a91f1f0..cc9d0da 100644 (file)
@@ -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);
 }
index 1e32675..5731728 100644 (file)
@@ -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");