@@ -137,8 +137,8 @@ TEST_BEGIN(test_chunk)
137137 bool xallocx_success_a , xallocx_success_b , xallocx_success_c ;
138138
139139 sz = sizeof (unsigned );
140- assert_d_eq (mallctl ("arenas.extend" , & arena_ind , & sz , NULL , 0 ), 0 ,
141- "Unexpected mallctl() failure" );
140+ assert_d_eq (mallctl ("arenas.extend" , ( void * ) & arena_ind , & sz , NULL , 0 ),
141+ 0 , "Unexpected mallctl() failure" );
142142 flags = MALLOCX_ARENA (arena_ind ) | MALLOCX_TCACHE_NONE ;
143143
144144 /* Install custom chunk hooks. */
@@ -148,8 +148,9 @@ TEST_BEGIN(test_chunk)
148148 hooks_mib [1 ] = (size_t )arena_ind ;
149149 old_size = sizeof (chunk_hooks_t );
150150 new_size = sizeof (chunk_hooks_t );
151- assert_d_eq (mallctlbymib (hooks_mib , hooks_miblen , & old_hooks , & old_size ,
152- & new_hooks , new_size ), 0 , "Unexpected chunk_hooks error" );
151+ assert_d_eq (mallctlbymib (hooks_mib , hooks_miblen , (void * )& old_hooks ,
152+ & old_size , (void * )& new_hooks , new_size ), 0 ,
153+ "Unexpected chunk_hooks error" );
153154 orig_hooks = old_hooks ;
154155 assert_ptr_ne (old_hooks .alloc , chunk_alloc , "Unexpected alloc error" );
155156 assert_ptr_ne (old_hooks .dalloc , chunk_dalloc ,
@@ -164,18 +165,18 @@ TEST_BEGIN(test_chunk)
164165
165166 /* Get large size classes. */
166167 sz = sizeof (size_t );
167- assert_d_eq (mallctl ("arenas.lrun.0.size" , & large0 , & sz , NULL , 0 ), 0 ,
168- "Unexpected arenas.lrun.0.size failure" );
169- assert_d_eq (mallctl ("arenas.lrun.1.size" , & large1 , & sz , NULL , 0 ), 0 ,
170- "Unexpected arenas.lrun.1.size failure" );
168+ assert_d_eq (mallctl ("arenas.lrun.0.size" , ( void * ) & large0 , & sz , NULL ,
169+ 0 ), 0 , "Unexpected arenas.lrun.0.size failure" );
170+ assert_d_eq (mallctl ("arenas.lrun.1.size" , ( void * ) & large1 , & sz , NULL ,
171+ 0 ), 0 , "Unexpected arenas.lrun.1.size failure" );
171172
172173 /* Get huge size classes. */
173- assert_d_eq (mallctl ("arenas.hchunk.0.size" , & huge0 , & sz , NULL , 0 ), 0 ,
174- "Unexpected arenas.hchunk.0.size failure" );
175- assert_d_eq (mallctl ("arenas.hchunk.1.size" , & huge1 , & sz , NULL , 0 ), 0 ,
176- "Unexpected arenas.hchunk.1.size failure" );
177- assert_d_eq (mallctl ("arenas.hchunk.2.size" , & huge2 , & sz , NULL , 0 ), 0 ,
178- "Unexpected arenas.hchunk.2.size failure" );
174+ assert_d_eq (mallctl ("arenas.hchunk.0.size" , ( void * ) & huge0 , & sz , NULL ,
175+ 0 ), 0 , "Unexpected arenas.hchunk.0.size failure" );
176+ assert_d_eq (mallctl ("arenas.hchunk.1.size" , ( void * ) & huge1 , & sz , NULL ,
177+ 0 ), 0 , "Unexpected arenas.hchunk.1.size failure" );
178+ assert_d_eq (mallctl ("arenas.hchunk.2.size" , ( void * ) & huge2 , & sz , NULL ,
179+ 0 ), 0 , "Unexpected arenas.hchunk.2.size failure" );
179180
180181 /* Test dalloc/decommit/purge cascade. */
181182 purge_miblen = sizeof (purge_mib )/sizeof (size_t );
@@ -265,9 +266,9 @@ TEST_BEGIN(test_chunk)
265266
266267 /* Restore chunk hooks. */
267268 assert_d_eq (mallctlbymib (hooks_mib , hooks_miblen , NULL , NULL ,
268- & old_hooks , new_size ), 0 , "Unexpected chunk_hooks error" );
269- assert_d_eq (mallctlbymib (hooks_mib , hooks_miblen , & old_hooks , & old_size ,
270- NULL , 0 ), 0 , "Unexpected chunk_hooks error" );
269+ ( void * ) & old_hooks , new_size ), 0 , "Unexpected chunk_hooks error" );
270+ assert_d_eq (mallctlbymib (hooks_mib , hooks_miblen , ( void * ) & old_hooks ,
271+ & old_size , NULL , 0 ), 0 , "Unexpected chunk_hooks error" );
271272 assert_ptr_eq (old_hooks .alloc , orig_hooks .alloc ,
272273 "Unexpected alloc error" );
273274 assert_ptr_eq (old_hooks .dalloc , orig_hooks .dalloc ,
0 commit comments