diff options
author | Jason Evans <jasone@canonware.com> | 2016-10-28 04:31:25 (GMT) |
---|---|---|
committer | Jason Evans <jasone@canonware.com> | 2016-10-28 04:31:25 (GMT) |
commit | 977103c897225a4ab0380f09adc67b4c43143521 (patch) | |
tree | 8052c549b5e37c0eb5347a92aa796ae7cd7b556a /msvc | |
parent | 44df4a45cf587db8adee7edff4acfb96bfd3d670 (diff) | |
download | jemalloc-977103c897225a4ab0380f09adc67b4c43143521.zip jemalloc-977103c897225a4ab0380f09adc67b4c43143521.tar.gz jemalloc-977103c897225a4ab0380f09adc67b4c43143521.tar.bz2 |
Uniformly cast mallctl[bymib]() oldp/newp arguments to (void *).
This avoids warnings in some cases, and is otherwise generally good
hygiene.
Diffstat (limited to 'msvc')
-rw-r--r-- | msvc/projects/vc2015/test_threads/test_threads.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/msvc/projects/vc2015/test_threads/test_threads.cpp b/msvc/projects/vc2015/test_threads/test_threads.cpp index c8cb7d6..a3d1a79 100644 --- a/msvc/projects/vc2015/test_threads/test_threads.cpp +++ b/msvc/projects/vc2015/test_threads/test_threads.cpp @@ -21,7 +21,7 @@ int test_threads() je_malloc_conf = "narenas:3"; int narenas = 0; size_t sz = sizeof(narenas); - je_mallctl("opt.narenas", &narenas, &sz, NULL, 0); + je_mallctl("opt.narenas", (void *)&narenas, &sz, NULL, 0); if (narenas != 3) { printf("Error: unexpected number of arenas: %d\n", narenas); return 1; @@ -33,7 +33,7 @@ int test_threads() je_malloc_stats_print(NULL, NULL, NULL); size_t allocated1; size_t sz1 = sizeof(allocated1); - je_mallctl("stats.active", &allocated1, &sz1, NULL, 0); + je_mallctl("stats.active", (void *)&allocated1, &sz1, NULL, 0); printf("\nPress Enter to start threads...\n"); getchar(); printf("Starting %d threads x %d x %d iterations...\n", numThreads, numIter1, numIter2); @@ -78,7 +78,7 @@ int test_threads() } je_malloc_stats_print(NULL, NULL, NULL); size_t allocated2; - je_mallctl("stats.active", &allocated2, &sz1, NULL, 0); + je_mallctl("stats.active", (void *)&allocated2, &sz1, NULL, 0); size_t leaked = allocated2 - allocated1; printf("\nDone. Leaked: %zd bytes\n", leaked); bool failed = leaked > 65536; // in case C++ runtime allocated something (e.g. iostream locale or facet) |