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

../../source4/torture/basic/denytest.c:1805:11: error: variable 'tdif' set but not used [-Werror,-Wunused-but-set-variable]
                int64_t tdif;
                        ^

That is, the variable is initialised and updated but the value is
never used.

Perhaps it is meant to be used in the nearby torture_comment() call,
but it has been this was since commit
cb1cff90f165d82cbbf1dd87e475a1b13984d45e from 2004.  Just drop it.

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

index 8e7a822df09e93dfedd698905e0327827dcef0e5..9725676f3de33ef35380bb567f41ffd74e307e69 100644 (file)
@@ -1802,7 +1802,6 @@ static bool torture_ntdenytest(struct torture_context *tctx,
 
        for (i=0;i<torture_numops;i++) {
                NTSTATUS status1, status2, status2_p;
-               int64_t tdif;
                TALLOC_CTX *mem_ctx = talloc_new(NULL);
                enum deny_result res, res2;
                int b_sa1 = random() & ((1<<nbits1)-1);
@@ -1873,8 +1872,6 @@ static bool torture_ntdenytest(struct torture_context *tctx,
                                                   &res2);
                
                clock_gettime_mono(&tv);
-               tdif = nsec_time_diff(&tv, &tv_start);
-               tdif /= 1000000;
                if (torture_setting_bool(tctx, "showall", false) || 
                    !NT_STATUS_EQUAL(status2, status2_p) ||
                    res != res2) {