From 8368548636802907a3c37497bfbb2df9e5dcdcaa Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 24 Jan 2025 16:04:16 +0100 Subject: [PATCH] vfs: Align a few integer types Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- source3/modules/test_nfs4_acls.c | 32 ++++++++++++++++---------------- source3/modules/vfs_snapper.c | 8 ++++---- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/source3/modules/test_nfs4_acls.c b/source3/modules/test_nfs4_acls.c index f47ff9b6c1e..15b179af758 100644 --- a/source3/modules/test_nfs4_acls.c +++ b/source3/modules/test_nfs4_acls.c @@ -42,7 +42,7 @@ struct test_sids { static int group_setup(void **state) { struct dom_sid *sids = NULL; - int i; + size_t i; sids = talloc_array(NULL, struct dom_sid, ARRAY_SIZE(test_sids)); assert_non_null(sids); @@ -61,7 +61,7 @@ static int group_setup(void **state) static int group_teardown(void **state) { struct dom_sid *sids = *state; - int i; + size_t i; for (i = 0; i < ARRAY_SIZE(test_sids); i++) { assert_true(idmap_cache_del_sid(&sids[i])); @@ -80,7 +80,7 @@ static int group_teardown(void **state) static void test_cached_id_mappings(void **state) { struct dom_sid *sids = *state; - int i; + size_t i; for (i = 0; i < ARRAY_SIZE(test_sids); i++) { struct dom_sid *sid = &sids[i]; @@ -175,7 +175,7 @@ static void test_acl_type_nfs4_to_dacl(void **state) { struct dom_sid *sids = *state; TALLOC_CTX *frame = talloc_stackframe(); - int i; + size_t i; for (i = 0; i < ARRAY_SIZE(ace_dacl_type_mapping); i++) { struct SMB4ACL_T *nfs4_acl; @@ -222,7 +222,7 @@ static void test_acl_type_dacl_to_nfs4(void **state) { struct dom_sid *sids = *state; TALLOC_CTX *frame = talloc_stackframe(); - int i; + size_t i; for (i = 0; i < ARRAY_SIZE(ace_dacl_type_mapping); i++) { struct SMB4ACL_T *nfs4_acl; @@ -308,7 +308,7 @@ static void test_ace_flags_nfs4_to_dacl(void **state) struct dom_sid *sids = *state; TALLOC_CTX *frame = talloc_stackframe(); SMB_ACE4PROP_T nfs4_ace; - int i; + size_t i; for (i = 0; i < ARRAY_SIZE(ace_flags_nfs4_to_dacl); i++) { struct SMB4ACL_T *nfs4_acl; @@ -393,7 +393,7 @@ static void test_ace_flags_dacl_to_nfs4(void **state) { struct dom_sid *sids = *state; TALLOC_CTX *frame = talloc_stackframe(); - int i; + size_t i; for (i = 0; i < ARRAY_SIZE(ace_flags_dacl_to_nfs4); i++) { struct SMB4ACL_T *nfs4_acl; @@ -472,7 +472,7 @@ static void test_nfs4_permissions_to_dacl(void **state) { struct dom_sid *sids = *state; TALLOC_CTX *frame = talloc_stackframe(); - int i; + size_t i; for (i = 0; i < ARRAY_SIZE(perm_table_nfs4_to_dacl); i++) { struct SMB4ACL_T *nfs4_acl; @@ -576,7 +576,7 @@ static void test_dacl_permissions_to_nfs4(void **state) { struct dom_sid *sids = *state; TALLOC_CTX *frame = talloc_stackframe(); - int i; + size_t i; for (i = 0; i < ARRAY_SIZE(perm_table_nfs4_to_dacl); i++) { struct SMB4ACL_T *nfs4_acl; @@ -902,7 +902,7 @@ struct creator_ace_flags { static void test_dacl_creator_to_nfs4(void **state) { TALLOC_CTX *frame = talloc_stackframe(); - int i; + size_t i; for (i = 0; i < ARRAY_SIZE(creator_ace_flags); i++) { struct SMB4ACL_T *nfs4_acl; @@ -1004,7 +1004,7 @@ static void test_nfs4_to_dacl_creator(void **state) { struct dom_sid *sids = *state; TALLOC_CTX *frame = talloc_stackframe(); - int i; + size_t i; for (i = 0; i < ARRAY_SIZE(creator_owner_nfs4_to_dacl); i++) { struct SMB4ACL_T *nfs4_acl; @@ -1109,7 +1109,7 @@ static void test_full_control_nfs4_to_dacl(void **state) { struct dom_sid *sids = *state; TALLOC_CTX *frame = talloc_stackframe(); - int i; + size_t i; for (i = 0; i < ARRAY_SIZE(nfs4_to_dacl_full_control); i++) { struct SMB4ACL_T *nfs4_acl; @@ -1188,7 +1188,7 @@ static void test_dacl_to_nfs4_acedup_settings(void **state) { struct dom_sid *sids = *state; TALLOC_CTX *frame = talloc_stackframe(); - int i; + size_t i; for (i = 0; i < ARRAY_SIZE(acedup_settings); i++) { struct SMB4ACL_T *nfs4_acl; @@ -1345,7 +1345,7 @@ static void test_dacl_to_nfs4_acedup_match(void **state) { struct dom_sid *sids = *state; TALLOC_CTX *frame = talloc_stackframe(); - int i; + size_t i; for (i = 0; i < ARRAY_SIZE(acedup_match); i++) { struct SMB4ACL_T *nfs4_acl; @@ -1609,7 +1609,7 @@ static void test_nfs4_to_dacl_idmap_type_both(void **state) { struct dom_sid *sids = *state; TALLOC_CTX *frame = talloc_stackframe(); - int i; + size_t i; struct nfs_to_dacl_idmap_both nfs_to_dacl_idmap_both[] = { { 0, 1002, &sids[2] }, { SMB_ACE4_IDENTIFIER_GROUP, 1002, &sids[2] }, @@ -1681,7 +1681,7 @@ static void test_dacl_to_nfs4_idmap_type_both(void **state) { struct dom_sid *sids = *state; TALLOC_CTX *frame = talloc_stackframe(); - int i; + size_t i; struct dacl_to_nfs4_idmap_both dacl_to_nfs4_idmap_both[] = { { &sids[2], 0, diff --git a/source3/modules/vfs_snapper.c b/source3/modules/vfs_snapper.c index 566d574f0be..1a3f98bc246 100644 --- a/source3/modules/vfs_snapper.c +++ b/source3/modules/vfs_snapper.c @@ -78,7 +78,7 @@ static const struct { static NTSTATUS snapper_err_ntstatus_map(const char *snapper_err_str) { - int i; + size_t i; if (snapper_err_str == NULL) { return NT_STATUS_UNSUCCESSFUL; @@ -103,7 +103,7 @@ static NTSTATUS snapper_dbus_str_encode(TALLOC_CTX *mem_ctx, const char *in_str, { size_t in_len; char *out_str; - int i; + size_t i; int out_off; int out_len; @@ -155,7 +155,7 @@ static NTSTATUS snapper_dbus_str_decode(TALLOC_CTX *mem_ctx, const char *in_str, { size_t in_len; char *out_str; - int i; + size_t i; int out_off; int out_len; @@ -367,7 +367,7 @@ static NTSTATUS snapper_dict_unpack(TALLOC_CTX *mem_ctx, static void snapper_dict_array_print(uint32_t num_dicts, struct snapper_dict *dicts) { - int i; + size_t i; for (i = 0; i < num_dicts; i++) { DEBUG(10, ("dict (key: %s, val: %s)\n", -- 2.47.3