Cast NULL to a pointer type in the execl() call, to avoid a compiler warning on
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Wed, 18 Jul 2007 21:19:17 +0000 (21:19 +0000)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Wed, 18 Jul 2007 21:19:17 +0000 (21:19 +0000)
some platforms and possibly a bug.  Per report from Stefan and subsequent
discussion.

src/test/regress/pg_regress.c

index fc5fde17ee897481447923fe85472a0b45681ad4..53147fe9f44f4465b7b5aa9cf936480247c4ce15 100644 (file)
@@ -911,7 +911,7 @@ spawn_process(const char *cmdline)
                char       *cmdline2 = malloc(strlen(cmdline) + 6);
 
                sprintf(cmdline2, "exec %s", cmdline);
-               execl(shellprog, shellprog, "-c", cmdline2, NULL);
+               execl(shellprog, shellprog, "-c", cmdline2, (char *) NULL);
                fprintf(stderr, _("%s: could not exec \"%s\": %s\n"),
                                progname, shellprog, strerror(errno));
                exit(1);                                /* not exit_nicely here... */