mirror of
https://github.com/topjohnwu/selinux.git
synced 2024-12-13 22:48:49 +00:00
Author: "Justin P. Mattock"
Email: justinmattock@gmail.com Subject: libsemanage Fix warning: parameter 'key' set but not used(and others) Date: Tue, 6 Jul 2010 15:23:30 -0700 libsemanage produced no errors with the warnings, Im just noticing big hunks of sections with warning messages: database_llist.c: In function 'dbase_llist_add': database_llist.c:150:28: warning: parameter 'key' set but not used database_llist.c: In function 'dbase_llist_count': database_llist.c:221:50: warning: parameter 'handle' set but not used database_llist.c: In function 'dbase_llist_del': database_llist.c:278:41: warning: parameter 'handle' set but not used (and so on...) so add the GCC attribute to quiet these warnings since most go to NULL; Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Chad Sellers <csellers@tresys.com>
This commit is contained in:
parent
033959726b
commit
f7dd4ca760
@ -147,7 +147,8 @@ int dbase_llist_exists(semanage_handle_t * handle,
|
|||||||
|
|
||||||
int dbase_llist_add(semanage_handle_t * handle,
|
int dbase_llist_add(semanage_handle_t * handle,
|
||||||
dbase_llist_t * dbase,
|
dbase_llist_t * dbase,
|
||||||
const record_key_t * key, const record_t * data)
|
const record_key_t * key __attribute__ ((unused)),
|
||||||
|
const record_t * data)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (dbase_llist_cache_prepend(handle, dbase, data) < 0)
|
if (dbase_llist_cache_prepend(handle, dbase, data) < 0)
|
||||||
@ -218,7 +219,7 @@ int dbase_llist_modify(semanage_handle_t * handle,
|
|||||||
return STATUS_ERR;
|
return STATUS_ERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
hidden int dbase_llist_count(semanage_handle_t * handle,
|
hidden int dbase_llist_count(semanage_handle_t * handle __attribute__ ((unused)),
|
||||||
dbase_llist_t * dbase, unsigned int *response)
|
dbase_llist_t * dbase, unsigned int *response)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -275,7 +276,7 @@ int dbase_llist_iterate(semanage_handle_t * handle,
|
|||||||
return STATUS_ERR;
|
return STATUS_ERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbase_llist_del(semanage_handle_t * handle,
|
int dbase_llist_del(semanage_handle_t * handle __attribute__ ((unused)),
|
||||||
dbase_llist_t * dbase, const record_key_t * key)
|
dbase_llist_t * dbase, const record_key_t * key)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -177,7 +177,8 @@ static int dbase_policydb_cache(semanage_handle_t * handle,
|
|||||||
return STATUS_ERR;
|
return STATUS_ERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int dbase_policydb_flush(semanage_handle_t * handle,
|
static int dbase_policydb_flush(semanage_handle_t * handle
|
||||||
|
__attribute__ ((unused)),
|
||||||
dbase_policydb_t * dbase)
|
dbase_policydb_t * dbase)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -309,9 +310,12 @@ static int dbase_policydb_modify(semanage_handle_t * handle,
|
|||||||
return STATUS_ERR;
|
return STATUS_ERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int dbase_policydb_del(semanage_handle_t * handle,
|
static int dbase_policydb_del(semanage_handle_t * handle
|
||||||
dbase_policydb_t * dbase,
|
__attribute__ ((unused)),
|
||||||
const record_key_t * key)
|
dbase_policydb_t * dbase
|
||||||
|
__attribute__ ((unused)),
|
||||||
|
const record_key_t * key
|
||||||
|
__attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
|
|
||||||
/* Stub */
|
/* Stub */
|
||||||
@ -321,8 +325,10 @@ static int dbase_policydb_del(semanage_handle_t * handle,
|
|||||||
return STATUS_ERR;
|
return STATUS_ERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int dbase_policydb_clear(semanage_handle_t * handle,
|
static int dbase_policydb_clear(semanage_handle_t * handle
|
||||||
dbase_policydb_t * dbase)
|
__attribute__ ((unused)),
|
||||||
|
dbase_policydb_t * dbase
|
||||||
|
__attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
|
|
||||||
/* Stub */
|
/* Stub */
|
||||||
|
@ -51,7 +51,7 @@ hidden_def(semanage_msg_get_fname)
|
|||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
__attribute__ ((format(printf, 3, 4)))
|
__attribute__ ((format(printf, 3, 4)))
|
||||||
#endif
|
#endif
|
||||||
void hidden semanage_msg_default_handler(void *varg,
|
void hidden semanage_msg_default_handler(void *varg __attribute__ ((unused)),
|
||||||
semanage_handle_t * handle,
|
semanage_handle_t * handle,
|
||||||
const char *fmt, ...)
|
const char *fmt, ...)
|
||||||
{
|
{
|
||||||
|
@ -243,7 +243,8 @@ int semanage_direct_connect(semanage_handle_t * sh)
|
|||||||
return STATUS_ERR;
|
return STATUS_ERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void semanage_direct_destroy(semanage_handle_t * sh)
|
static void semanage_direct_destroy(semanage_handle_t * sh
|
||||||
|
__attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
/* do nothing */
|
/* do nothing */
|
||||||
sh = NULL;
|
sh = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user