]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Assorted compiler warning fixes
authorAlan Modra <amodra@gmail.com>
Sat, 10 Jan 2015 22:00:33 +0000 (08:30 +1030)
committerAlan Modra <amodra@gmail.com>
Mon, 12 Jan 2015 07:37:52 +0000 (18:07 +1030)
The C standard doesn't guarantee a function pointer can be cast to
void* and vice versa.

binutils/
* prdbg.c (print_debugging_info): Don't use void* for function
pointer param.
* budbg.h (print_debugging_info): Update prototype.
gas/
* read.c (s_altmacro, s_reloc): Make definition static.

binutils/ChangeLog
binutils/budbg.h
binutils/prdbg.c
gas/ChangeLog
gas/read.c

index e6fa3c11e5767b37e45b2167cbe9571556b6bdd1..9458a84211fc4bf6d17760959edd2c6b3271a3c7 100644 (file)
@@ -1,3 +1,9 @@
+2015-01-12  Alan Modra  <amodra@gmail.com>
+
+       * prdbg.c (print_debugging_info): Don't use void* for function
+       pointer param.
+       * budbg.h (print_debugging_info): Update prototype.
+
 2015-01-08  Nick Clifton  <nickc@redhat.com>
 
        PR binutils/17512
index fc1ee2b57f131da21ce83a7fe3795be61f983599..18c022deb6235b598b595672f332cb4d72a9637c 100644 (file)
@@ -29,7 +29,8 @@ extern void *read_debugging_info (bfd *, asymbol **, long, bfd_boolean);
 /* Routine used to print generic debugging information.  */
 
 extern bfd_boolean print_debugging_info
-  (FILE *, void *, bfd *, asymbol **, void *, bfd_boolean);
+  (FILE *, void *, bfd *, asymbol **,
+   char * (*) (struct bfd *, const char *, int), bfd_boolean);
 
 /* Routines used to read and write stabs information.  */
 
index 4ef481cddeff020a67bb9ae9cef4ed56bdacb1ac..6e2b2172e48694958cc3e7ccf3060a7ab3397c43 100644 (file)
@@ -291,7 +291,8 @@ static const struct debug_write_fns tg_fns =
 
 bfd_boolean
 print_debugging_info (FILE *f, void *dhandle, bfd *abfd, asymbol **syms,
-                     void *demangler, bfd_boolean as_tags)
+                     char * (*demangler) (struct bfd *, const char *, int),
+                     bfd_boolean as_tags)
 {
   struct pr_handle info;
 
@@ -302,7 +303,7 @@ print_debugging_info (FILE *f, void *dhandle, bfd *abfd, asymbol **syms,
   info.filename = NULL;
   info.abfd = abfd;
   info.syms = syms;
-  info.demangler = (char * (*)(struct bfd *, const char *, int)) demangler;
+  info.demangler = demangler;
 
   if (as_tags)
     {
index 97422c1b54b1e754a2c9fecaa249bddd521a466c..a0deb6abc6763a130e9594f26ffd6ff1832db470 100644 (file)
@@ -1,3 +1,7 @@
+2015-01-12  Alan Modra  <amodra@gmail.com>
+
+       * read.c (s_altmacro, s_reloc): Make definition static.
+
 2015-01-10  Andrew Burgess  <andrew.burgess@embecosm.com>
 
        * config/tc-avr.c (md_apply_fix): Update the contents of VALP for
index 585d7efb894ee5966a223b96963f3d3c514cfb00..7dfc20a737116c5968d1bf457c0c6e6a569055dc 100644 (file)
@@ -1579,7 +1579,7 @@ s_align_ptwo (int arg)
 
 /* Switch in and out of alternate macro mode.  */
 
-void
+static void
 s_altmacro (int on)
 {
   demand_empty_rest_of_line ();
@@ -3984,7 +3984,7 @@ s_rva (int size)
 
 /* .reloc offset, reloc_name, symbol+addend.  */
 
-void
+static void
 s_reloc (int ignore ATTRIBUTE_UNUSED)
 {
   char *stop = NULL;