From 2372639e9d3dbca16b48480f5a032254ce46fbab Mon Sep 17 00:00:00 2001 From: Thomas Preud'homme Date: Mon, 5 Dec 2016 21:34:00 +0000 Subject: [PATCH] Fix set but not used error in arm64-link.c --- arm64-link.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/arm64-link.c b/arm64-link.c index c66029e6..9e5a8732 100644 --- a/arm64-link.c +++ b/arm64-link.c @@ -40,11 +40,10 @@ void relocate_init(Section *sr) {} void relocate(TCCState *s1, ElfW_Rel *rel, int type, char *ptr, addr_t addr, addr_t val) { - ElfW(Sym) *sym; - int sym_index; - - sym_index = ELFW(R_SYM)(rel->r_info); - sym = &((ElfW(Sym) *)symtab_section->data)[sym_index]; + int sym_index = ELFW(R_SYM)(rel->r_info); +#ifdef DEBUG_RELOC + ElfW(Sym) *sym = &((ElfW(Sym) *)symtab_section->data)[sym_index]; +#endif switch(type) { case R_AARCH64_ABS64: