aboutsummaryrefslogtreecommitdiff
path: root/gprof
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2008-07-30 04:34:58 +0000
committerAlan Modra <amodra@gmail.com>2008-07-30 04:34:58 +0000
commit0af1713e7cd57b52f6c81f73aa58934132198880 (patch)
treeaf4b52a6c5f3c8cd570e4f266f019cf552d6f442 /gprof
parent22ad7fee2a313665df38ad7177f962f7c13ad0b6 (diff)
downloadgdb-0af1713e7cd57b52f6c81f73aa58934132198880.zip
gdb-0af1713e7cd57b52f6c81f73aa58934132198880.tar.gz
gdb-0af1713e7cd57b52f6c81f73aa58934132198880.tar.bz2
Silence gcc printf warnings
Diffstat (limited to 'gprof')
-rw-r--r--gprof/ChangeLog4
-rw-r--r--gprof/corefile.c5
-rw-r--r--gprof/symtab.c10
3 files changed, 13 insertions, 6 deletions
diff --git a/gprof/ChangeLog b/gprof/ChangeLog
index cd01977..c798958 100644
--- a/gprof/ChangeLog
+++ b/gprof/ChangeLog
@@ -1,3 +1,7 @@
+2008-07-30 Alan Modra <amodra@bigpond.net.au>
+
+ * corefile.c, symtab.c: Silence gcc warnings.
+
2008-06-19 Andreas Schwab <schwab@suse.de>
* basic_blocks.c: Always include "gprof.h" first.
diff --git a/gprof/corefile.c b/gprof/corefile.c
index 4aec15c..243a600 100644
--- a/gprof/corefile.c
+++ b/gprof/corefile.c
@@ -1,6 +1,6 @@
/* corefile.c
- Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007
+ Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -427,7 +427,8 @@ get_src_info (bfd_vma addr, const char **filename, const char **name, int *line_
else
{
DBG (AOUTDEBUG, printf ("[get_src_info] no info for 0x%lx (%s:%d,%s)\n",
- (long) addr, fname ? fname : "<unknown>", l,
+ (unsigned long) addr,
+ fname ? fname : "<unknown>", l,
func_name ? func_name : "<unknown>"));
return FALSE;
}
diff --git a/gprof/symtab.c b/gprof/symtab.c
index bdd1a9e..3436f1b 100644
--- a/gprof/symtab.c
+++ b/gprof/symtab.c
@@ -1,6 +1,7 @@
/* symtab.c
- Copyright 1999, 2000, 2001, 2002, 2004, 2007 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2002, 2004, 2007, 2008
+ Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -164,8 +165,9 @@ symtab_finalize (Sym_Table *tab)
for (j = 0; j < tab->len; ++j)
{
printf ("[symtab_finalize] 0x%lx-0x%lx\t%s\n",
- (long) tab->base[j].addr, (long) tab->base[j].end_addr,
- tab->base[j].name);
+ (unsigned long) tab->base[j].addr,
+ (unsigned long) tab->base[j].end_addr,
+ tab->base[j].name);
}
);
}
@@ -176,7 +178,7 @@ symtab_finalize (Sym_Table *tab)
Sym *
dbg_sym_lookup (Sym_Table *sym_tab, bfd_vma address)
{
- long low, mid, high;
+ unsigned long low, mid, high;
Sym *sym;
fprintf (stderr, "[dbg_sym_lookup] address 0x%lx\n",