diff --git a/src/mono/mono/mini/aot-runtime.c b/src/mono/mono/mini/aot-runtime.c index 7c644f40273..14e6078300c 100644 --- a/src/mono/mono/mini/aot-runtime.c +++ b/src/mono/mono/mini/aot-runtime.c @@ -2199,8 +2199,8 @@ register_methods_in_jinfo (MonoAotModule *amodule) /* The 'end' parameter is exclusive */ mono_jit_info_add_aot_module (assembly->image, GINT_TO_POINTER (start_method), GINT_TO_POINTER (end_method + 1)); - for (int j = GINT_TO_POINTER (start_method); j < GINT_TO_POINTER (end_method + 1); ++j) - g_assert (!mono_bitset_test_fast (registered, GPOINTER_TO_INT (j))); + for (int j = start_method; j < end_method + 1; ++j) + g_assert (!mono_bitset_test_fast (registered, j)); start = end; } for (i = 0; i < amodule->sorted_methods_len; ++i) diff --git a/src/mono/mono/sgen/sgen-gchandles.c b/src/mono/mono/sgen/sgen-gchandles.c index b802c439db6..7d4f3344f03 100644 --- a/src/mono/mono/sgen/sgen-gchandles.c +++ b/src/mono/mono/sgen/sgen-gchandles.c @@ -21,6 +21,7 @@ static volatile guint32 stat_gc_handles_max_allocated = 0; #endif +#ifndef DISABLE_SGEN_DEBUG_HELPERS typedef struct { size_t num_handles [HANDLE_TYPE_MAX]; } GCHandleClassEntry; @@ -28,6 +29,7 @@ typedef struct { static gboolean do_gchandle_stats = FALSE; static SgenHashTable gchandle_class_hash_table = SGEN_HASH_TABLE_INIT (INTERNAL_MEM_STATISTICS, INTERNAL_MEM_STAT_GCHANDLE_CLASS, sizeof (GCHandleClassEntry), g_str_hash, g_str_equal); +#endif /* * A table of GC handle data, implementing a simple lock-free bitmap allocator. diff --git a/src/mono/wasm/runtime/driver.c b/src/mono/wasm/runtime/driver.c index a906b3a440e..dc0ba41c602 100644 --- a/src/mono/wasm/runtime/driver.c +++ b/src/mono/wasm/runtime/driver.c @@ -908,10 +908,8 @@ mono_wasm_get_obj_type (MonoObject *obj) /* Process obj before calling into the runtime, class_from_name () can invoke managed code */ MonoClass *klass = mono_object_get_class (obj); - if ( - (klass == mono_get_string_class ()) && - (mono_string_is_interned (obj) == obj) - ) + if ((klass == mono_get_string_class ()) && + (mono_string_is_interned ((MonoString *)obj) == (MonoString *)obj)) return MARSHAL_TYPE_STRING_INTERNED; MonoType *type = mono_class_get_type (klass); @@ -937,10 +935,8 @@ mono_wasm_try_unbox_primitive_and_get_type (MonoObject *obj, void *result) /* Process obj before calling into the runtime, class_from_name () can invoke managed code */ MonoClass *klass = mono_object_get_class (obj); - if ( - (klass == mono_get_string_class ()) && - (mono_string_is_interned (obj) == obj) - ) { + if ((klass == mono_get_string_class ()) && + (mono_string_is_interned ((MonoString *)obj) == (MonoString *)obj)) { *resultL = 0; return MARSHAL_TYPE_STRING_INTERNED; }