libltdl: fix gcc compiler warning for unused attributes.

* libltdl/ltdl.c, libltdl/loaders/dld_link.c,
libltdl/loaders/dlopen.c, libltdl/loaders/dyld.c,
libltdl/loaders/load_add_on.c, libltdl/loaders/loadlibrary.c,
libltdl/loaders/preopen.c, libltdl/loaders/shl_load.c: For at
least gcc 4.8.3 and 4.9.1, __attribute__((__unused)) should
follow the unused parameter declaration.
* NO-THANKS: Add Дилян Палаузов.
Reported by Дилян Палаузов

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
This commit is contained in:
Gary V. Vaughan 2014-12-04 17:17:11 +00:00
parent 89049b76cf
commit 9f52eb3d6c
9 changed files with 34 additions and 33 deletions

View File

@ -138,3 +138,4 @@ Václav Zeman vhaisman@gmail.com
Warren Dodge warren.l.dodge@Tektronix.com Warren Dodge warren.l.dodge@Tektronix.com
Xavier Pianet xavier@xingo.com Xavier Pianet xavier@xingo.com
Юрий Андреевич Пухальский pooh@cryptopro.ru Юрий Андреевич Пухальский pooh@cryptopro.ru
Дилян Палаузов dilyan.palauzov@aegee.org

View File

