binutils fails to compile on AIX due to mismatched declaration

rs6000-core.c:280:19: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
 const bfd_cleanup rs6000coff_core_p (bfd *abfd);
                   ^~~~~~~~~~~~~~~~~
rs6000-core.c:336:1: error: conflicting types for 'rs6000coff_core_p'
 rs6000coff_core_p (bfd *abfd)
 ^~~~~~~~~~~~~~~~~
rs6000-core.c:280:19: note: previous declaration of 'rs6000coff_core_p' was here
 const bfd_cleanup rs6000coff_core_p (bfd *abfd);
                   ^~~~~~~~~~~~~~~~~

	* rs6000-core.c (rs6000coff_core_p): Correct prototype.
This commit is contained in:
Alan Modra 2021-03-04 08:46:22 +10:30
parent 1bfa81acbf
commit 0b7733b665
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2021-03-04 Alan Modra <amodra@gmail.com>
* rs6000-core.c (rs6000coff_core_p): Correct prototype.
2021-03-03 Alan Modra <amodra@gmail.com>
PR 27500

View File

@ -277,7 +277,7 @@ typedef union
/* Define prototypes for certain functions, to avoid a compiler warning
saying that they are missing. */
const bfd_cleanup rs6000coff_core_p (bfd *abfd);
bfd_cleanup rs6000coff_core_p (bfd *abfd);
bfd_boolean rs6000coff_core_file_matches_executable_p (bfd *core_bfd,
bfd *exec_bfd);
char * rs6000coff_core_file_failing_command (bfd *abfd);