The branch, master has been updated via 84fae0ed1bb s3: passdb: ret doesn't seem to be needed at all via ee6300470dc s3/libsmb: clang: Fix 'Value stored during its initialization is never read' from 63c9147f863 winbind: provide passwd struct for group sid with ID_TYPE_BOTH mapping (again)
https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 84fae0ed1bb7f2ec1fad8011d42211582e46565a Author: Noel Power <noel.po...@suse.com> Date: Fri Sep 27 08:07:24 2019 +0100 s3: passdb: ret doesn't seem to be needed at all I was looking at the wrong hunk when examining this, ret seems redundant and the existing status can cover things Signed-off-by: Noel Power <noel.po...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> Autobuild-User(master): Jeremy Allison <j...@samba.org> Autobuild-Date(master): Tue Oct 1 00:28:44 UTC 2019 on sn-devel-184 commit ee6300470dc6113ac4d8a9fbb450da876eb0b07a Author: Noel Power <noel.po...@suse.com> Date: Thu Aug 15 14:50:33 2019 +0100 s3/libsmb: clang: Fix 'Value stored during its initialization is never read' Fixes: source3/libsmb/cliconnect.c:1877:11: warning: Value stored to 'status' during its initialization is never read <--[clang] NTSTATUS status = NT_STATUS_NO_MEMORY; Signed-off-by: Noel Power <noel.po...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> ----------------------------------------------------------------------- Summary of changes: source3/libsmb/cliconnect.c | 2 +- source3/passdb/pdb_ldap.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index 055e1c57639..b6accbab4df 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -1904,7 +1904,7 @@ NTSTATUS cli_session_setup_creds(struct cli_state *cli, NTSTATUS cli_session_setup_anon(struct cli_state *cli) { - NTSTATUS status = NT_STATUS_NO_MEMORY; + NTSTATUS status; struct cli_credentials *creds = NULL; creds = cli_credentials_init_anon(cli); diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index aefd770ad31..e9b01e57c6c 100644 --- a/source3/passdb/pdb_ldap.c +++ b/source3/passdb/pdb_ldap.c @@ -2119,7 +2119,6 @@ static NTSTATUS ldapsam_rename_sam_account(struct pdb_methods *my_methods, static NTSTATUS ldapsam_add_sam_account(struct pdb_methods *my_methods, struct samu * newpwd) { - NTSTATUS ret = NT_STATUS_UNSUCCESSFUL; struct ldapsam_privates *ldap_state = (struct ldapsam_privates *)my_methods->private_data; int rc; LDAPMessage *result = NULL; @@ -2338,8 +2337,8 @@ static NTSTATUS ldapsam_add_sam_account(struct pdb_methods *my_methods, struct s break; } - ret = ldapsam_modify_entry(my_methods,newpwd,dn,mods,ldap_op, pdb_element_is_set_or_changed); - if (!NT_STATUS_IS_OK(ret)) { + status = ldapsam_modify_entry(my_methods,newpwd,dn,mods,ldap_op, pdb_element_is_set_or_changed); + if (!NT_STATUS_IS_OK(status)) { DEBUG(0,("ldapsam_add_sam_account: failed to modify/add user with uid = %s (dn = %s)\n", pdb_get_username(newpwd),dn)); ldap_mods_free(mods, true); -- Samba Shared Repository