]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4/libcli/clideltree.c: clang: Value stored to 'status' is never read
authorNoel Power <noel.power@suse.com>
Thu, 8 Aug 2019 14:10:30 +0000 (15:10 +0100)
committerNoel Power <npower@samba.org>
Wed, 25 Sep 2019 09:47:31 +0000 (09:47 +0000)
Fixes:

source4/libcli/clideltree.c:113:3: warning: Value stored to 'status' is never read <--[clang]

status = smbcli_setatr(tree, dname, FILE_ATTRIBUTE_NORMAL, 0);
                ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
source4/libcli/clideltree.c:131:3: warning: Value stored to 'status' is never read <--[clang]
                status = smbcli_setatr(dstate.tree, dname, FILE_ATTRIBUTE_NORMAL, 0);
                ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
source4/libcli/clideltree.c

index e8007f4495a2f8843fe796d281a9f8436379dc69..01b33313213dfd93450a5ea93a7fee1bbf9657b8 100644 (file)
@@ -110,7 +110,7 @@ int smbcli_deltree(struct smbcli_tree *tree, const char *dname)
        }
        if (NT_STATUS_EQUAL(status, NT_STATUS_CANNOT_DELETE)) {
                /* it could be read-only */
-               status = smbcli_setatr(tree, dname, FILE_ATTRIBUTE_NORMAL, 0);
+               smbcli_setatr(tree, dname, FILE_ATTRIBUTE_NORMAL, 0);
                if (NT_STATUS_IS_OK(smbcli_unlink(tree, dname))) {
                        return 1;
                }
@@ -128,7 +128,7 @@ int smbcli_deltree(struct smbcli_tree *tree, const char *dname)
        status = smbcli_rmdir(dstate.tree, dname);
        if (NT_STATUS_EQUAL(status, NT_STATUS_CANNOT_DELETE)) {
                /* it could be read-only */
-               status = smbcli_setatr(dstate.tree, dname, FILE_ATTRIBUTE_NORMAL, 0);
+               smbcli_setatr(dstate.tree, dname, FILE_ATTRIBUTE_NORMAL, 0);
                status = smbcli_rmdir(dstate.tree, dname);
        }
        if (NT_STATUS_IS_ERR(status)) {