mirror of
https://github.com/SELinuxProject/selinux
synced 2025-02-17 18:16:52 +00:00
libsepol: remove unused function and type
Fix the following build warning: policydb.c: In function ‘get_symtab_destroy_func’: policydb.c:1581:9: error: cast between incompatible function types from ‘int (*)(char *, void *, void *)’ to ‘void (*)(char *, void *, void *)’ [-Werror=cast-function-type] return (hashtab_destroy_func_t) destroy_f[sym_num]; ^ It turns out that this function and type are long unused in libsepol and are not exported APIs for the shared library, so just remove them. Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
This commit is contained in:
parent
dc03bae194
commit
38e49c7187
@ -646,9 +646,6 @@ extern int policydb_context_isvalid(const policydb_t * p,
|
||||
|
||||
extern void symtabs_destroy(symtab_t * symtab);
|
||||
extern int scope_destroy(hashtab_key_t key, hashtab_datum_t datum, void *p);
|
||||
typedef void (*hashtab_destroy_func_t) (hashtab_key_t k, hashtab_datum_t d,
|
||||
void *args);
|
||||
extern hashtab_destroy_func_t get_symtab_destroy_func(int sym_num);
|
||||
|
||||
extern void class_perm_node_init(class_perm_node_t * x);
|
||||
extern void type_set_init(type_set_t * x);
|
||||
|
@ -1573,14 +1573,6 @@ int scope_destroy(hashtab_key_t key, hashtab_datum_t datum, void *p
|
||||
return 0;
|
||||
}
|
||||
|
||||
hashtab_destroy_func_t get_symtab_destroy_func(int sym_num)
|
||||
{
|
||||
if (sym_num < 0 || sym_num >= SYM_NUM) {
|
||||
return NULL;
|
||||
}
|
||||
return (hashtab_destroy_func_t) destroy_f[sym_num];
|
||||
}
|
||||
|
||||
/*
|
||||
* Load the initial SIDs specified in a policy database
|
||||
* structure into a SID table.
|
||||
|
Loading…
Reference in New Issue
Block a user