From: Steve Ellcey <sellcey@imgtec.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: <gdb-patches@sourceware.org>
Subject: Re: [Patch] Fix build problem with system call in compile/compile.c
Date: Tue, 06 Jan 2015 16:04:00 -0000 [thread overview]
Message-ID: <1420560255.15691.21.camel@ubuntu-sellcey> (raw)
In-Reply-To: <20150106041615.GJ5445@adacore.com>
On Tue, 2015-01-06 at 08:16 +0400, Joel Brobecker wrote:
> > diff --git a/gdb/compile/compile.c b/gdb/compile/compile.c
> > index 1d18bd7..f9f03f1 100644
> > --- a/gdb/compile/compile.c
> > +++ b/gdb/compile/compile.c
> > @@ -169,10 +169,12 @@ do_rmdir (void *arg)
> > {
> > const char *dir = arg;
> > char *zap;
> > + int i;
> >
> > gdb_assert (strncmp (dir, TMP_PREFIX, strlen (TMP_PREFIX)) == 0);
> > zap = concat ("rm -rf ", dir, (char *) NULL);
> > - system (zap);
> > + /* GCC may generate warning if we ignore the return value of system call. */
> > + i = system (zap);
> > }
> >
> > /* Return the name of the temporary directory to use for .o files, and
>
> Does it work to cast the result of the call to system to (void)
> instead? In your case, I fear that you'd be exchanging one warning
> (return value being ignored) by another (value assigned but never
> used).
No, I tried using "(void) system (zap);" instead of "i = system (zap);"
and I still got the warning message.
I am going to respond on the "GDB 7.9 branching" email thread that I
think this bug is a blocking bug since it breaks the build on some
machines. I certainly think it needs to be addressed somehow before we
release the next GDB.
Steve Ellcey
sellcey@imgtec.com
next prev parent reply other threads:[~2015-01-06 16:04 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-06 0:44 Steve Ellcey
2015-01-06 3:09 ` Yao Qi
2015-01-06 4:16 ` Joel Brobecker
2015-01-06 16:04 ` Steve Ellcey [this message]
2015-01-07 4:14 ` Joel Brobecker
2015-01-07 18:36 ` Steve Ellcey
2015-01-07 19:01 ` Pedro Alves
2015-01-07 19:29 ` Maciej W. Rozycki
2015-01-07 19:35 ` Pedro Alves
2015-01-07 23:33 ` Maciej W. Rozycki
2015-01-08 21:12 ` Jan Kratochvil
2015-01-08 22:12 ` Steve Ellcey
2015-01-08 23:22 ` Pedro Alves
2015-01-09 0:10 ` Steve Ellcey
2015-01-09 3:47 ` Chen Gang S
2015-01-09 10:11 ` Pedro Alves
2015-01-09 10:46 ` Chen Gang S
2015-01-09 20:52 ` Chen Gang S
2015-01-09 21:53 ` Chen Gang S
2015-01-10 4:30 ` Joel Brobecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1420560255.15691.21.camel@ubuntu-sellcey \
--to=sellcey@imgtec.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox