This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: [PATCH] Some compiler warnings removed
> From: Andrew Cagney <ac131313@cygnus.com>
>
> > --- gdb/blockframe.c~0 Wed Dec 22 21:45:02 1999
> > +++ gdb/blockframe.c Wed Feb 23 16:51:44 2000
> > @@ -70,6 +70,7 @@ nonnull_frame_chain_valid (chain, thisfr
> > CORE_ADDR chain;
> > struct frame_info *thisframe;
> > {
> > + thisframe = thisframe;
> > return ((chain) != 0);
> > }
> >
>
> FWIW,
>
> The way GCC handles this is by appending ATTRIBUTE_UNUSED to the
> parameter declaratons. I see no reason for doing it differently.
I'm not sure I follow. I know about __attribute__((unused)), but I
thought I couldn't use GCC-specific extensions, except in places which
will never be compiled by anything but GCC (like go32-nat.c). If
there is a portable way of doing this that I missed, please tell me
where to look.
> > {
> > - /* On AIX and i386 GNU/Linux, floating point values are returned in
> > - floating point registers. */
> > -#if defined(I386_AIX_TARGET) || defined(I386_GNULINUX_TARGET)
> > + /* On AIX, i386 GNU/Linux and DJGPP, floating point values are
> > + returned in floating point registers. */
> > +#if defined(I386_AIX_TARGET) || defined(I386_GNULINUX_TARGET) || defined(I386_DJGPP_TARGET)
> > if (TYPE_CODE_FLT == TYPE_CODE (type))
> > {
> > double d;
> > @@ -720,7 +720,7 @@ i386_extract_return_value (type, regbuf,
> > store_floating (valbuf, TYPE_LENGTH (type), d);
> > }
> > else
> > -#endif /* I386_AIX_TARGET || I386_GNULINUX_TARGET*/
> > +#endif /* I386_AIX_TARGET || I386_GNULINUX_TARGET || I386_DJGPP_TARGET */
>
> This one looks more like an actual code change?
Yes. Sorry, this was intended to be sent with the other batch of
changes I sent yesterday.