]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
source4/torture: Avoid unused variable
authorMartin Schwenke <martin@meltin.net>
Tue, 15 Feb 2022 21:50:24 +0000 (08:50 +1100)
committerVolker Lendecke <vl@samba.org>
Thu, 17 Feb 2022 18:12:52 +0000 (18:12 +0000)
clang complains:

../../source4/torture/basic/delete.c:2342:7: error: variable 'correct' set but not used [-Werror,-Wunused-but-set-variable]
        bool correct = true;
             ^

That is, the variable is initialised and updated but the value is
never used.  Similar functions return this variable, so try that.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
source4/torture/basic/delete.c

index d14d5a557467d86676dae37634968b862a25bc97..201ebfda60c72ed224634f5663e071aea8880ef3 100644 (file)
@@ -2387,7 +2387,7 @@ static bool deltest23(struct torture_context *tctx,
        torture_assert_ntstatus_equal(tctx, smbcli_nt_error(cli1->tree),
            NT_STATUS_DELETE_PENDING, "smbcli_open failed");
 
-       return true;
+       return correct;
 }
 
 /* Test 24 ... */