@ -97,7 +97,7 @@ get_vtable (lt_user_data loader_data)
/* A function called through the vtable when this loader is no /* A function called through the vtable when this loader is no
longer needed by the application. */ longer needed by the application. */
static int static int
vl_exit (lt_user_data LT__UNUSED loader_data) vl_exit (lt_user_data loader_data LT__UNUSED)
{ {
vtable = NULL; vtable = NULL;
return 0; return 0;
@ -107,8 +107,8 @@ vl_exit (lt_user_data LT__UNUSED loader_data)
loader. Returns an opaque representation of the newly opened loader. Returns an opaque representation of the newly opened
module for processing with this loader's other vtable functions. */ module for processing with this loader's other vtable functions. */
static lt_module static lt_module
vm_open (lt_user_data LT__UNUSED loader_data, const char *filename, vm_open (lt_user_data loader_data LT__UNUSED, const char *filename,
lt_dladvise LT__UNUSED advise) lt_dladvise advise LT__UNUSED)
{ {
lt_module module = lt__strdup (filename); lt_module module = lt__strdup (filename);
@ -124,7 +124,7 @@ vm_open (lt_user_data LT__UNUSED loader_data, const char *filename,
/* A function called through the vtable when a particular module /* A function called through the vtable when a particular module
should be unloaded. */ should be unloaded. */
static int static int
vm_close (lt_user_data LT__UNUSED loader_data, lt_module module) vm_close (lt_user_data loader_data LT__UNUSED, lt_module module)
{ {
int errors = 0; int errors = 0;
@ -144,7 +144,7 @@ vm_close (lt_user_data LT__UNUSED loader_data, lt_module module)
/* A function called through the vtable to get the address of /* A function called through the vtable to get the address of
a symbol loaded from a particular module. */ a symbol loaded from a particular module. */
static void * static void *
vm_sym (lt_user_data LT__UNUSED loader_data, lt_module LT__UNUSED module, vm_sym (lt_user_data loader_data LT__UNUSED, lt_module module LT__UNUSED,
const char *name) const char *name)
{ {
void *address = dld_get_func (name); void *address = dld_get_func (name);

View File

@ -152,7 +152,7 @@ get_vtable (lt_user_data loader_data)
/* A function called through the vtable when this loader is no /* A function called through the vtable when this loader is no
longer needed by the application. */ longer needed by the application. */
static int static int
vl_exit (lt_user_data LT__UNUSED loader_data) vl_exit (lt_user_data loader_data LT__UNUSED)
{ {
vtable = NULL; vtable = NULL;
return 0; return 0;
@ -163,7 +163,7 @@ vl_exit (lt_user_data LT__UNUSED loader_data)
loader. Returns an opaque representation of the newly opened loader. Returns an opaque representation of the newly opened
module for processing with this loader's other vtable functions. */ module for processing with this loader's other vtable functions. */
static lt_module static lt_module
vm_open (lt_user_data LT__UNUSED loader_data, const char *filename, vm_open (lt_user_data loader_data LT__UNUSED, const char *filename,
lt_dladvise advise) lt_dladvise advise)
{ {
int module_flags = LT_LAZY_OR_NOW; int module_flags = LT_LAZY_OR_NOW;
@ -245,7 +245,7 @@ vm_open (lt_user_data LT__UNUSED loader_data, const char *filename,
/* A function called through the vtable when a particular module /* A function called through the vtable when a particular module
should be unloaded. */ should be unloaded. */
static int static int
vm_close (lt_user_data LT__UNUSED loader_data, lt_module module) vm_close (lt_user_data loader_data LT__UNUSED, lt_module module)
{ {
int errors = 0; int errors = 0;
@ -262,7 +262,7 @@ vm_close (lt_user_data LT__UNUSED loader_data, lt_module module)
/* A function called through the vtable to get the address of /* A function called through the vtable to get the address of
a symbol loaded from a particular module. */ a symbol loaded from a particular module. */
static void * static void *
vm_sym (lt_user_data LT__UNUSED loader_data, lt_module module, const char *name) vm_sym (lt_user_data loader_data LT__UNUSED, lt_module module, const char *name)
{ {
void *address = dlsym (module, name); void *address = dlsym (module, name);

View File

@ -185,7 +185,7 @@ static int dyld_cannot_close = 0;
/* A function called through the vtable when this loader is no /* A function called through the vtable when this loader is no
longer needed by the application. */ longer needed by the application. */
static int static int
vl_exit (lt_user_data LT__UNUSED loader_data) vl_exit (lt_user_data loader_data LT__UNUSED)
{ {
vtable = NULL; vtable = NULL;
return 0; return 0;
@ -226,7 +226,7 @@ vl_init (lt_user_data loader_data)
module for processing with this loader's other vtable functions. */ module for processing with this loader's other vtable functions. */
static lt_module static lt_module
vm_open (lt_user_data loader_data, const char *filename, vm_open (lt_user_data loader_data, const char *filename,
lt_dladvise LT__UNUSED advise) lt_dladvise advise LT__UNUSED)
{ {
lt_module module = 0; lt_module module = 0;
NSObjectFileImage ofi = 0; NSObjectFileImage ofi = 0;

View File

@ -95,7 +95,7 @@ get_vtable (lt_user_data loader_data)
/* A function called through the vtable when this loader is no /* A function called through the vtable when this loader is no
longer needed by the application. */ longer needed by the application. */
static int static int
vl_exit (lt_user_data LT__UNUSED loader_data) vl_exit (lt_user_data loader_data LT__UNUSED)
{ {
vtable = NULL; vtable = NULL;
return 0; return 0;
@ -105,8 +105,8 @@ vl_exit (lt_user_data LT__UNUSED loader_data)
loader. Returns an opaque representation of the newly opened loader. Returns an opaque representation of the newly opened
module for processing with this loader's other vtable functions. */ module for processing with this loader's other vtable functions. */
static lt_module static lt_module
vm_open (lt_user_data LT__UNUSED loader_data, const char *filename, vm_open (lt_user_data loader_data LT__UNUSED, const char *filename,
lt_dladvise LT__UNUSED advise) lt_dladvise advise LT__UNUSED)
{ {
image_id image = 0; image_id image = 0;
@ -135,7 +135,7 @@ vm_open (lt_user_data LT__UNUSED loader_data, const char *filename,
/* A function called through the vtable when a particular module /* A function called through the vtable when a particular module
should be unloaded. */ should be unloaded. */
static int static int
vm_close (lt_user_data LT__UNUSED loader_data, lt_module module) vm_close (lt_user_data loader_data LT__UNUSED, lt_module module)
{ {
int errors = 0; int errors = 0;
@ -152,7 +152,7 @@ vm_close (lt_user_data LT__UNUSED loader_data, lt_module module)
/* A function called through the vtable to get the address of /* A function called through the vtable to get the address of
a symbol loaded from a particular module. */ a symbol loaded from a particular module. */
static void * static void *
vm_sym (lt_user_data LT__UNUSED loader_data, lt_module module, const char *name) vm_sym (lt_user_data loader_data LT__UNUSED, lt_module module, const char *name)
{ {
void *address = 0; void *address = 0;
image_id image = (image_id) module; image_id image = (image_id) module;

View File

@ -120,7 +120,7 @@ static char *error_message = 0;
/* A function called through the vtable when this loader is no /* A function called through the vtable when this loader is no
longer needed by the application. */ longer needed by the application. */
static int static int
vl_exit (lt_user_data LT__UNUSED loader_data) vl_exit (lt_user_data loader_data LT__UNUSED)
{ {
vtable = NULL; vtable = NULL;
LOCALFREE (error_message); LOCALFREE (error_message);
@ -131,8 +131,8 @@ vl_exit (lt_user_data LT__UNUSED loader_data)
loader. Returns an opaque representation of the newly opened loader. Returns an opaque representation of the newly opened
module for processing with this loader's other vtable functions. */ module for processing with this loader's other vtable functions. */
static lt_module static lt_module
vm_open (lt_user_data LT__UNUSED loader_data, const char *filename, vm_open (lt_user_data loader_data LT__UNUSED, const char *filename,
lt_dladvise LT__UNUSED advise) lt_dladvise advise LT__UNUSED)
{ {
lt_module module = 0; lt_module module = 0;
char *ext; char *ext;
@ -245,7 +245,7 @@ vm_open (lt_user_data LT__UNUSED loader_data, const char *filename,
/* A function called through the vtable when a particular module /* A function called through the vtable when a particular module
should be unloaded. */ should be unloaded. */
static int static int
vm_close (lt_user_data LT__UNUSED loader_data, lt_module module) vm_close (lt_user_data loader_data LT__UNUSED, lt_module module)
{ {
int errors = 0; int errors = 0;
@ -262,7 +262,7 @@ vm_close (lt_user_data LT__UNUSED loader_data, lt_module module)
/* A function called through the vtable to get the address of /* A function called through the vtable to get the address of
a symbol loaded from a particular module. */ a symbol loaded from a particular module. */
static void * static void *
vm_sym (lt_user_data LT__UNUSED loader_data, lt_module module, const char *name) vm_sym (lt_user_data loader_data LT__UNUSED, lt_module module, const char *name)
{ {
void *address = (void *) GetProcAddress ((HMODULE) module, name); void *address = (void *) GetProcAddress ((HMODULE) module, name);

View File

@ -113,7 +113,7 @@ static const lt_dlsymlist *default_preloaded_symbols = 0;
/* A function called through the vtable to initialise this loader. */ /* A function called through the vtable to initialise this loader. */
static int static int
vl_init (lt_user_data LT__UNUSED loader_data) vl_init (lt_user_data loader_data LT__UNUSED)
{ {
int errors = 0; int errors = 0;
@ -130,7 +130,7 @@ vl_init (lt_user_data LT__UNUSED loader_data)
/* A function called through the vtable when this loader is no /* A function called through the vtable when this loader is no
longer needed by the application. */ longer needed by the application. */
static int static int
vl_exit (lt_user_data LT__UNUSED loader_data) vl_exit (lt_user_data loader_data LT__UNUSED)
{ {
vtable = NULL; vtable = NULL;
free_symlists (); free_symlists ();
@ -142,8 +142,8 @@ vl_exit (lt_user_data LT__UNUSED loader_data)
loader. Returns an opaque representation of the newly opened loader. Returns an opaque representation of the newly opened
module for processing with this loader's other vtable functions. */ module for processing with this loader's other vtable functions. */
static lt_module static lt_module
vm_open (lt_user_data LT__UNUSED loader_data, const char *filename, vm_open (lt_user_data loader_data LT__UNUSED, const char *filename,
lt_dladvise LT__UNUSED advise) lt_dladvise advise LT__UNUSED)
{ {
symlist_chain *lists; symlist_chain *lists;
lt_module module = 0; lt_module module = 0;
@ -195,7 +195,7 @@ vm_open (lt_user_data LT__UNUSED loader_data, const char *filename,
/* A function called through the vtable when a particular module /* A function called through the vtable when a particular module
should be unloaded. */ should be unloaded. */
static int static int
vm_close (lt_user_data LT__UNUSED loader_data, lt_module LT__UNUSED module) vm_close (lt_user_data loader_data LT__UNUSED, lt_module module LT__UNUSED)
{ {
/* Just to silence gcc -Wall */ /* Just to silence gcc -Wall */
module = 0; module = 0;
@ -206,7 +206,7 @@ vm_close (lt_user_data LT__UNUSED loader_data, lt_module LT__UNUSED module)
/* A function called through the vtable to get the address of /* A function called through the vtable to get the address of
a symbol loaded from a particular module. */ a symbol loaded from a particular module. */
static void * static void *
vm_sym (lt_user_data LT__UNUSED loader_data, lt_module module, const char *name) vm_sym (lt_user_data loader_data LT__UNUSED, lt_module module, const char *name)
{ {
lt_dlsymlist *symbol = (lt_dlsymlist*) module; lt_dlsymlist *symbol = (lt_dlsymlist*) module;

View File

@ -138,7 +138,7 @@ get_vtable (lt_user_data loader_data)
/* A function called through the vtable when this loader is no /* A function called through the vtable when this loader is no
longer needed by the application. */ longer needed by the application. */
static int static int
vl_exit (lt_user_data LT__UNUSED loader_data) vl_exit (lt_user_data loader_data LT__UNUSED)
{ {
vtable = NULL; vtable = NULL;
return 0; return 0;
@ -148,8 +148,8 @@ vl_exit (lt_user_data LT__UNUSED loader_data)
loader. Returns an opaque representation of the newly opened loader. Returns an opaque representation of the newly opened
module for processing with this loader's other vtable functions. */ module for processing with this loader's other vtable functions. */
static lt_module static lt_module
vm_open (lt_user_data LT__UNUSED loader_data, const char *filename, vm_open (lt_user_data loader_data LT__UNUSED, const char *filename,
lt_dladvise LT__UNUSED advise) lt_dladvise advise LT__UNUSED)
{ {
static shl_t self = (shl_t) 0; static shl_t self = (shl_t) 0;
lt_module module = shl_load (filename, LT_BIND_FLAGS, 0L); lt_module module = shl_load (filename, LT_BIND_FLAGS, 0L);
@ -184,7 +184,7 @@ vm_open (lt_user_data LT__UNUSED loader_data, const char *filename,
/* A function called through the vtable when a particular module /* A function called through the vtable when a particular module
should be unloaded. */ should be unloaded. */
static int static int
vm_close (lt_user_data LT__UNUSED loader_data, lt_module module) vm_close (lt_user_data loader_data LT__UNUSED, lt_module module)
{ {
int errors = 0; int errors = 0;
@ -201,7 +201,7 @@ vm_close (lt_user_data LT__UNUSED loader_data, lt_module module)
/* A function called through the vtable to get the address of /* A function called through the vtable to get the address of
a symbol loaded from a particular module. */ a symbol loaded from a particular module. */
static void * static void *
vm_sym (lt_user_data LT__UNUSED loader_data, lt_module module, const char *name) vm_sym (lt_user_data loader_data LT__UNUSED, lt_module module, const char *name)
{ {
void *address = 0; void *address = 0;

View File

@ -815,7 +815,7 @@ find_handle (const char *search_path, const char *base_name,
#if !defined LTDL_DLOPEN_DEPLIBS #if !defined LTDL_DLOPEN_DEPLIBS
static int static int
load_deplibs (lt_dlhandle handle, char * LT__UNUSED deplibs) load_deplibs (lt_dlhandle handle, char * deplibs LT__UNUSED)
{ {
handle->depcount = 0; handle->depcount = 0;
return 0; return 0;