From cb12a6901a02f19852967743256d0dad4164e109 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Wed, 17 Apr 2019 17:50:44 +0000 Subject: [PATCH] readelf: use size_t for object counts PR: 212539 Reported by: cem Sponsored by: The FreeBSD Foundation --- contrib/elftoolchain/readelf/readelf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/elftoolchain/readelf/readelf.c b/contrib/elftoolchain/readelf/readelf.c index ae666bd21612..5465c4aa3b17 100644 --- a/contrib/elftoolchain/readelf/readelf.c +++ b/contrib/elftoolchain/readelf/readelf.c @@ -370,7 +370,7 @@ static void readelf_usage(int status); static void readelf_version(void); static void search_loclist_at(struct readelf *re, Dwarf_Die die, Dwarf_Unsigned lowpc, struct loc_at **la_list, - unsigned int *la_list_len, unsigned int *la_list_cap); + size_t *la_list_len, size_t *la_list_cap); static void search_ver(struct readelf *re); static const char *section_type(unsigned int mach, unsigned int stype); static void set_cu_context(struct readelf *re, Dwarf_Half psize, @@ -6063,8 +6063,7 @@ loc_at_comparator(const void *la1, const void *la2) static void search_loclist_at(struct readelf *re, Dwarf_Die die, Dwarf_Unsigned lowpc, - struct loc_at **la_list, unsigned int *la_list_len, - unsigned int *la_list_cap) + struct loc_at **la_list, size_t *la_list_len, size_t *la_list_cap) { struct loc_at *la; Dwarf_Attribute *attr_list; @@ -6438,7 +6437,8 @@ dump_dwarf_loclist(struct readelf *re) Dwarf_Half tag, version, pointer_size, off_size; Dwarf_Error de; struct loc_at *la_list, *left, *right, *la; - unsigned int la_list_len, la_list_cap, duplicates, k; + size_t la_list_len, la_list_cap; + unsigned int duplicates, k; int i, j, ret, has_content; la_list_len = 0;