diff --git a/libqpol/module_compiler.c b/libqpol/module_compiler.c index d0c8ba3..d9e54bb 100644 --- a/libqpol/module_compiler.c +++ b/libqpol/module_compiler.c @@ -709,7 +709,7 @@ int add_perm_to_class(uint32_t perm_value, uint32_t class_value) assert(class_value >= 1); scope = &decl->required; if (class_value > scope->class_perms_len) { - int i; + uint32_t i; ebitmap_t *new_map = realloc(scope->class_perms_map, class_value * sizeof(*new_map)); if (new_map == NULL) { @@ -1233,7 +1233,7 @@ int require_cat(int pass) static int is_scope_in_stack(scope_datum_t * scope, scope_stack_t * stack) { - int i; + uint32_t i; if (stack == NULL) { return 0; /* no matching scope found */ } @@ -1490,7 +1490,7 @@ int begin_optional_else(int pass) static int copy_requirements(avrule_decl_t * dest, scope_stack_t * stack) { - int i; + uint32_t i; if (stack == NULL) { return 0; } diff --git a/libqpol/policy_define.c b/libqpol/policy_define.c index d9c83bf..7c384e4 100644 --- a/libqpol/policy_define.c +++ b/libqpol/policy_define.c @@ -915,7 +915,7 @@ int define_sens(void) int define_dominance(void) { level_datum_t *datum; - int order; + uint32_t order; char *id; if (!mlspol) { diff --git a/libqpol/policy_extend.c b/libqpol/policy_extend.c index a374d14..945f4e9 100644 --- a/libqpol/policy_extend.c +++ b/libqpol/policy_extend.c @@ -539,7 +539,7 @@ static int qpol_policy_match_system(qpol_policy_t * policy) errno = error; return -1; } - if (policy->p->p.policyvers > kernvers) { + if (policy->p->p.policyvers > (unsigned)kernvers) { if (sepol_policydb_set_vers(policy->p, kernvers)) { error = errno; ERR(policy, "Could not downgrade policy to version %d.", kernvers);