From: Noel Power Date: Fri, 6 Sep 2019 14:48:54 +0000 (+0000) Subject: s3/passdb: clang: Fix 'Value stored during initialization is never read' X-Git-Tag: talloc-2.3.1~472 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7bceafe8401fdbf67c065d6799ea91d9667fd096;p=thirdparty%2Fsamba.git s3/passdb: clang: Fix 'Value stored during initialization is never read' 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 Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Tue Oct 8 02:40:24 UTC 2019 on sn-devel-184 --- diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index e9b01e57c6c..22050fa828c 100644 --- a/source3/passdb/pdb_ldap.c +++ b/source3/passdb/pdb_ldap.c @@ -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 "