Author: zoltan
Date: 2005-04-20 11:03:38 -0400 (Wed, 20 Apr 2005)
New Revision: 43346

Modified:
   trunk/mono/mono/metadata/ChangeLog
   trunk/mono/mono/metadata/icall.c
   trunk/mono/mono/metadata/object.c
   trunk/mono/mono/metadata/threads.c
Log:
2005-04-20  Zoltan Varga  <[EMAIL PROTECTED]>

        * threads.c object.c icall.c: Fix some gcc 4.0 warnings.


Modified: trunk/mono/mono/metadata/ChangeLog
===================================================================
--- trunk/mono/mono/metadata/ChangeLog  2005-04-20 14:55:12 UTC (rev 43345)
+++ trunk/mono/mono/metadata/ChangeLog  2005-04-20 15:03:38 UTC (rev 43346)
@@ -1,5 +1,7 @@
 2005-04-20  Zoltan Varga  <[EMAIL PROTECTED]>
 
+       * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
+       
        * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c: 
        Fix some gcc 4.0 warnings.
 

Modified: trunk/mono/mono/metadata/icall.c
===================================================================
--- trunk/mono/mono/metadata/icall.c    2005-04-20 14:55:12 UTC (rev 43345)
+++ trunk/mono/mono/metadata/icall.c    2005-04-20 15:03:38 UTC (rev 43346)
@@ -140,7 +140,7 @@
        if (io->bounds != NULL || io->max_length !=  ac->rank)
                mono_raise_exception (mono_get_exception_argument (NULL, NULL));
 
-       ind = (guint32 *)io->vector;
+       ind = (gint32 *)io->vector;
 
        if (ao->bounds == NULL) {
                if (*ind < 0 || *ind >= ao->max_length)
@@ -440,7 +440,7 @@
        if (idxs->bounds != NULL || idxs->max_length != ac->rank)
                mono_raise_exception (mono_get_exception_argument (NULL, NULL));
 
-       ind = (guint32 *)idxs->vector;
+       ind = (gint32 *)idxs->vector;
 
        if (this->bounds == NULL) {
                if (*ind < 0 || *ind >= this->max_length)
@@ -468,7 +468,7 @@
 {
        MonoClass *aklass;
        MonoArray *array;
-       gint32 *sizes, i;
+       guint32 *sizes, i;
        gboolean bounded = FALSE;
 
        MONO_ARCH_SAVE_REGS;
@@ -494,9 +494,9 @@
 
        sizes = alloca (aklass->rank * sizeof(guint32) * 2);
        for (i = 0; i < aklass->rank; ++i) {
-               sizes [i] = mono_array_get (lengths, gint32, i);
+               sizes [i] = mono_array_get (lengths, guint32, i);
                if (bounds)
-                       sizes [i + aklass->rank] = mono_array_get (bounds, 
gint32, i);
+                       sizes [i + aklass->rank] = mono_array_get (bounds, 
guint32, i);
                else
                        sizes [i + aklass->rank] = 0;
        }
@@ -3539,7 +3539,7 @@
 
                if (assem->aname.public_key) {
                        guint32 pkey_len;
-                       const char *pkey_ptr = assem->aname.public_key;
+                       const char *pkey_ptr = (char*)assem->aname.public_key;
                        pkey_len = mono_metadata_decode_blob_size (pkey_ptr, 
&pkey_ptr);
 
                        aname->publicKey = mono_array_new (domain, 
mono_defaults.byte_class, pkey_len);
@@ -3646,7 +3646,7 @@
 
        *ref_module = mono_module_get_object (mono_domain_get (), module);
 
-       return (void*)mono_image_get_resource (module, cols 
[MONO_MANIFEST_OFFSET], size);
+       return (void*)mono_image_get_resource (module, cols 
[MONO_MANIFEST_OFFSET], (guint32*)size);
 }
 
 static gboolean
@@ -3961,7 +3961,7 @@
                mono_runtime_invoke (create_culture, NULL, args, NULL);
 
        if (name->public_key) {
-               pkey_ptr = name->public_key;
+               pkey_ptr = (char*)name->public_key;
                pkey_len = mono_metadata_decode_blob_size (pkey_ptr, &pkey_ptr);
 
                aname->publicKey = mono_array_new (domain, 
mono_defaults.byte_class, pkey_len);
@@ -4979,7 +4979,7 @@
 static MonoBoolean
 ves_icall_System_Buffer_BlockCopyInternal (MonoArray *src, gint32 src_offset, 
MonoArray *dest, gint32 dest_offset, gint32 count) 
 {
-       char *src_buf, *dest_buf;
+       guint8 *src_buf, *dest_buf;
 
        MONO_ARCH_SAVE_REGS;
 
@@ -4987,8 +4987,8 @@
        if ((src_offset > mono_array_get_byte_length (src) - count) || 
(dest_offset > mono_array_get_byte_length (dest) - count))
                return FALSE;
 
-       src_buf = (gint8 *)src->vector + src_offset;
-       dest_buf = (gint8 *)dest->vector + dest_offset;
+       src_buf = (guint8 *)src->vector + src_offset;
+       dest_buf = (guint8 *)dest->vector + dest_offset;
 
        if (src != dest)
                memcpy (dest_buf, src_buf, count);

Modified: trunk/mono/mono/metadata/object.c
===================================================================
--- trunk/mono/mono/metadata/object.c   2005-04-20 14:55:12 UTC (rev 43345)
+++ trunk/mono/mono/metadata/object.c   2005-04-20 15:03:38 UTC (rev 43346)
@@ -731,7 +731,8 @@
                if (!(field->type->attrs & FIELD_ATTRIBUTE_LITERAL)) {
                        gint32 special_static = field_is_special_static (class, 
field);
                        if (special_static != SPECIAL_STATIC_NONE) {
-                               guint32 size, align, offset;
+                               guint32 size, offset;
+                               int align;
                                size = mono_type_size (field->type, &align);
                                offset = mono_alloc_special_static_data 
(special_static, size, align);
                                if (!domain->special_static_fields)
@@ -2324,7 +2325,7 @@
 mono_array_clone_in_domain (MonoDomain *domain, MonoArray *array)
 {
        MonoArray *o;
-       int size, i;
+       guint32 size, i;
        guint32 *sizes;
        MonoClass *klass = array->obj.vtable->klass;
 

Modified: trunk/mono/mono/metadata/threads.c
===================================================================
--- trunk/mono/mono/metadata/threads.c  2005-04-20 14:55:12 UTC (rev 43345)
+++ trunk/mono/mono/metadata/threads.c  2005-04-20 15:03:38 UTC (rev 43346)
@@ -1588,12 +1588,11 @@
        mono_thread_callbacks = callbacks;
 }
 
-#ifdef THREAD_DEBUG
+G_GNUC_UNUSED
 static void print_tids (gpointer key, gpointer value, gpointer user)
 {
        g_message ("Waiting for: %d", GPOINTER_TO_UINT(key));
 }
-#endif
 
 struct wait_data 
 {

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to