From 113341b98186488e6c2aa5b43ef4690276d8baa4 Mon Sep 17 00:00:00 2001 From: sjborley Date: Mon, 19 Sep 2005 20:49:38 +0000 Subject: [PATCH] Used (void*)0 instead of 0 for the terminating vararg, to avoid gcc 4.0 warning about missing sentinel in function call. Resolved Bug 1293746 - Problem with aspice.c(171) in gcc (Solaris). --- src/frontend/aspice.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/frontend/aspice.c b/src/frontend/aspice.c index cbe30ca26..2cbdf34f5 100644 --- a/src/frontend/aspice.c +++ b/src/frontend/aspice.c @@ -36,6 +36,15 @@ $Id$ #include "fteinp.h" #include "dvec.h" +/* + This is required for the GCC pre-processor and might be needed for others + Added to resolve ngspice bug 1293746 + http://sourceforge.net/tracker/index.php?func=detail&aid=1293746&group_id=38962&atid=423915 +*/ +#if !defined(SOLARIS) && defined (__SVR4) && defined(__sun) +# define SOLARIS +#endif + #ifndef SEEK_SET # define SEEK_SET 0 @@ -111,7 +120,7 @@ com_aspice(wordlist *wl) } (void) dup2(fileno(stdout), fileno(stderr)); - (void) execl(spicepath, spicepath, "-r", raw, 0); + (void) execl(spicepath, spicepath, "-r", raw, (void*)0); /* Screwed up. */ perror(spicepath); @@ -310,7 +319,7 @@ com_rspice(wordlist *wl) dup2(from_serv[1], 1); /* stdout */ dup2(err_serv[1], 2); /* stderr */ - execlp(remote_shell, remote_shell, rhost, program, "-s", 0); + execlp(remote_shell, remote_shell, rhost, program, "-s", (void*)0); /* system(com_buf); */ perror(remote_shell); exit(-1);