diff --git a/src/security/security_dac.c b/src/security/security_dac.c index 365ab8b221..baa987ccf9 100644 --- a/src/security/security_dac.c +++ b/src/security/security_dac.c @@ -834,7 +834,7 @@ virSecurityDACRestoreSecurityAllLabel(virSecurityManagerPtr mgr, int migrated) { virSecurityDACDataPtr priv = virSecurityManagerGetPrivateData(mgr); - int i; + size_t i; int rc = 0; if (!priv->dynamicOwnership) @@ -904,7 +904,7 @@ virSecurityDACSetSecurityAllLabel(virSecurityManagerPtr mgr, const char *stdin_path ATTRIBUTE_UNUSED) { virSecurityDACDataPtr priv = virSecurityManagerGetPrivateData(mgr); - int i; + size_t i; uid_t user; gid_t group; diff --git a/src/security/security_driver.c b/src/security/security_driver.c index 7920b93644..d8a8283871 100644 --- a/src/security/security_driver.c +++ b/src/security/security_driver.c @@ -53,7 +53,7 @@ virSecurityDriverPtr virSecurityDriverLookup(const char *name, const char *virtDriver) { virSecurityDriverPtr drv = NULL; - int i; + size_t i; VIR_DEBUG("name=%s", NULLSTR(name)); diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c index 00ee41ed61..e3dce66a2d 100644 --- a/src/security/security_selinux.c +++ b/src/security/security_selinux.c @@ -1826,7 +1826,7 @@ virSecuritySELinuxRestoreSecurityAllLabel(virSecurityManagerPtr mgr, { virSecurityLabelDefPtr secdef; virSecuritySELinuxDataPtr data = virSecurityManagerGetPrivateData(mgr); - int i; + size_t i; int rc = 0; VIR_DEBUG("Restoring security label on %s", def->name); @@ -2227,7 +2227,7 @@ virSecuritySELinuxSetSecurityAllLabel(virSecurityManagerPtr mgr, virDomainDefPtr def, const char *stdin_path) { - int i; + size_t i; virSecuritySELinuxDataPtr data = virSecurityManagerGetPrivateData(mgr); virSecurityLabelDefPtr secdef; diff --git a/src/security/security_stack.c b/src/security/security_stack.c index 9afc6418d7..1e229d7e76 100644 --- a/src/security/security_stack.c +++ b/src/security/security_stack.c @@ -513,7 +513,8 @@ virSecurityStackGetNested(virSecurityManagerPtr mgr) virSecurityManagerPtr *list = NULL; virSecurityStackDataPtr priv = virSecurityManagerGetPrivateData(mgr); virSecurityStackItemPtr item; - int len = 0, i = 0; + int len = 0; + size_t i; for (item = priv->itemsHead; item; item = item->next) len++; @@ -521,7 +522,7 @@ virSecurityStackGetNested(virSecurityManagerPtr mgr) if (VIR_ALLOC_N(list, len + 1) < 0) return NULL; - for (item = priv->itemsHead; item; item = item->next, i++) + for (i = 0, item = priv->itemsHead; item; item = item->next, i++) list[i] = item->securityManager; list[len] = NULL; diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c index 432f059067..b9282b4efe 100644 --- a/src/security/virt-aa-helper.c +++ b/src/security/virt-aa-helper.c @@ -498,7 +498,7 @@ valid_name(const char *name) static int array_starts_with(const char *str, const char * const *arr, const long size) { - int i; + size_t i; for (i = 0; i < size; i++) { if (strlen(str) < strlen(arr[i])) continue; @@ -890,7 +890,7 @@ get_files(vahControl * ctl) { virBuffer buf = VIR_BUFFER_INITIALIZER; int rc = -1; - int i; + size_t i; char *uuid; char uuidstr[VIR_UUID_STRING_BUFLEN];