Skip to content

Commit

Permalink
fix some compiler warnings (#39142)
Browse files Browse the repository at this point in the history
- unused jl_iterate_func
- cast type of realloc in jl_init_threading

(cherry picked from commit 83bee67)
  • Loading branch information
JeffBezanson authored and vtjnash committed Feb 16, 2021
1 parent 20b967a commit 56a3fb7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/builtins.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,8 +504,6 @@ STATIC_INLINE void _grow_to(jl_value_t **root, jl_value_t ***oldargs, jl_svec_t
*n_alloc = newalloc;
}

static jl_function_t *jl_iterate_func JL_GLOBALLY_ROOTED;

static jl_value_t *do_apply( jl_value_t **args, uint32_t nargs, jl_value_t *iterate)
{
jl_function_t *f = args[0];
Expand Down
4 changes: 2 additions & 2 deletions src/threading.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,8 @@ void jl_init_threading(void)
jl_n_threads = (uint64_t)strtol(cp, NULL, 10);
if (jl_n_threads <= 0)
jl_n_threads = 1;
jl_measure_compile_time = realloc( jl_measure_compile_time, jl_n_threads * sizeof *jl_measure_compile_time );
jl_cumulative_compile_time = realloc( jl_cumulative_compile_time, jl_n_threads * sizeof *jl_cumulative_compile_time );
jl_measure_compile_time = (uint8_t*)realloc(jl_measure_compile_time, jl_n_threads * sizeof(*jl_measure_compile_time));
jl_cumulative_compile_time = (uint64_t*)realloc(jl_cumulative_compile_time, jl_n_threads * sizeof(*jl_cumulative_compile_time));
#ifndef __clang_analyzer__
jl_all_tls_states = (jl_ptls_t*)calloc(jl_n_threads, sizeof(void*));
#endif
Expand Down

0 comments on commit 56a3fb7

Please sign in to comment.