Skip to content

Commit

Permalink
Fix pointer casting warnings by adding the appropriate casts
Browse files Browse the repository at this point in the history
  • Loading branch information
NHDaly committed Feb 4, 2022
1 parent c0cd472 commit c0c854e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/gc-alloc-profiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ void _maybe_record_alloc_to_profile(jl_value_t *val, size_t size, jl_datatype_t

extern int g_alloc_profile_enabled;

#define jl_gc_unknown_type_tag ((uintptr_t)0xdeadaa03)
#define jl_gc_unknown_type_tag ((jl_datatype_t*)0xdeadaa03)

static inline void maybe_record_alloc_to_profile(jl_value_t *val, size_t size, jl_datatype_t *typ) JL_NOTSAFEPOINT {
if (__unlikely(g_alloc_profile_enabled)) {
Expand Down
2 changes: 1 addition & 1 deletion src/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3558,7 +3558,7 @@ JL_DLLEXPORT void *jl_gc_managed_malloc(size_t sz)
#endif
errno = last_errno;
// jl_gc_managed_malloc is currently always used for allocating array buffers.
maybe_record_alloc_to_profile(b, sz, jl_buff_tag);
maybe_record_alloc_to_profile(b, sz, (jl_datatype_t*)jl_buff_tag);
return b;
}

Expand Down

0 comments on commit c0c854e

Please sign in to comment.