Skip to content

Commit

Permalink
Fix warnings on Linux/i686
Browse files Browse the repository at this point in the history
Fixes:
../sysdeps/i386/dl-machine.h:336:30: warning: unused variable ‘refsym’ [-Wunused-variable]
rtld.c:1435:3: warning: implicit declaration of function ‘_dl_discover_osversion’ [-Wimplicit-function-declaration]
  • Loading branch information
ajaeger committed May 17, 2012
1 parent 286abc3 commit de7f5ce
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2012-05-17 Andreas Jaeger <[email protected]>

* sysdeps/i386/dl-machine.h (elf_machine_rel): Declare refsym only
when it is used.

2012-05-17 Chris Metcalf <[email protected]>

* stdio-common/bug22.c (TIMEOUT): Bump up from 30 to 60.
Expand Down
6 changes: 6 additions & 0 deletions nptl/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2012-05-17 Andreas Jaeger <[email protected]>

* sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
(HAVE_DL_DISCOVER_OSVERSION): Don't declare _dl_discover_osversion
only for older kernels.

2012-05-15 Joseph Myers <[email protected]>

* pthreadP.h [!__NR_set_robust_list] (__NR_set_robust_list): Do
Expand Down
6 changes: 2 additions & 4 deletions nptl/sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* System-specific settings for dynamic linker code. IA-32 version.
Copyright (C) 2002, 2003, 2008 Free Software Foundation, Inc.
Copyright (C) 2002-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
Expand Down Expand Up @@ -58,9 +58,7 @@ extern void _dl_sysinfo_int80 (void) attribute_hidden;
#endif


/* The _dl_discover_osversion function is so far only needed in sysconf
to check for kernels later than 2.6.23. */
#if !defined __ASSEMBLER__ && __LINUX_KERNEL_VERSION < 0x020617
#ifndef __ASSEMBLER__
/* Get version of the OS. */
extern int _dl_discover_osversion (void) attribute_hidden;
# define HAVE_DL_DISCOVER_OSVERSION 1
Expand Down
4 changes: 3 additions & 1 deletion sysdeps/i386/dl-machine.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. i386 version.
Copyright (C) 1995-2005, 2006, 2009, 2011 Free Software Foundation, Inc.
Copyright (C) 1995-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
Expand Down Expand Up @@ -333,7 +333,9 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
else
# endif /* !RTLD_BOOTSTRAP and have no -z combreloc */
{
# ifndef RTLD_BOOTSTRAP
const Elf32_Sym *const refsym = sym;
# endif
struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type);
Elf32_Addr value = sym_map == NULL ? 0 : sym_map->l_addr + sym->st_value;

Expand Down

0 comments on commit de7f5ce

Please sign in to comment.