Skip to content

Commit 56a3fb7

Browse files
JeffBezansonvtjnash
authored andcommitted
fix some compiler warnings (#39142)
- unused jl_iterate_func - cast type of realloc in jl_init_threading (cherry picked from commit 83bee67)
1 parent 20b967a commit 56a3fb7

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/builtins.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,8 +504,6 @@ STATIC_INLINE void _grow_to(jl_value_t **root, jl_value_t ***oldargs, jl_svec_t
504504
*n_alloc = newalloc;
505505
}
506506

507-
static jl_function_t *jl_iterate_func JL_GLOBALLY_ROOTED;
508-
509507
static jl_value_t *do_apply( jl_value_t **args, uint32_t nargs, jl_value_t *iterate)
510508
{
511509
jl_function_t *f = args[0];

src/threading.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,8 +401,8 @@ void jl_init_threading(void)
401401
jl_n_threads = (uint64_t)strtol(cp, NULL, 10);
402402
if (jl_n_threads <= 0)
403403
jl_n_threads = 1;
404-
jl_measure_compile_time = realloc( jl_measure_compile_time, jl_n_threads * sizeof *jl_measure_compile_time );
405-
jl_cumulative_compile_time = realloc( jl_cumulative_compile_time, jl_n_threads * sizeof *jl_cumulative_compile_time );
404+
jl_measure_compile_time = (uint8_t*)realloc(jl_measure_compile_time, jl_n_threads * sizeof(*jl_measure_compile_time));
405+
jl_cumulative_compile_time = (uint64_t*)realloc(jl_cumulative_compile_time, jl_n_threads * sizeof(*jl_cumulative_compile_time));
406406
#ifndef __clang_analyzer__
407407
jl_all_tls_states = (jl_ptls_t*)calloc(jl_n_threads, sizeof(void*));
408408
#endif

0 commit comments

Comments
 (0)