# HG changeset patch # User Bruno Haible # Date 1226317712 -3600 # Node ID f65529c865532b4922f7a8f63a10c7829013c670 # Parent 20acc01fca51c62823b735b017cb9be9b3efcfc9 Fix a serious gcc warning. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-11-10 Bruno Haible + + * lib/spawni.c (__spawni): Force variable into the stack. + 2008-11-10 Bruno Haible Add support for Haiku. diff --git a/lib/spawni.c b/lib/spawni.c --- a/lib/spawni.c +++ b/lib/spawni.c @@ -133,6 +133,10 @@ /* 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