This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [RFA] Fix compilation warnings in irix-core.c
- From: Eric Christopher <echristo at redhat dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Mon, 28 Mar 2005 14:53:59 -0800
- Subject: Re: [RFA] Fix compilation warnings in irix-core.c
- References: <20050328224444.GS2295@adacore.com>
On Mon, 2005-03-28 at 14:44 -0800, Joel Brobecker wrote:
> Hello,
>
> GDB currently fails to build on mips/irix due to warnings now being
> turned into errors. I am unfortunately lacking the time to look deeply
> into this at the moment (I have asked one of my coworkers to help me
> with that), but there was one file where the fixes were I think obvious.
> Here is a patch for it:
>
> 2005-03-28 Joel Brobecker <brobecker@adacore.com>
>
> * irix-core.c (do_sections): Add parenthesis in expression
> to avoid a compiler warning.
> (irix_core_core_file_matches_executable_p): Add ATTRIBUTE_UNUSED
> to unused parameters to avoid a compiler warning.
if (!make_bfd_asection (abfd, secname,
- SEC_ALLOC | SEC_LOAD+SEC_HAS_CONTENTS,
+ SEC_ALLOC | (SEC_LOAD+SEC_HAS_CONTENTS),
Spaces around the + please.
irix_core_core_file_matches_executable_p (core_bfd, exec_bfd)
- bfd *core_bfd, *exec_bfd;
+ bfd *core_bfd ATTRIBUTE_UNUSED, *exec_bfd ATTRIBUTE_UNUSED;
Can you move this to:
bfd *core_bfd ATTRIBUTE_UNUSED;
bfd *exec_bfd ATTRIBUTE_UNUSED;
please?
OK with those changes. Though if you want to migrate the whole file to
ISO I'd appreciate it. For style just look at, say, elfxx-mips.c :)
-eric