mirror of
https://github.com/SELinuxProject/selinux
synced 2025-04-17 21:05:22 +00:00
checkpolicy: drop incorrect cast
The function require_symbol takes the type hashtab_datum_t (alias void*) as third argument. Do not cast to hashtab_datum_t* alias void**. Since explicit casting to void* is unnecessary, drop the casts. module_compiler.c:1002:36: warning: cast from 'cond_bool_datum_t *' (aka 'struct cond_bool_datum *') to 'hashtab_datum_t *' (aka 'void **') increases required alignment from 4 to 8 [-Wcast-align] require_symbol(SYM_BOOLS, id, (hashtab_datum_t *) booldatum, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ module_compiler.c:1092:40: warning: cast from 'cat_datum_t *' (aka 'struct cat_datum *') to 'hashtab_datum_t *' (aka 'void **') increases required alignment from 4 to 8 [-Wcast-align] retval = require_symbol(SYM_CATS, id, (hashtab_datum_t *) cat, ^~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
This commit is contained in:
parent
7a1c7e7a82
commit
44ed3074bb
@ -999,7 +999,7 @@ static int require_bool_tunable(int pass, int is_tunable)
|
||||
if (is_tunable)
|
||||
booldatum->flags |= COND_BOOL_FLAGS_TUNABLE;
|
||||
retval =
|
||||
require_symbol(SYM_BOOLS, id, (hashtab_datum_t *) booldatum,
|
||||
require_symbol(SYM_BOOLS, id, booldatum,
|
||||
&booldatum->s.value, &booldatum->s.value);
|
||||
if (retval != 0) {
|
||||
cond_destroy_bool(id, booldatum, NULL);
|
||||
@ -1051,7 +1051,7 @@ int require_sens(int pass)
|
||||
return -1;
|
||||
}
|
||||
mls_level_init(level->level);
|
||||
retval = require_symbol(SYM_LEVELS, id, (hashtab_datum_t *) level,
|
||||
retval = require_symbol(SYM_LEVELS, id, level,
|
||||
&level->level->sens, &level->level->sens);
|
||||
if (retval != 0) {
|
||||
free(id);
|
||||
@ -1089,7 +1089,7 @@ int require_cat(int pass)
|
||||
}
|
||||
cat_datum_init(cat);
|
||||
|
||||
retval = require_symbol(SYM_CATS, id, (hashtab_datum_t *) cat,
|
||||
retval = require_symbol(SYM_CATS, id, cat,
|
||||
&cat->s.value, &cat->s.value);
|
||||
if (retval != 0) {
|
||||
free(id);
|
||||
|
Loading…
Reference in New Issue
Block a user