checkpolicy: fix gcc -Wunused-variable warnings

Add __attribute__ ((unused)) to unused function parameters.

Acked-by: Steve Lawrence <slawrence@tresys.com>
This commit is contained in:
Nicolas Iooss 2014-09-14 23:41:50 +02:00 committed by Steve Lawrence
parent c4a4a1a7ed
commit 5af8c5adb2
3 changed files with 6 additions and 6 deletions

View File

@ -361,7 +361,7 @@ int change_bool(char *name, int state)
return 0;
}
static int check_level(hashtab_key_t key, hashtab_datum_t datum, void *arg)
static int check_level(hashtab_key_t key, hashtab_datum_t datum, void *arg __attribute__ ((unused)))
{
level_datum_t *levdatum = (level_datum_t *) datum;

View File

@ -1446,7 +1446,7 @@ int begin_optional(int pass)
return -1;
}
int end_optional(int pass)
int end_optional(int pass __attribute__ ((unused)))
{
/* once nested conditionals are allowed, do the stack unfolding here */
pop_stack();

View File

@ -995,7 +995,7 @@ int define_category(void)
return -1;
}
static int clone_level(hashtab_key_t key, hashtab_datum_t datum, void *arg)
static int clone_level(hashtab_key_t key __attribute__ ((unused)), hashtab_datum_t datum, void *arg)
{
level_datum_t *levdatum = (level_datum_t *) datum;
mls_level_t *level = (mls_level_t *) arg, *newlevel;
@ -2123,8 +2123,8 @@ role_datum_t *merge_roles_dom(role_datum_t * r1, role_datum_t * r2)
}
/* This function eliminates the ordering dependency of role dominance rule */
static int dominate_role_recheck(hashtab_key_t key, hashtab_datum_t datum,
void *arg)
static int dominate_role_recheck(hashtab_key_t key __attribute__ ((unused)),
hashtab_datum_t datum, void *arg)
{
role_datum_t *rdp = (role_datum_t *) arg;
role_datum_t *rdatum = (role_datum_t *) datum;
@ -3443,7 +3443,7 @@ static int parse_categories(char *id, level_datum_t * levdatum, ebitmap_t * cats
return 0;
}
static int parse_semantic_categories(char *id, level_datum_t * levdatum,
static int parse_semantic_categories(char *id, level_datum_t * levdatum __attribute__ ((unused)),
mls_semantic_cat_t ** cats)
{
cat_datum_t *cdatum;