Fix more 64-to-32 conversion warnings.
This commit is contained in:
parent
00432331b8
commit
bab58ef401
@ -220,11 +220,11 @@ TEST_BEGIN(test_stats_arenas_large)
|
|||||||
if (config_stats) {
|
if (config_stats) {
|
||||||
assert_zu_gt(allocated, 0,
|
assert_zu_gt(allocated, 0,
|
||||||
"allocated should be greater than zero");
|
"allocated should be greater than zero");
|
||||||
assert_zu_gt(nmalloc, 0,
|
assert_u64_gt(nmalloc, 0,
|
||||||
"nmalloc should be greater than zero");
|
"nmalloc should be greater than zero");
|
||||||
assert_zu_ge(nmalloc, ndalloc,
|
assert_u64_ge(nmalloc, ndalloc,
|
||||||
"nmalloc should be at least as large as ndalloc");
|
"nmalloc should be at least as large as ndalloc");
|
||||||
assert_zu_gt(nrequests, 0,
|
assert_u64_gt(nrequests, 0,
|
||||||
"nrequests should be greater than zero");
|
"nrequests should be greater than zero");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -262,9 +262,9 @@ TEST_BEGIN(test_stats_arenas_huge)
|
|||||||
if (config_stats) {
|
if (config_stats) {
|
||||||
assert_zu_gt(allocated, 0,
|
assert_zu_gt(allocated, 0,
|
||||||
"allocated should be greater than zero");
|
"allocated should be greater than zero");
|
||||||
assert_zu_gt(nmalloc, 0,
|
assert_u64_gt(nmalloc, 0,
|
||||||
"nmalloc should be greater than zero");
|
"nmalloc should be greater than zero");
|
||||||
assert_zu_ge(nmalloc, ndalloc,
|
assert_u64_ge(nmalloc, ndalloc,
|
||||||
"nmalloc should be at least as large as ndalloc");
|
"nmalloc should be at least as large as ndalloc");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,27 +4,27 @@
|
|||||||
unsigned i, pow2; \
|
unsigned i, pow2; \
|
||||||
t x; \
|
t x; \
|
||||||
\
|
\
|
||||||
assert_zu_eq(pow2_ceil_##suf(0), 0, "Unexpected result"); \
|
assert_##suf##_eq(pow2_ceil_##suf(0), 0, "Unexpected result"); \
|
||||||
\
|
\
|
||||||
for (i = 0; i < sizeof(t) * 8; i++) { \
|
for (i = 0; i < sizeof(t) * 8; i++) { \
|
||||||
assert_zu_eq(pow2_ceil_##suf(((t)1) << i), ((t)1) << i, \
|
assert_##suf##_eq(pow2_ceil_##suf(((t)1) << i), ((t)1) \
|
||||||
"Unexpected result"); \
|
<< i, "Unexpected result"); \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
for (i = 2; i < sizeof(t) * 8; i++) { \
|
for (i = 2; i < sizeof(t) * 8; i++) { \
|
||||||
assert_zu_eq(pow2_ceil_##suf((((t)1) << i) - 1), \
|
assert_##suf##_eq(pow2_ceil_##suf((((t)1) << i) - 1), \
|
||||||
((t)1) << i, "Unexpected result"); \
|
((t)1) << i, "Unexpected result"); \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
for (i = 0; i < sizeof(t) * 8 - 1; i++) { \
|
for (i = 0; i < sizeof(t) * 8 - 1; i++) { \
|
||||||
assert_zu_eq(pow2_ceil_##suf((((t)1) << i) + 1), \
|
assert_##suf##_eq(pow2_ceil_##suf((((t)1) << i) + 1), \
|
||||||
((t)1) << (i+1), "Unexpected result"); \
|
((t)1) << (i+1), "Unexpected result"); \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
for (pow2 = 1; pow2 < 25; pow2++) { \
|
for (pow2 = 1; pow2 < 25; pow2++) { \
|
||||||
for (x = (((t)1) << (pow2-1)) + 1; x <= ((t)1) << pow2; \
|
for (x = (((t)1) << (pow2-1)) + 1; x <= ((t)1) << pow2; \
|
||||||
x++) { \
|
x++) { \
|
||||||
assert_zu_eq(pow2_ceil_##suf(x), \
|
assert_##suf##_eq(pow2_ceil_##suf(x), \
|
||||||
((t)1) << pow2, \
|
((t)1) << pow2, \
|
||||||
"Unexpected result, x=%"pri, x); \
|
"Unexpected result, x=%"pri, x); \
|
||||||
} \
|
} \
|
||||||
|
Loading…
Reference in New Issue
Block a user