diff mbox

Only declare the start/end variables in case CONFIG_DEBUG_FRAME is defined.

Message ID 1320059334-27413-2-git-send-email-ken.werner@linaro.org
State Accepted
Commit 1e644990c9afe9054ba7693929139f298cb3e53a
Headers show

Commit Message

Ken Werner Oct. 31, 2011, 11:08 a.m. UTC
Prevents compiler warnings about unused variables.

Signed-off-by: Ken Werner <ken.werner@linaro.org>
---
 src/dwarf/Gfind_proc_info-lsb.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
diff mbox

Patch

diff --git a/src/dwarf/Gfind_proc_info-lsb.c b/src/dwarf/Gfind_proc_info-lsb.c
index ee3872e..c42f182 100644
--- a/src/dwarf/Gfind_proc_info-lsb.c
+++ b/src/dwarf/Gfind_proc_info-lsb.c
@@ -544,7 +544,7 @@  dwarf_callback (struct dl_phdr_info *info, size_t size, void *ptr)
   struct dwarf_callback_data *cb_data = ptr;
   unw_dyn_info_t *di = &cb_data->di;
   const Elf_W(Phdr) *phdr, *p_eh_hdr, *p_dynamic, *p_text;
-  unw_word_t addr, eh_frame_start, eh_frame_end, fde_count, ip, start, end;
+  unw_word_t addr, eh_frame_start, eh_frame_end, fde_count, ip;
   Elf_W(Addr) load_base, segbase = 0, max_load_addr = 0;
   int ret, need_unwind_info = cb_data->need_unwind_info;
   unw_proc_info_t *pi = cb_data->pi;
@@ -552,6 +552,9 @@  dwarf_callback (struct dl_phdr_info *info, size_t size, void *ptr)
   unw_accessors_t *a;
   long n;
   int found = 0;
+#ifdef CONFIG_DEBUG_FRAME
+  unw_word_t start, end;
+#endif /* CONFIG_DEBUG_FRAME*/
 
   ip = cb_data->ip;