mirror of
https://github.com/SELinuxProject/selinux
synced 2025-02-18 02:26:59 +00:00
libsepol/cil: silence clang void-pointer-to-enum-cast warning
Add an intermediate cast to uintptr_t to silence the clang specific
warning about casting a void pointer to an enum.
../cil/src/cil_verify.c:1749:28: error: cast to smaller integer type 'enum cil_flavor' from 'void *' [-Werror,-Wvoid-pointer-to-enum-cast]
enum cil_flavor op = (enum cil_flavor)i->data;
^~~~~~~~~~~~~~~~~~~~~~~~
Similar to 32f8ed3d6b
.
Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
This commit is contained in:
parent
e0968a8640
commit
6c81478456
@ -1746,7 +1746,7 @@ static int __cil_verify_classperms(struct cil_list *classperms,
|
||||
goto exit;
|
||||
}
|
||||
} else {
|
||||
enum cil_flavor op = (enum cil_flavor)i->data;
|
||||
enum cil_flavor op = (enum cil_flavor)(uintptr_t)i->data;
|
||||
if (op == CIL_ALL) {
|
||||
struct cil_class *mc = cp->class;
|
||||
struct cil_list *perm_list;
|
||||
|
Loading…
Reference in New Issue
Block a user