]> 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>
Wed, 11 Feb 2015 12:36:41 +0000 (23:06 +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 672a171977c3e0a3282ca94914abcd9e563060a0..3d46b8ae5b14b606b7c0819c90b66a3b42592077 100644 (file)
@@ -1,6 +1,11 @@
 2015-02-11  Alan Modra  <amodra@gmail.com>
 
        Apply from master.
+       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.
+
        2014-12-18  Mark Wielaard  <mjw@redhat.com>
        * dwarf.c (read_and_display_attr_value): Change display name of
        DW_LANG_C11 from (ANSI C11) to (C11).
index 9753ddf53ece6009c87d51b489ef8fca2f2047be..d018bfcc04fc93ba8afb3e21f1ee5f5efdf78789 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 fab60a6b52964e66e224ed12ab91566329c97602..b43030b0faef9ccdbdce458886cfa56b3cfa2ac0 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 f7945e6582459ae091b9458c665b72fff5971c58..11167b0f2846fa16657218697516f454c973a10e 100644 (file)
@@ -1,6 +1,9 @@
 2015-02-11  Alan Modra  <amodra@gmail.com>
 
        Apply from master.
+       2015-01-12  Alan Modra  <amodra@gmail.com>
+       * read.c (s_altmacro, s_reloc): Make definition static.
+
        2014-12-12  Alan Modra  <amodra@gmail.com>
        * config/tc-ppc.h (md_reg_eh_frame_to_debug_frame): Match current
        gcc behaviour.
index 9fd0335d8e1f3e9844e2326d36418c79dcdc6b33..6e441da4216d0c12a889b56502fc342ecf5b5f94 100644 (file)
@@ -1578,7 +1578,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 ();
@@ -3983,7 +3983,7 @@ s_rva (int size)
 
 /* .reloc offset, reloc_name, symbol+addend.  */
 
-void
+static void
 s_reloc (int ignore ATTRIBUTE_UNUSED)
 {
   char *stop = NULL;