Uniformly cast mallctl[bymib]() oldp/newp arguments to (void *).

This avoids warnings in some cases, and is otherwise generally good
hygiene.
This commit is contained in:
Jason Evans
2016-10-27 21:31:25 -07:00
parent 44df4a45cf
commit 977103c897
25 changed files with 358 additions and 317 deletions

View File

@@ -8,8 +8,8 @@ TEST_BEGIN(test_overflow)
void *p;
sz = sizeof(unsigned);
assert_d_eq(mallctl("arenas.nlextents", &nlextents, &sz, NULL, 0), 0,
"Unexpected mallctl() error");
assert_d_eq(mallctl("arenas.nlextents", (void *)&nlextents, &sz, NULL,
0), 0, "Unexpected mallctl() error");
miblen = sizeof(mib) / sizeof(size_t);
assert_d_eq(mallctlnametomib("arenas.lextent.0.size", mib, &miblen), 0,
@@ -17,8 +17,8 @@ TEST_BEGIN(test_overflow)
mib[2] = nlextents - 1;
sz = sizeof(size_t);
assert_d_eq(mallctlbymib(mib, miblen, &max_size_class, &sz, NULL, 0), 0,
"Unexpected mallctlbymib() error");
assert_d_eq(mallctlbymib(mib, miblen, (void *)&max_size_class, &sz,
NULL, 0), 0, "Unexpected mallctlbymib() error");
assert_ptr_null(malloc(max_size_class + 1),
"Expected OOM due to over-sized allocation request");