From 388f280448b9ea459d8d884dbbbce54ab930da7b Mon Sep 17 00:00:00 2001 From: Noel Power Date: Fri, 6 Sep 2019 13:46:40 +0000 Subject: [PATCH] s3/passdb: clang: Fix warning: Value stored to 'acct_ctrl' is never read Fixes: source3/passdb/pdb_ldap.c:922:3: warning: Value stored to 'acct_ctrl' is never read <--[clang] acct_ctrl |= ACB_NORMAL; ^ ~~~~~~~~~~ Signed-off-by: Noel Power Reviewed-by: Jeremy Allison --- source3/passdb/pdb_ldap.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index 3dbc8f9f07a..aefd770ad31 100644 --- a/source3/passdb/pdb_ldap.c +++ b/source3/passdb/pdb_ldap.c @@ -491,7 +491,6 @@ static bool init_sam_from_ldap(struct ldapsam_privates *ldap_state, uint8_t smblmpwd[LM_HASH_LEN], smbntpwd[NT_HASH_LEN]; bool use_samba_attrs = True; - uint32_t acct_ctrl = 0; uint16_t logon_divs; uint16_t bad_password_count = 0, logon_count = 0; @@ -911,6 +910,7 @@ static bool init_sam_from_ldap(struct ldapsam_privates *ldap_state, LDAP_ATTR_ACB_INFO), ctx); if (temp) { + uint32_t acct_ctrl = 0; acct_ctrl = pdb_decode_acct_ctrl(temp); if (acct_ctrl == 0) { @@ -918,8 +918,6 @@ static bool init_sam_from_ldap(struct ldapsam_privates *ldap_state, } pdb_set_acct_ctrl(sampass, acct_ctrl, PDB_SET); - } else { - acct_ctrl |= ACB_NORMAL; } pdb_set_hours_len(sampass, hours_len, PDB_SET);