Fix compile warnings for elf loader ##bin

This commit is contained in:
Luc Tielen 2023-05-01 16:02:43 +02:00 committed by pancake
parent ce837063cb
commit c3684606e8

View File

@ -4190,8 +4190,6 @@ static RVector /* <RBinElfSymbol> */ *Elf_(_r_bin_elf_load_symbols_and_imports)(
size_t import_ret_ctr = 0;
size_t ret_ctr = 0; // amount of symbols stored in ret
RVector *ret = parse_gnu_debugdata (bin, &ret_ctr);
// ret_size = amount of dbgsymbols in the array (not size of the array)
size_t ret_size = ret_ctr * sizeof (RBinElfSymbol); // size of ret allocation
ElfSymbolMemory memory = { .symbols = ret, .sym = NULL, .strtab = NULL };
int i;
for (i = 0; i < bin->ehdr.e_shnum; i++) {
@ -4319,8 +4317,6 @@ static RVector /* <RBinElfSymbol> */ *Elf_(_r_bin_elf_load_symbols_and_imports)(
return NULL;
}
ret_size += increment * sizeof (RBinElfSymbol);
int k;
for (k = 1; k < nsym; k++, ret_ctr++) {
ut64 toffset;