aboutsummaryrefslogtreecommitdiff
path: root/gprof/core.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1998-03-29 04:15:29 +0000
committerIan Lance Taylor <ian@airs.com>1998-03-29 04:15:29 +0000
commit6b84886ad5e6b53e7b3bb6d8c33685614364b58f (patch)
treefebee5c105a2f24b54b4dcd198f0083f0afc903d /gprof/core.c
parentc246596af760bc57c2af7c5a10afbe5ec0dd9fc2 (diff)
downloadgdb-6b84886ad5e6b53e7b3bb6d8c33685614364b58f.zip
gdb-6b84886ad5e6b53e7b3bb6d8c33685614364b58f.tar.gz
gdb-6b84886ad5e6b53e7b3bb6d8c33685614364b58f.tar.bz2
Fix some gcc -Wall warnings:
* cg_arcs.c (num_cycles): Change to unsigned int. (numarcs): Likewise. (arc_add): Change maxarcs to unsigned int. (cg_assemble): Change index to unsigned int. * cg_arcs.h (num_cycles, numarcs): Update declarations. * cg_print.c (cg_print): Change index to unsigned int. (cg_print_index): Change index, nnames, todo, i, and j to unsigned int. (cg_print_file_ordering): Change symbol_count and index2 to unsigned int. * core.c (symbol_map_count): Change to unsigned int. (core_create_function_syms): Change j to unsigned int. (core_create_line_syms): Add cast to avoid warning. * hist.c (hist_assign_samples): Change j to unsigned int. (hist_print): Change index to unsigned i nt. Add cast to avoid warning. * sym_ids.c (parse_spec): Add casts to avoid warning. * symtab.c (symtab_finalize): Change j to unsigned int. (sym_lookup): Update printf format strings. * symtab.h (Sym_Table): Change len to unsigned int. * tahoe.c (tahoe_reladdr): Add casts to avoid warnings.
Diffstat (limited to 'gprof/core.c')
-rw-r--r--gprof/core.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gprof/core.c b/gprof/core.c
index 597355e..22c89dc 100644
--- a/gprof/core.c
+++ b/gprof/core.c
@@ -19,7 +19,7 @@ struct function_map {
};
struct function_map *symbol_map;
-int symbol_map_count;
+unsigned int symbol_map_count;
extern void i386_find_call PARAMS ((Sym *, bfd_vma, bfd_vma));
extern void alpha_find_call PARAMS ((Sym *, bfd_vma, bfd_vma));
@@ -396,7 +396,8 @@ DEFUN (core_create_function_syms, (core_bfd), bfd * core_bfd)
{
bfd_vma min_vma = ~0, max_vma = 0;
int class;
- long i, j, found, skip;
+ long i, found, skip;
+ unsigned int j;
/* pass 1 - determine upper bound on number of function names: */
symtab.len = 0;
@@ -719,7 +720,7 @@ DEFUN (core_create_line_syms, (core_bfd), bfd * core_bfd)
memcpy (ltab.limit, symtab.base, symtab.len * sizeof (Sym));
ltab.limit += symtab.len;
- if (ltab.limit - ltab.base != ltab.len)
+ if ((unsigned int) (ltab.limit - ltab.base) != ltab.len)
{
fprintf (stderr,
"%s: somebody miscounted: ltab.len=%d instead of %ld\n",