From: Christian Göttsche <cgzones@xxxxxxxxxxxxxx> The union stack_item_u is only used as a member in struct scope_stack, but actually never used. Signed-off-by: Christian Göttsche <cgzones@xxxxxxxxxxxxxx> --- checkpolicy/module_compiler.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/checkpolicy/module_compiler.c b/checkpolicy/module_compiler.c index e25a77b4..4efd77bf 100644 --- a/checkpolicy/module_compiler.c +++ b/checkpolicy/module_compiler.c @@ -21,14 +21,8 @@ #include "queue.h" #include "module_compiler.h" -union stack_item_u { - avrule_block_t *avrule; - cond_list_t *cond_list; -}; - typedef struct scope_stack { - union stack_item_u u; - int type; /* for above union: 1 = avrule block, 2 = conditional */ + int type; /* 1 = avrule block, 2 = conditional */ avrule_decl_t *decl; /* if in an avrule block, which * declaration is current */ avrule_t *last_avrule; @@ -1464,12 +1458,12 @@ static int push_stack(int stack_type, ...) va_start(ap, stack_type); switch (s->type = stack_type) { case 1:{ - s->u.avrule = va_arg(ap, avrule_block_t *); + va_arg(ap, avrule_block_t *); s->decl = va_arg(ap, avrule_decl_t *); break; } case 2:{ - s->u.cond_list = va_arg(ap, cond_list_t *); + va_arg(ap, cond_list_t *); break; } default: -- 2.43.0