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

Thiemo Seufer ths@networkno.de
Tue Mar 29 05:11:00 GMT 2005


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.
> 
> The changes should be nops. The only question I had was regarding
> the conversion to ISO C (ie have "int foo (char *bar) {" instead of
> "int foo (bar) char * bar; {"). For now, I just left the file as is.
> I think the conversion should be done in a patch of its own anyway.
> 
> Tested by building GDB and running the GDB testsuite.
> OK to apply?
> 
> Thanks,
> -- 
> Joel

> Index: irix-core.c
> ===================================================================
> RCS file: /cvs/src/src/bfd/irix-core.c,v
> retrieving revision 1.12
> diff -u -p -r1.12 irix-core.c
> --- irix-core.c	24 Jun 2004 04:46:24 -0000	1.12
> +++ irix-core.c	28 Mar 2005 22:38:23 -0000
> @@ -152,7 +152,7 @@ do_sections (abfd, coreout)
>  	continue;
>  
>        if (!make_bfd_asection (abfd, secname,
> -			      SEC_ALLOC | SEC_LOAD+SEC_HAS_CONTENTS,
> +			      SEC_ALLOC | (SEC_LOAD+SEC_HAS_CONTENTS),
>  			      vmap.v_len, vmap.v_vaddr, vmap.v_offset))

This should probably be SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS anyways.


Thiemo



More information about the Binutils mailing list