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:
@@ -513,7 +513,7 @@ stats_general_print(void (*write_cb)(void *, const char *), void *cbopaque,
|
||||
#define OPT_WRITE_BOOL_MUTABLE(n, m, c) { \
|
||||
bool bv2; \
|
||||
if (je_mallctl("opt."#n, (void *)&bv, &bsz, NULL, 0) == 0 && \
|
||||
je_mallctl(#m, &bv2, &bsz, NULL, 0) == 0) { \
|
||||
je_mallctl(#m, (void *)&bv2, &bsz, NULL, 0) == 0) { \
|
||||
if (json) { \
|
||||
malloc_cprintf(write_cb, cbopaque, \
|
||||
"\t\t\t\""#n"\": %s%s\n", bv ? "true" : \
|
||||
@@ -548,7 +548,7 @@ stats_general_print(void (*write_cb)(void *, const char *), void *cbopaque,
|
||||
#define OPT_WRITE_SSIZE_T_MUTABLE(n, m, c) { \
|
||||
ssize_t ssv2; \
|
||||
if (je_mallctl("opt."#n, (void *)&ssv, &sssz, NULL, 0) == 0 && \
|
||||
je_mallctl(#m, &ssv2, &sssz, NULL, 0) == 0) { \
|
||||
je_mallctl(#m, (void *)&ssv2, &sssz, NULL, 0) == 0) { \
|
||||
if (json) { \
|
||||
malloc_cprintf(write_cb, cbopaque, \
|
||||
"\t\t\t\""#n"\": %zd%s\n", ssv, (c)); \
|
||||
@@ -886,7 +886,8 @@ stats_print(void (*write_cb)(void *, const char *), void *cbopaque,
|
||||
* */
|
||||
epoch = 1;
|
||||
u64sz = sizeof(uint64_t);
|
||||
err = je_mallctl("epoch", &epoch, &u64sz, &epoch, sizeof(uint64_t));
|
||||
err = je_mallctl("epoch", (void *)&epoch, &u64sz, (void *)&epoch,
|
||||
sizeof(uint64_t));
|
||||
if (err != 0) {
|
||||
if (err == EAGAIN) {
|
||||
malloc_write("<jemalloc>: Memory allocation failure in "
|
||||
|
Reference in New Issue
Block a user