Skip to content

Commit cdedfe6

Browse files
committed
Cast NULL to a pointer type in the execl() call, to avoid a compiler warning on
some platforms and possibly a bug. Per report from Stefan and subsequent discussion.
1 parent dc32d2c commit cdedfe6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test/regress/pg_regress.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
1212
* Portions Copyright (c) 1994, Regents of the University of California
1313
*
14-
* $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.35 2007/06/12 13:54:58 mha Exp $
14+
* $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.36 2007/07/18 21:19:17 alvherre Exp $
1515
*
1616
*-------------------------------------------------------------------------
1717
*/
@@ -911,7 +911,7 @@ spawn_process(const char *cmdline)
911911
char *cmdline2 = malloc(strlen(cmdline) + 6);
912912

913913
sprintf(cmdline2, "exec %s", cmdline);
914-
execl(shellprog, shellprog, "-c", cmdline2, NULL);
914+
execl(shellprog, shellprog, "-c", cmdline2, (char *) NULL);
915915
fprintf(stderr, _("%s: could not exec \"%s\": %s\n"),
916916
progname, shellprog, strerror(errno));
917917
exit(1); /* not exit_nicely here... */

0 commit comments

Comments
 (0)