From: Bruno Haible Date: Mon, 10 Nov 2008 11:48:32 +0000 (+0100) Subject: Fix a serious gcc warning. X-Git-Tag: v0.1~6703 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=614ff64f8c5ddce71a53c7c7a34f048e7fad34fa;p=gnulib.git Fix a serious gcc warning. --- diff --git a/ChangeLog b/ChangeLog index 5b88d5ba5..39792a6c3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2008-11-10 Bruno Haible + * lib/spawni.c (__spawni): Force variable into the stack. + +2008-11-10 Bruno Haible + Add support for Haiku. * lib/fbufmode.c (fbufmode): Test a symbol that is not only defined on glibc and BeOS, but also on Haiku. diff --git a/lib/spawni.c b/lib/spawni.c index 0d0d418cb..ea6555333 100644 --- a/lib/spawni.c +++ b/lib/spawni.c @@ -133,6 +133,10 @@ __spawni (pid_t *pid, const char *file, /* Do this once. */ short int flags = attrp == NULL ? 0 : attrp->_flags; + /* Avoid gcc warning + "variable 'flags' might be clobbered by 'longjmp' or 'vfork'" */ + (void) &flags; + /* Generate the new process. */ #if HAVE_VFORK if ((flags & POSIX_SPAWN_USEVFORK) != 0