]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:winbind: Remove unused variable
authorAndreas Schneider <asn@samba.org>
Fri, 3 Feb 2023 13:38:48 +0000 (14:38 +0100)
committerJeremy Allison <jra@samba.org>
Mon, 6 Feb 2023 22:51:31 +0000 (22:51 +0000)
source3/winbindd/winbindd_ads.c:1399:6: error: variable 'ret_count' set but not
    used [-Werror,-Wunused-but-set-variable]
        int ret_count;
            ^

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/winbindd/winbindd_ads.c

index 7d45355f24575eee197c8845052004f7db9cf474..942159f5df8f40bd506bbe12fe7f6f0a537faa22 100644 (file)
@@ -1396,7 +1396,6 @@ static NTSTATUS trusted_domains(struct winbindd_domain *domain,
        uint32_t                i;
        uint32_t                flags;
        struct rpc_pipe_client *cli;
-       int ret_count;
        struct dcerpc_binding_handle *b;
 
        DEBUG(3,("ads: trusted_domains\n"));
@@ -1444,7 +1443,6 @@ static NTSTATUS trusted_domains(struct winbindd_domain *domain,
 
        /* Copy across names and sids */
 
-       ret_count = 0;
        for (i = 0; i < trusts->count; i++) {
                struct netr_DomainTrust *trust = &trusts->array[i];
                struct winbindd_domain d;
@@ -1491,7 +1489,6 @@ static NTSTATUS trusted_domains(struct winbindd_domain *domain,
                        d.domain_trust_attribs = trust->trust_attributes;
 
                        wcache_tdc_add_domain( &d );
-                       ret_count++;
                } else if (domain_is_forest_root(domain)) {
                        /* Check if we already have this record. If
                         * we are following our forest root that is not
@@ -1513,7 +1510,6 @@ static NTSTATUS trusted_domains(struct winbindd_domain *domain,
                                        trust->trust_attributes;
 
                                wcache_tdc_add_domain( &d );
-                               ret_count++;
                        }
                        TALLOC_FREE(exist);
                } else {
@@ -1554,7 +1550,6 @@ static NTSTATUS trusted_domains(struct winbindd_domain *domain,
                        trust->trust_attributes = d.domain_trust_attribs;
 
                        wcache_tdc_add_domain( &d );
-                       ret_count++;
                }
        }
        return result;