[klibc] (fwd) dash fix for job control off warning
max at stro.at
Fri Apr 2 07:47:51 PDT 2010
On Fri, Apr 02, 2010 at 10:42:20PM +0800, Herbert Xu wrote:
> On Fri, Apr 02, 2010 at 04:32:20PM +0200, maximilian attems wrote:
> > Pulled this; there seems to be a problem with the new version of dash
> > with job control off. I can't tell if it is just a warning or is a
> > manifest bug.
> > The solution is simple:
> > --- a/usr/dash/jobs.h
> > +++ b/usr/dash/jobs.h
> > @@ -105,5 +105,5 @@ int waitforjob(struct job *);
> > int stoppedjobs(void);
> > #if ! JOBS
> > -#define setjobctl(on) /* do nothing */
> > +#define setjobctl(on) ((void)(on)) /* do nothing */
> > #endif
> > ... to keep the code syntactically valid even when setjobctl() is used
> > as the body of an if statement.
> So when exactly is this needed? Can you give an example?
usr/dash/trap.c: In function `exitshell':
usr/dash/trap.c:376: warning: suggest braces around empty body in an `if' statement
* Disable job control so that whoever had the foreground before we
* started can get it back.
aboves patch fixes this gcc warning for me, but I still see:
usr/dash/trap.c: In function âexitshellâ:
usr/dash/trap.c:352: warning: variable âstatusâ might be clobbered by âlongjmpâ or âvforkâ
More information about the klibc