Skip to content

Commit

Permalink
ldelf: riscv: e64_relocate(): tag sym_idx as __maybe_unused
Browse files Browse the repository at this point in the history
The sym_idx variable in e64_relocate() is not used in the rv64 build.
Therefore, mark it __maybe_unused to avoid a warning.

Signed-off-by: Jerome Forissier <[email protected]>
Reviewed-by: Etienne Carriere <[email protected]>
Reviewed-by: Alvin Chang <[email protected]>
Acked-by: Jens Wiklander <[email protected]>
  • Loading branch information
jforissier committed Feb 26, 2024
1 parent 31bcbe5 commit 209c34d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ldelf/ta_elf_rel.c
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ static void e64_relocate(struct ta_elf *elf, unsigned int rel_sidx)
rela_end = rela + shdr[rel_sidx].sh_size / sizeof(Elf64_Rela);
for (; rela < rela_end; rela++) {
Elf64_Addr *where = NULL;
size_t sym_idx = 0;
size_t sym_idx __maybe_unused = 0;

/* Check the address is inside TA memory */
if (rela->r_offset >= (elf->max_addr - elf->load_addr))
Expand Down

0 comments on commit 209c34d

Please sign in to comment.