aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2015-01-11 08:30:33 +1030
committerAlan Modra <amodra@gmail.com>2015-01-12 18:07:52 +1030
commitb38ead219b31fed4014cd5b1078da968744b879d (patch)
treeaa980814e17268e12648817156ffbbd9017fe100 /binutils
parent005e54bb792bc74f1168def16f35078be588871a (diff)
downloadgdb-b38ead219b31fed4014cd5b1078da968744b879d.zip
gdb-b38ead219b31fed4014cd5b1078da968744b879d.tar.gz
gdb-b38ead219b31fed4014cd5b1078da968744b879d.tar.bz2
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.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog6
-rw-r--r--binutils/budbg.h3
-rw-r--r--binutils/prdbg.c5
3 files changed, 11 insertions, 3 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index e6fa3c1..9458a84 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -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
diff --git a/binutils/budbg.h b/binutils/budbg.h
index fc1ee2b..18c022d 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 4ef481c..6e2b217 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)
{