From: Noel Power Date: Mon, 29 Jul 2019 11:44:26 +0000 (+0000) Subject: s4/libcli/smb2: clang: Fix 'value stored to 'status' is never read' X-Git-Tag: talloc-2.3.1~683 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ba55c0220767358656be125e6cecedef97317e9f;p=thirdparty%2Fsamba.git s4/libcli/smb2: clang: Fix 'value stored to 'status' is never read' Fixes: source4/libcli/smb2/util.c:134:3: warning: Value stored to 'status' is never read <--[clang] status = smb2_util_setatr(tree, dname, FILE_ATTRIBUTE_NORMAL); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ source4/libcli/smb2/util.c:187:5: warning: Value stored to 'status' is never read <--[clang] status = smb2_util_setatr(tree, name, FILE_ATTRIBUTE_NORMAL); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ source4/libcli/smb2/util.c:209:3: warning: Value stored to 'status' is never read <--[clang] status = smb2_util_setatr(tree, dname, FILE_ATTRIBUTE_NORMAL); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3 warnings generated. Signed-off-by: Noel Power Reviewed-by: Andreas Schneider --- diff --git a/source4/libcli/smb2/util.c b/source4/libcli/smb2/util.c index e28c910fb23..94072bee3ea 100644 --- a/source4/libcli/smb2/util.c +++ b/source4/libcli/smb2/util.c @@ -131,7 +131,7 @@ int smb2_deltree(struct smb2_tree *tree, const char *dname) if (NT_STATUS_EQUAL(status, NT_STATUS_CANNOT_DELETE)) { /* it could be read-only */ - status = smb2_util_setatr(tree, dname, FILE_ATTRIBUTE_NORMAL); + smb2_util_setatr(tree, dname, FILE_ATTRIBUTE_NORMAL); status = smb2_util_unlink(tree, dname); } if (NT_STATUS_IS_OK(status)) { @@ -184,7 +184,7 @@ int smb2_deltree(struct smb2_tree *tree, const char *dname) status = smb2_util_unlink(tree, name); if (NT_STATUS_EQUAL(status, NT_STATUS_CANNOT_DELETE)) { /* it could be read-only */ - status = smb2_util_setatr(tree, name, FILE_ATTRIBUTE_NORMAL); + smb2_util_setatr(tree, name, FILE_ATTRIBUTE_NORMAL); status = smb2_util_unlink(tree, name); } @@ -206,7 +206,7 @@ int smb2_deltree(struct smb2_tree *tree, const char *dname) status = smb2_util_rmdir(tree, dname); if (NT_STATUS_EQUAL(status, NT_STATUS_CANNOT_DELETE)) { /* it could be read-only */ - status = smb2_util_setatr(tree, dname, FILE_ATTRIBUTE_NORMAL); + smb2_util_setatr(tree, dname, FILE_ATTRIBUTE_NORMAL); status = smb2_util_rmdir(tree, dname); }