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:
@@ -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");
|
||||
|
Reference in New Issue
Block a user