This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi! On Wed, 21 Nov 2012 17:18:11 +0000, "Joseph S. Myers" <joseph@codesourcery.com> wrote: > 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. > --- a/sysdeps/generic/unwind-dw2-fde-glibc.c > +++ b/sysdeps/generic/unwind-dw2-fde-glibc.c > @@ -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)); I first thought, if it's only used if __i386__ is defined, then why not conditionalize this one on __i386__, too. Looking at the code, however, your proposed approach is simpler, so this looks good to me. GrÃÃe, Thomas
Attachment:
pgp00000.pgp
Description: PGP signature
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |