From patchwork Mon Oct 31 11:08:54 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ken Werner X-Patchwork-Id: 4879 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id EEC7B23E0B for ; Mon, 31 Oct 2011 11:09:07 +0000 (UTC) Received: from mail-fx0-f52.google.com (mail-fx0-f52.google.com [209.85.161.52]) by fiordland.canonical.com (Postfix) with ESMTP id DD5A1A18911 for ; Mon, 31 Oct 2011 11:09:07 +0000 (UTC) Received: by mail-fx0-f52.google.com with SMTP id n26so8219943faa.11 for ; Mon, 31 Oct 2011 04:09:07 -0700 (PDT) Received: by 10.223.1.12 with SMTP id 12mr19483906fad.32.1320059347727; Mon, 31 Oct 2011 04:09:07 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.1.71 with SMTP id 7cs30078lak; Mon, 31 Oct 2011 04:09:07 -0700 (PDT) Received: by 10.216.133.165 with SMTP id q37mr4248592wei.11.1320059345979; Mon, 31 Oct 2011 04:09:05 -0700 (PDT) Received: from mtagate3.uk.ibm.com (mtagate3.uk.ibm.com. [194.196.100.163]) by mx.google.com with ESMTPS id k11si2885812wed.135.2011.10.31.04.09.05 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 31 Oct 2011 04:09:05 -0700 (PDT) Received-SPF: neutral (google.com: 194.196.100.163 is neither permitted nor denied by best guess record for domain of ken.werner@linaro.org) client-ip=194.196.100.163; Authentication-Results: mx.google.com; spf=neutral (google.com: 194.196.100.163 is neither permitted nor denied by best guess record for domain of ken.werner@linaro.org) smtp.mail=ken.werner@linaro.org Received: from d06nrmr1707.portsmouth.uk.ibm.com (d06nrmr1707.portsmouth.uk.ibm.com [9.149.39.225]) by mtagate3.uk.ibm.com (8.13.1/8.13.1) with ESMTP id p9VB958I005708; Mon, 31 Oct 2011 11:09:05 GMT Received: from d06av07.portsmouth.uk.ibm.com (d06av07.portsmouth.uk.ibm.com [9.149.37.248]) by d06nrmr1707.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p9VB95iK2269252; Mon, 31 Oct 2011 11:09:05 GMT Received: from d06av07.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av07.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p9VB94Gv009567; Mon, 31 Oct 2011 05:09:04 -0600 Received: from kiste.boeblingen.de.ibm.com (dyn-9-152-224-38.boeblingen.de.ibm.com [9.152.224.38]) by d06av07.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id p9VB92EY009490; Mon, 31 Oct 2011 05:09:04 -0600 From: Ken Werner To: libunwind-devel@nongnu.org Cc: Ken Werner Subject: [PATCH] Only declare the start/end variables in case CONFIG_DEBUG_FRAME is defined. Date: Mon, 31 Oct 2011 12:08:54 +0100 Message-Id: <1320059334-27413-2-git-send-email-ken.werner@linaro.org> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1320059334-27413-1-git-send-email-ken.werner@linaro.org> References: <1320059334-27413-1-git-send-email-ken.werner@linaro.org> Prevents compiler warnings about unused variables. Signed-off-by: Ken Werner --- 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;