This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Mark unwind-dw2-fde-glibc.c variable possibly unused
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: <libc-alpha at sourceware dot org>
- Date: Wed, 21 Nov 2012 17:18:11 +0000
- Subject: Mark unwind-dw2-fde-glibc.c variable possibly unused
sysdeps/generic/unwind-dw2-fde-glibc.c contains a variable that is
only used if __i386__ is defined, so resulting in set-but-not-used
warnings for other architectures building this code. This patch fixes
those warnings by using __attribute__ ((unused)) on this variable.
Tested on MIPS that this eliminates the compiler warnings.
2012-11-21 Joseph Myers <joseph@codesourcery.com>
* sysdeps/generic/unwind-dw2-fde-glibc.c
(_Unwind_IteratePhdrCallback): Declare P_DYNAMIC with
__attribute__ ((unused)).
diff --git a/sysdeps/generic/unwind-dw2-fde-glibc.c b/sysdeps/generic/unwind-dw2-fde-glibc.c
index 356428c..25f4c73 100644
--- a/sysdeps/generic/unwind-dw2-fde-glibc.c
+++ b/sysdeps/generic/unwind-dw2-fde-glibc.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001, 2002, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2012 Free Software Foundation, Inc.
Contributed by Jakub Jelinek <jakub@redhat.com>.
This file is part of the GNU C Library.
@@ -85,7 +85,8 @@ static int
_Unwind_IteratePhdrCallback (struct dl_phdr_info *info, size_t size, void *ptr)
{
struct unw_eh_callback_data *data = (struct unw_eh_callback_data *) ptr;
- const ElfW(Phdr) *phdr, *p_eh_frame_hdr, *p_dynamic;
+ const ElfW(Phdr) *phdr, *p_eh_frame_hdr;
+ const ElfW(Phdr) *p_dynamic __attribute__ ((unused));
long n, match;
_Unwind_Ptr load_base;
const unsigned char *p;
--
Joseph S. Myers
joseph@codesourcery.com