From: ben Date: Mon, 4 Apr 2005 13:44:45 +0000 (+0000) Subject: NULL needs to be cast to void * when passed to a variadic function like X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/commitdiff_plain/30264db921b40a1b8952eea6d582d2bdcf5f8465 NULL needs to be cast to void * when passed to a variadic function like execl(). Spotted by Damien Miller. git-svn-id: svn://svn.tartarus.org/sgt/putty@5592 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/unix/uxproxy.c b/unix/uxproxy.c index 617f5ccf..209991fc 100644 --- a/unix/uxproxy.c +++ b/unix/uxproxy.c @@ -281,7 +281,7 @@ Socket platform_new_connection(SockAddr addr, char *hostname, close(i); fcntl(0, F_SETFD, 0); fcntl(1, F_SETFD, 0); - execl("/bin/sh", "sh", "-c", cmd, NULL); + execl("/bin/sh", "sh", "-c", cmd, (void *)NULL); _exit(255); } diff --git a/unix/uxpty.c b/unix/uxpty.c index f91dc716..37a017d3 100644 --- a/unix/uxpty.c +++ b/unix/uxpty.c @@ -813,7 +813,7 @@ static const char *pty_init(void *frontend, void **backend_handle, Config *cfg, sprintf(shellname, "-%s", p); } else shellname = shell; - execl(getenv("SHELL"), shellname, NULL); + execl(getenv("SHELL"), shellname, (void *)NULL); } /*