libselinux/utils: use type safe union assignment

selinux_check_access.c:43:10: warning: cast to union type is a GNU extension [-Wgnu-union-cast]
       43 |                                      (union selinux_callback)cb_auditinfo);
          |                                      ^                       ~~~~~~~~~~~~

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
Acked-by: James Carter <jwcart2@gmail.com>
This commit is contained in:
Christian Göttsche 2023-08-09 19:55:12 +02:00 committed by James Carter
parent 92b1e5b660
commit f1a8afc272
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ int main(int argc, char **argv)
if (audit_msg)
selinux_set_callback(SELINUX_CB_AUDIT,
(union selinux_callback)cb_auditinfo);
(union selinux_callback) { .func_audit = cb_auditinfo });
rc = selinux_check_access(argv[optind], argv[optind + 1],
argv[optind + 2], argv[optind + 3],