libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Libunwind-devel] [PATCH] Only declare the start/end variables in case C


From: Ken Werner
Subject: [Libunwind-devel] [PATCH] Only declare the start/end variables in case CONFIG_DEBUG_FRAME is defined.
Date: Mon, 31 Oct 2011 12:08:54 +0100

Prevents compiler warnings about unused variables.

Signed-off-by: Ken Werner <address@hidden>
---
 src/dwarf/Gfind_proc_info-lsb.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

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;
 
-- 
1.7.5.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]