binutils fails to compile on AIX due to mismatched declaration
authorAlan Modra <amodra@gmail.com>
Wed, 3 Mar 2021 22:16:22 +0000 (08:46 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 3 Mar 2021 22:23:35 +0000 (08:53 +1030)
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.

bfd/ChangeLog
bfd/rs6000-core.c

index 5e2571bf347a9e3eb56d428e570733e4225e939f..af09b0008a8318ac53cee256c7c5ff38ca42420c 100644 (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
index 9fed1ff48b3d9edeb1a60a12b3bd983f5427e0d3..1c19060a5d99f65b41f98121a43a92aa5c944aa8 100644 (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);