[Mono-list] Compile errors in mono/metadata

Jonathan Stowe gellyfish@gellyfish.com
Thu, 15 May 2003 10:57:09 +0100 (BST)


I have had to fix two compile errors in mono/metadata:

Index: reflection.c
===================================================================
RCS file: /mono/mono/mono/metadata/reflection.c,v
retrieving revision 1.171
diff -u -r1.171 reflection.c
--- reflection.c	14 May 2003 14:16:08 -0000	1.171
+++ reflection.c	15 May 2003 09:57:24 -0000
@@ -5405,8 +5405,9 @@
 		mono_save_custom_attrs (klass->image, field, fb->cattrs);

 		if (fb->def_value) {
+                        MonoDynamicAssembly *assembly;
 			field->type->attrs |= FIELD_ATTRIBUTE_HAS_DEFAULT;
-			MonoDynamicAssembly *assembly =
klass->image->assembly->dynamic;
+			assembly = klass->image->assembly->dynamic;
 			field->def_value = g_new0 (MonoConstant, 1);
 			idx = encode_constant (assembly, fb->def_value,
&field->def_value->type);
 			/* Copy the data from the blob since it might get
realloc-ed */


RCS file: /mono/mono/mono/metadata/icall.c,v
retrieving revision 1.295
diff -u -r1.295 icall.c
--- icall.c	14 May 2003 16:19:54 -0000	1.295
+++ icall.c	15 May 2003 09:59:27 -0000
@@ -1390,9 +1390,9 @@

 	if (m->klass->rank && !strcmp (m->name, ".ctor")) {
 		int i;
-		pcount = mono_array_length (params);
 		guint32 *lengths;
 		guint32 *lower_bounds;
+		pcount = mono_array_length (params);
 		lengths = alloca (sizeof (guint32) * pcount);
 		for (i = 0; i < pcount; ++i)
 			lengths [i] = *(gint32*) ((char*)mono_array_get
(params, gpointer, i) + sizeof (MonoObject));


This from the CVS earlier this morning.  It is almost certainly a compiler
version thing.

/J\
-- 
Jonathan Stowe                      |
<http://www.gellyfish.com>          |      This space for rent
                                    |