mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-24 13:53:11 +00:00
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 @@ get_max_size_class(void)
|
||||
size_t sz, miblen, max_size_class;
|
||||
|
||||
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 @@ get_max_size_class(void)
|
||||
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");
|
||||
|
||||
return (max_size_class);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user