[RFA] Fix compilation warnings in irix-core.c

Joel Brobecker brobecker@adacore.com
Tue Mar 29 06:19:00 GMT 2005


> > 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.

Daniel and Thiemo suggested changing the + into a |. I will make that
change and test that, if you agree.

>  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?

Sure.

> 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 :)

Sure. I'll try to do that today.

Thanks all three of you for the light-speed reviews.
-- 
Joel



More information about the Binutils mailing list