summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2007-07-18 21:19:17 +0000
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2007-07-18 21:19:17 +0000
commitcdedfe6af1c426b28b2e0ff522d5d88f195a5d47 (patch)
tree4eea0d95f703813d1baebe8bc65a41f5bfd9ae19 /src
parentdc32d2cefae03e8dc390df94232774780e7db28d (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/test/regress/pg_regress.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/regress/pg_regress.c b/src/test/regress/pg_regress.c
index 3f067428af7..9c52df7cafe 100644
--- a/src/test/regress/pg_regress.c
+++ b/src/test/regress/pg_regress.c
@@ -11,7 +11,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.35 2007/06/12 13:54:58 mha Exp $
+ * $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.36 2007/07/18 21:19:17 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
@@ -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... */