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).
This commit is contained in:
sjborley 2005-09-19 20:49:38 +00:00
parent ebb48f93ed
commit 113341b981
1 changed files with 11 additions and 2 deletions

View File

@ -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);