1
0
Fork 0
mirror of https://github.com/VSadov/Satori.git synced 2025-06-09 09:34:49 +09:00

[Wasm] Silence some warnings (#47773)

* Silence warning in driver.c

* Clean up more warnings
This commit is contained in:
Larry Ewing 2021-02-02 17:08:41 -06:00 committed by GitHub
parent 9f759f2975
commit ad407d2be2
Signed by: github
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 10 deletions

View file

@ -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)

View file

@ -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.

View file

@ -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;
}