s3/passdb: clang: Fix 'Value stored during initialization is never read'
authorNoel Power <noel.power@suse.com>
Fri, 6 Sep 2019 14:48:54 +0000 (14:48 +0000)
committerJeremy Allison <jra@samba.org>
Tue, 8 Oct 2019 02:40:24 +0000 (02:40 +0000)
Fixes:

source3/passdb/pdb_ldap.c:1933:11: warning: Value stored to 'ret' during its initialization is never read <--[clang]
        NTSTATUS ret = NT_STATUS_UNSUCCESSFUL;
                 ^~~   ~~~~~~~~~~~~~~~~~~~~~~
source3/passdb/pdb_ldap.c:4094:11: warning: Value stored to 'ntstatus' during its initialization is never read <--[clang]
        NTSTATUS ntstatus = NT_STATUS_UNSUCCESSFUL;
                 ^~~~~~~~   ~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Oct  8 02:40:24 UTC 2019 on sn-devel-184

source3/passdb/pdb_ldap.c

index e9b01e57c6c8af0c482044b28e7eff5ae02bdb5d..22050fa828c96456abb8044bc22435dc5ebdaffa 100644 (file)
@@ -1930,7 +1930,7 @@ static NTSTATUS ldapsam_delete_sam_account(struct pdb_methods *my_methods,
 
 static NTSTATUS ldapsam_update_sam_account(struct pdb_methods *my_methods, struct samu * newpwd)
 {
-       NTSTATUS ret = NT_STATUS_UNSUCCESSFUL;
+       NTSTATUS ret;
        struct ldapsam_privates *ldap_state = (struct ldapsam_privates *)my_methods->private_data;
        int rc = 0;
        char *dn;
@@ -4091,7 +4091,7 @@ static NTSTATUS ldapsam_get_account_policy(struct pdb_methods *methods,
                                           enum pdb_policy_type type,
                                           uint32_t *value)
 {
-       NTSTATUS ntstatus = NT_STATUS_UNSUCCESSFUL;
+       NTSTATUS ntstatus;
 
        if (cache_account_policy_get(type, value)) {
                DEBUG(11,("ldapsam_get_account_policy: got valid value from "