Skip to content

Commit bf8450b

Browse files
committed
fix compile error
1 parent 0692429 commit bf8450b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/tbox/libm/isqrti64.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ tb_uint32_t tb_isqrti64(tb_uint64_t x)
8282
// analyze isqrti64
8383
tb_hong_t t1 = tb_uclock();
8484
__tb_volatile__ tb_size_t n1 = 100;
85-
__tb_volatile__ tb_uint32_t v1; tb_used(&v1);
85+
__tb_volatile__ tb_uint32_t v1;
8686
while (n1--)
8787
{
8888
v1 = tb_isqrti64_impl((1 << 4) + 3);
@@ -96,11 +96,12 @@ tb_uint32_t tb_isqrti64(tb_uint64_t x)
9696
v1 = tb_isqrti64_impl((1ULL << 60) + 3);
9797
}
9898
t1 = tb_uclock() - t1;
99+
tb_used(&v1);
99100

100101
// analyze sqrt
101102
tb_hong_t t2 = tb_uclock();
102103
__tb_volatile__ tb_size_t n2 = 100;
103-
__tb_volatile__ tb_uint32_t v2; tb_used(&v2);
104+
__tb_volatile__ tb_uint32_t v2;
104105
while (n2--)
105106
{
106107
v2 = tb_isqrti64_impl_using_sqrt((1 << 4) + 3);
@@ -114,6 +115,7 @@ tb_uint32_t tb_isqrti64(tb_uint64_t x)
114115
v2 = tb_isqrti64_impl_using_sqrt((1ULL << 60) + 3);
115116
}
116117
t2 = tb_uclock() - t2;
118+
tb_used(&v2);
117119

118120
// using sqrt?
119121
s_using_sqrt = t2 < t1? 1 : 0;

0 commit comments

Comments
 (0)