This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb/binutils-2_25-branch] Assorted compiler warning fixes


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5d44a7005ae67e3ff45c6901365736e1aafe0845

commit 5d44a7005ae67e3ff45c6901365736e1aafe0845
Author: Alan Modra <amodra@gmail.com>
Date:   Sun Jan 11 08:30:33 2015 +1030

    Assorted compiler warning fixes
    
    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.

Diff:
---
 binutils/ChangeLog | 5 +++++
 binutils/budbg.h   | 3 ++-
 binutils/prdbg.c   | 5 +++--
 gas/ChangeLog      | 3 +++
 gas/read.c         | 4 ++--
 5 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 672a171..3d46b8a 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -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).
diff --git a/binutils/budbg.h b/binutils/budbg.h
index 9753ddf..d018bfc 100644
--- a/binutils/budbg.h
+++ b/binutils/budbg.h
@@ -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.  */
 
diff --git a/binutils/prdbg.c b/binutils/prdbg.c
index fab60a6..b43030b 100644
--- a/binutils/prdbg.c
+++ b/binutils/prdbg.c
@@ -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)
     {
diff --git a/gas/ChangeLog b/gas/ChangeLog
index f7945e6..11167b0 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -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.
diff --git a/gas/read.c b/gas/read.c
index 9fd0335..6e441da 100644
--- a/gas/read.c
+++ b/gas/read.c
@@ -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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]