This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] compile: Fix MinGW build [Re: [mingw rfc] Add mkdtemp to gdb/gnulib/]

On Tue, 2014-12-16 at 05:39 +0200, Eli Zaretskii wrote:
> > Date: Mon, 15 Dec 2014 23:55:51 +0100
> > From: Jan Kratochvil <>
> > Cc:,,,
> >
> > 
> > On Mon, 15 Dec 2014 23:28:01 +0100, Jan Kratochvil wrote:
> > > The 'compile' project needs a larger port effort to run on MS-Windows.
> > 
> > For example there is also
> > 
> > compile/compile.c:
> >   zap = concat ("rm -rf ", dir, (char *) NULL);
> >   system (zap);
> Yuck!  Do we really allow such atrocities in GDB?  What if 'rm' is
> some unrelated or even malicious script?
> I think this should be replaced by suitable C function calls.  IMO,
> this kind of programming is OK for prototyping, but not for the final
> code.

I am running into a different problem with the system call.  I am
building on Linux using the latest GCC and glibc (unreleased top of tree
sources) and my build fails with:

/scratch/sellcey/repos/nightly2/src/binutils-gdb/gdb/compile/compile.c:175:10: error: ignoring return value of 'system', declared with attribute warn_unused_result [-Werror=unused-result]
cc1: all warnings being treated as errors
make[1]: *** [compile.o] Error 1

If we don't get rid of the system call can we at least check the return
value of system?

Steve Ellcey

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]