mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-05 21:50:21 +08:00
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.
This commit is contained in:
@ -202,11 +202,11 @@ tahoe_reladdr (modep)
|
||||
case byterel:
|
||||
return (bfd_vma) (cp + sizeof *cp + *cp);
|
||||
case wordrel:
|
||||
for (i = 0; i < sizeof *sp; i++)
|
||||
for (i = 0; (size_t) i < sizeof *sp; i++)
|
||||
value = (value << 8) + (cp[i] & 0xff);
|
||||
return (bfd_vma) (cp + sizeof *sp + value);
|
||||
case longrel:
|
||||
for (i = 0; i < sizeof *lp; i++)
|
||||
for (i = 0; (size_t) i < sizeof *lp; i++)
|
||||
value = (value << 8) + (cp[i] & 0xff);
|
||||
return (bfd_vma) (cp + sizeof *lp + value);
|
||||
}
|
||||
|
Reference in New Issue
Block a user