Fix warnings.
authorZoltan Varga <vargaz@gmail.com>
Thu, 28 Jun 2012 23:35:06 +0000 (01:35 +0200)
committerZoltan Varga <vargaz@gmail.com>
Thu, 28 Jun 2012 23:35:17 +0000 (01:35 +0200)
mono/metadata/reflection.c
mono/metadata/sgen-los.c
mono/metadata/sgen-major-copying.c
mono/metadata/sgen-os-posix.c

index 9d99adf95f1f7909f8868d0d3761928cbc433390..22fbbe78de8dd31894273616735933dc2203f2bd 100644 (file)
@@ -10926,7 +10926,7 @@ mono_reflection_get_dynamic_overrides (MonoClass *klass, MonoMethod ***overrides
                                for (j = 0; j < mono_array_length (mb->override_methods); ++j) {
                                        m = mono_array_get (mb->override_methods, MonoReflectionMethod*, j);
 
-                                       (*overrides) [onum * 2] = mono_reflection_method_get_handle (m);
+                                       (*overrides) [onum * 2] = mono_reflection_method_get_handle ((MonoObject*)m);
                                        (*overrides) [onum * 2 + 1] = mb->mhandle;
 
                                        g_assert (mb->mhandle);
index 5cc520569e5e361b9ab8cfb7cc8488bdf1141f17..7c52b6bac55645b1f09e007d93c87cadbcc403b3 100644 (file)
@@ -524,11 +524,11 @@ mono_sgen_los_describe_pointer (char *ptr)
 
                if (obj->data == ptr)
                        fprintf (gc_debug_file, "(object %s.%s size %d)", 
-                               vtable->klass->name_space, vtable->klass->name, obj->size);
+                                        vtable->klass->name_space, vtable->klass->name, (int)obj->size);
                else
                        fprintf (gc_debug_file, "(interior-ptr offset %td of %p (%s.%s) size %d)",
-                               ptr - obj->data, obj->data,
-                               vtable->klass->name_space, vtable->klass->name, obj->size);
+                                        ptr - obj->data, obj->data,
+                                        vtable->klass->name_space, vtable->klass->name, (int)obj->size);
 
                return TRUE;
        }
index b0827543d4c9988616ccccf11bcbba9bd6c884f9..7aef21559855e843254ded2ecfc5070b3a70047a 100644 (file)
@@ -134,7 +134,7 @@ alloc_major_section (void)
        section->size = MAJOR_SECTION_SIZE - SGEN_SIZEOF_GC_MEM_SECTION;
        section->end_data = section->data + section->size;
        sgen_update_heap_boundaries ((mword)section->data, (mword)section->end_data);
-       DEBUG (3, fprintf (gc_debug_file, "New major heap section: (%p-%p), total: %lld\n", section->data, section->end_data, mono_gc_get_heap_size ()));
+       DEBUG (3, fprintf (gc_debug_file, "New major heap section: (%p-%p), total: %lld\n", section->data, section->end_data, (long long int)mono_gc_get_heap_size ()));
        scan_starts = (section->size + SGEN_SCAN_START_SIZE - 1) / SGEN_SCAN_START_SIZE;
        section->scan_starts = sgen_alloc_internal_dynamic (sizeof (char*) * scan_starts, INTERNAL_MEM_SCAN_STARTS);
        section->num_scan_start = scan_starts;
index 82e1335166eef30c507658168ebc67fb379c951a..438a4caa3be107ce01a1ffb5860e6780ffd0cf13 100644 (file)
@@ -165,7 +165,7 @@ restart_handler (int sig)
        rely on pthread_self () and seatch over the thread list.
        */
        if (!info)
-               info = mono_thread_info_lookup (pthread_self ());
+               info = (SgenThreadInfo*)mono_thread_info_lookup (pthread_self ());
 
        /*
         * If a thread is dying there might be no thread info.  In