checkpolicy: fix gcc -Wsign-compare warnings
Acked-by: Steve Lawrence <slawrence@tresys.com>
diff --git a/checkpolicy/checkpolicy.c b/checkpolicy/checkpolicy.c
index 9881dd7..7fa37af 100644
--- a/checkpolicy/checkpolicy.c
+++ b/checkpolicy/checkpolicy.c
@@ -291,7 +291,7 @@
int display_bools()
{
- int i;
+ uint32_t i;
for (i = 0; i < policydbp->p_bools.nprim; i++) {
printf("%s : %d\n", policydbp->p_bool_val_to_name[i],
diff --git a/checkpolicy/module_compiler.c b/checkpolicy/module_compiler.c
index 8ac81f7..463d042 100644
--- a/checkpolicy/module_compiler.c
+++ b/checkpolicy/module_compiler.c
@@ -701,7 +701,7 @@
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) {
@@ -1225,7 +1225,7 @@
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 */
}
@@ -1482,7 +1482,7 @@
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/checkpolicy/policy_define.c b/checkpolicy/policy_define.c
index 7e6091e..92cb824 100644
--- a/checkpolicy/policy_define.c
+++ b/checkpolicy/policy_define.c
@@ -828,7 +828,7 @@
int define_dominance(void)
{
level_datum_t *datum;
- int order;
+ uint32_t order;
char *id;
if (!mlspol) {