diff --git a/src/mono/mono/component/debugger-state-machine.c b/src/mono/mono/component/debugger-state-machine.c index c5b96b7aada531..a9a5ebb0603806 100644 --- a/src/mono/mono/component/debugger-state-machine.c +++ b/src/mono/mono/component/debugger-state-machine.c @@ -248,7 +248,7 @@ dump_thread_state (gpointer key, gpointer value, gpointer user_data) mono_json_writer_indent (data->writer); mono_json_writer_object_key(data->writer, "thread_id"); - mono_json_writer_printf (data->writer, "\"0x%x\",\n", mono_debugger_tls_thread_id (debugger_tls)); + mono_json_writer_printf (data->writer, "\"0x%x\",\n", (unsigned int) mono_debugger_tls_thread_id (debugger_tls)); mono_json_writer_indent (data->writer); mono_json_writer_object_key (data->writer, "thread_state"); @@ -310,7 +310,7 @@ mono_debugger_state (JsonWriter *writer) mono_json_writer_indent (writer); mono_json_writer_object_key(writer, "il_offset"); - mono_json_writer_printf (writer, "\"0x%x\",\n", bp->il_offset); + mono_json_writer_printf (writer, "\"0x%x\",\n", (unsigned int) bp->il_offset); mono_json_writer_indent_pop (writer); mono_json_writer_indent (writer); @@ -351,7 +351,7 @@ mono_debugger_state (JsonWriter *writer) mono_json_writer_indent (writer); mono_json_writer_object_key(writer, "tid"); - mono_json_writer_printf (writer, "\"0x%x\",\n", item.tid); + mono_json_writer_printf (writer, "\"0x%x\",\n", (unsigned int) item.tid); mono_json_writer_indent (writer); mono_json_writer_object_key(writer, "message"); @@ -359,7 +359,7 @@ mono_debugger_state (JsonWriter *writer) mono_json_writer_indent (writer); mono_json_writer_object_key(writer, "counter"); - mono_json_writer_printf (writer, "\"%d\"\n", header.counter); + mono_json_writer_printf (writer, "\"%ld\"\n", header.counter); mono_json_writer_indent_pop (writer); mono_json_writer_indent (writer); diff --git a/src/mono/mono/mini/interp/transform.c b/src/mono/mono/mini/interp/transform.c index 576f5db0fca436..96ec25f929e8fd 100644 --- a/src/mono/mono/mini/interp/transform.c +++ b/src/mono/mono/mini/interp/transform.c @@ -8713,7 +8713,7 @@ interp_cprop (TransformData *td) sregs [0] = sregs [1]; if (td->verbose_level) { - g_print ("Replace ldloca/stfld pair (off %p) :\n\t", ldloca->il_offset); + g_print ("Replace ldloca/stfld pair (off %p) :\n\t", (void *)(uintptr_t) ldloca->il_offset); dump_interp_inst (ins); } needs_retry = TRUE; diff --git a/src/mono/mono/mini/mini-runtime.c b/src/mono/mono/mini/mini-runtime.c index ac65672001415d..83078470df3b74 100644 --- a/src/mono/mono/mini/mini-runtime.c +++ b/src/mono/mono/mini/mini-runtime.c @@ -4972,7 +4972,7 @@ mono_runtime_print_stats (void) g_print ("\nInitialized classes: %" G_GINT32_FORMAT "\n", mono_stats.generic_class_count); g_print ("Inflated types: %" G_GINT32_FORMAT "\n", mono_stats.inflated_type_count); - g_print ("Generics virtual invokes: %ld\n", mono_jit_stats.generic_virtual_invocations); + g_print ("Generics virtual invokes: %" G_GINT32_FORMAT "\n", mono_jit_stats.generic_virtual_invocations); g_print ("Sharable generic methods: %" G_GINT32_FORMAT "\n", mono_stats.generics_sharable_methods); g_print ("Unsharable generic methods: %" G_GINT32_FORMAT "\n", mono_stats.generics_unsharable_methods); diff --git a/src/mono/mono/sgen/sgen-debug.c b/src/mono/mono/sgen/sgen-debug.c index d205602f99d058..435a8f32ae08c2 100644 --- a/src/mono/mono/sgen/sgen-debug.c +++ b/src/mono/mono/sgen/sgen-debug.c @@ -986,7 +986,7 @@ check_reference_for_xdomain (GCObject **ptr, GCObject *obj, MonoDomain *domain) mono_error_cleanup (error); } else str = NULL; - g_print ("xdomain reference in %p (%s.%s) at offset %d (%s) to %p (%s.%s) (%s) - pointed to by:\n", + g_print ("xdomain reference in %p (%s.%s) at offset %zu (%s) to %p (%s.%s) (%s) - pointed to by:\n", obj, m_class_get_name_space (obj->vtable->klass), m_class_get_name (obj->vtable->klass), offset, field ? field->name : "", ref, m_class_get_name_space (ref->vtable->klass), m_class_get_name (ref->vtable->klass), str ? str : ""); diff --git a/src/mono/mono/sgen/sgen-gc.c b/src/mono/mono/sgen/sgen-gc.c index 08f192c49e7c2e..b91cef311aeb15 100644 --- a/src/mono/mono/sgen/sgen-gc.c +++ b/src/mono/mono/sgen/sgen-gc.c @@ -3580,7 +3580,7 @@ sgen_gc_init (void) if (*opt && mono_gc_parse_environment_string_extract_number (opt, &max_heap_candidate)) { max_heap = (max_heap_candidate + page_size - 1) & ~(size_t)(page_size - 1); if (max_heap != max_heap_candidate) - sgen_env_var_error (MONO_GC_PARAMS_NAME, "Rounding up.", "`max-heap-size` size must be a multiple of %d.", page_size); + sgen_env_var_error (MONO_GC_PARAMS_NAME, "Rounding up.", "`max-heap-size` size must be a multiple of %zu.", page_size); } else { sgen_env_var_error (MONO_GC_PARAMS_NAME, NULL, "`max-heap-size` must be an integer."); } diff --git a/src/mono/mono/utils/mono-threads.c b/src/mono/mono/utils/mono-threads.c index 1c5a2c0b591dd5..233e89e48727fb 100644 --- a/src/mono/mono/utils/mono-threads.c +++ b/src/mono/mono/utils/mono-threads.c @@ -298,9 +298,9 @@ dump_threads (void) char thread_name [256] = { 0 }; pthread_getname_np (mono_thread_info_get_tid (info), thread_name, 255); - g_async_safe_printf ("--thread %p id %p [%p] (%s) state %x %s\n", info, (gpointer)(gsize) mono_thread_info_get_tid (info), (void*)(size_t)info->native_handle, thread_name, info->thread_state, info == cur ? "GC INITIATOR" : "" ); + g_async_safe_printf ("--thread %p id %p [%p] (%s) state %x %s\n", info, (gpointer)(gsize) mono_thread_info_get_tid (info), (void*)(size_t)info->native_handle, thread_name, info->thread_state.raw, info == cur ? "GC INITIATOR" : "" ); #else - g_async_safe_printf ("--thread %p id %p [%p] state %x %s\n", info, (gpointer)(gsize) mono_thread_info_get_tid (info), (void*)(size_t)info->native_handle, info->thread_state, info == cur ? "GC INITIATOR" : "" ); + g_async_safe_printf ("--thread %p id %p [%p] state %x %s\n", info, (gpointer)(gsize) mono_thread_info_get_tid (info), (void*)(size_t)info->native_handle, info->thread_state.raw, info == cur ? "GC INITIATOR" : "" ); #endif } FOREACH_THREAD_SAFE_END }