Title: Message
Doh!! Thanks scott. Here it is...
-----Original Message-----
From: Scott Blomfield [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 04, 2003 10:03 AM
To: Piers Haken
Subject: RE: [Mono-list] Mono warnings

I think you forgot the attachment. You might want to resend to the list.
 
hth,
 
Scott
-----Original Message-----
From: Piers Haken [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 04, 2003 12:05 PM
To: [EMAIL PROTECTED]
Subject: [Mono-list] Mono warnings

Attached is a patch that fixes most of the remaining compiler warnings for the mono build on linux.

One of the warnings I didn't fix is:
  object.c: In function `mono_class_vtable':
  object.c:223: warning: assignment makes integer from pointer without a cast

I didn't know if it was okay that it was only copying a char.

Let me know if you want me to commit.

Piers.

? a
? arch/s390/Makefile
? arch/s390/Makefile.in
? metadata/a
? metadata/monosn
Index: dis/dump.c
===================================================================
RCS file: /cvs/public/mono/mono/dis/dump.c,v
retrieving revision 1.37
diff -u -r1.37 dump.c
--- dis/dump.c  27 Jan 2003 16:20:41 -0000      1.37
+++ dis/dump.c  4 Feb 2003 17:39:29 -0000
@@ -569,7 +569,7 @@
 dump_table_methodimpl (MonoImage *m)
 {
        MonoTableInfo *t = &m->tables [MONO_TABLE_METHODIMPL];
-       MonoTableInfo *td = &m->tables [MONO_TABLE_TYPEDEF];
+       /*MonoTableInfo *td = &m->tables [MONO_TABLE_TYPEDEF];*/
        int i;
 
        fprintf (output, "MethodImpl Table (1..%d)\n", t->rows);
Index: interpreter/interp.c
===================================================================
RCS file: /cvs/public/mono/mono/interpreter/interp.c,v
retrieving revision 1.228
diff -u -r1.228 interp.c
--- interpreter/interp.c        23 Jan 2003 17:46:25 -0000      1.228
+++ interpreter/interp.c        4 Feb 2003 17:39:29 -0000
@@ -1204,7 +1204,7 @@
                frame.invoke_trap = 1;
        ves_exec_method (&frame);
        if (exc && frame.ex) {
-               *exc = frame.ex;
+               *exc = (MonoObject*) frame.ex;
                return NULL;
        }
        if (sig->ret->type == MONO_TYPE_VOID && !method->string_ctor)
@@ -1655,7 +1655,7 @@
 
                        if (!child_frame.method) {
                                g_assert (code);
-                               ves_pinvoke_method (&child_frame, csignature, code, 
FALSE);
+                               ves_pinvoke_method (&child_frame, csignature, 
+(MonoFunc) code, FALSE);
                        } else if (csignature->hasthis && sp->type == VAL_OBJ &&
                                        ((MonoObject *)sp->data.p)->vtable->klass == 
mono_defaults.transparent_proxy_class) {
                                g_assert (child_frame.method);
@@ -4161,7 +4161,7 @@
                MonoInvocation *inv;
                MonoMethodHeader *hd;
                MonoExceptionClause *clause;
-               char *message;
+               /*char *message;*/
                MonoObject *ex_obj;
 
 #if DEBUG_INTERP
@@ -4244,7 +4244,7 @@
                        if (MONO_OFFSET_IN_CLAUSE (clause, ip_offset) && 
!(MONO_OFFSET_IN_CLAUSE (clause, endfinally_ip - header->code))) {
                                if (clause->flags == MONO_EXCEPTION_CLAUSE_FINALLY) {
                                        ip = header->code + clause->handler_offset;
-                                       finally_ips = g_slist_append (finally_ips, ip);
+                                       finally_ips = g_slist_append (finally_ips, 
+(gpointer) ip);
 #if DEBUG_INTERP
                                        if (tracing)
                                                g_print ("* Found finally at IL_%04x 
with exception: %s\n", clause->handler_offset, frame->ex? "yes": "no");
Index: metadata/appdomain.c
===================================================================
RCS file: /cvs/public/mono/mono/metadata/appdomain.c,v
retrieving revision 1.67
diff -u -r1.67 appdomain.c
--- metadata/appdomain.c        4 Feb 2003 00:40:42 -0000       1.67
+++ metadata/appdomain.c        4 Feb 2003 17:39:29 -0000
@@ -34,6 +34,9 @@
 static void
 mono_domain_fire_assembly_load (MonoAssembly *assembly, gpointer user_data);
 
+static MonoMethod *
+look_for_method_by_name (MonoClass *klass, const gchar *name);
+
 /*
  * mono_runtime_init:
  * @domain: domain returned by mono_init ()
@@ -237,7 +240,7 @@
 MonoAppDomain *
 ves_icall_System_AppDomain_createDomain (MonoString *friendly_name, 
MonoAppDomainSetup *setup)
 {
-       MonoDomain *domain = mono_domain_get (); 
+       /*MonoDomain *domain = mono_domain_get (); */
        MonoClass *adclass;
        MonoAppDomain *ad;
        MonoDomain *data;
@@ -767,7 +770,7 @@
                g_error ("No entry point method found in %s", image->name);
 
        if (!args)
-               args = (MonoObject *) mono_array_new (ad->data, 
mono_defaults.string_class, 0);
+               args = (MonoArray *) mono_array_new (ad->data, 
+mono_defaults.string_class, 0);
 
        res = mono_runtime_exec_main (method, (MonoArray *)args, NULL);
 
Index: metadata/appdomain.h
===================================================================
RCS file: /cvs/public/mono/mono/metadata/appdomain.h,v
retrieving revision 1.37
diff -u -r1.37 appdomain.h
--- metadata/appdomain.h        3 Feb 2003 10:15:14 -0000       1.37
+++ metadata/appdomain.h        4 Feb 2003 17:39:29 -0000
@@ -197,7 +197,7 @@
 mono_context_set                                  (MonoAppContext *new_context);
 
 inline MonoAppContext * 
-mono_context_get                                  ();
+mono_context_get                                  (void);
 
 MonoAppDomain * 
 ves_icall_System_AppDomain_InternalSetDomain      (MonoAppDomain *ad);
@@ -206,9 +206,12 @@
 ves_icall_System_AppDomain_InternalSetDomainByID   (gint32 domainid);
 
 MonoAppContext * 
-ves_icall_System_AppDomain_InternalGetContext      ();
+ves_icall_System_AppDomain_InternalGetContext      (void);
 
 MonoAppContext * 
 ves_icall_System_AppDomain_InternalSetContext     (MonoAppContext *mc);
+
+gint32 
+ves_icall_System_AppDomain_GetIDFromDomain (MonoAppDomain * ad);
 
 #endif /* _MONO_METADATA_APPDOMAIN_H_ */
Index: metadata/class.h
===================================================================
RCS file: /cvs/public/mono/mono/metadata/class.h,v
retrieving revision 1.72
diff -u -r1.72 class.h
--- metadata/class.h    27 Jan 2003 15:34:33 -0000      1.72
+++ metadata/class.h    4 Feb 2003 17:39:29 -0000
@@ -273,4 +273,7 @@
 void
 mono_install_lookup_dynamic_token (MonoLookupDynamicToken func);
 
+void    
+mono_install_get_config_dir(void);
+
 #endif /* _MONO_CLI_CLASS_H_ */
Index: metadata/debug-mono-symfile.c
===================================================================
RCS file: /cvs/public/mono/mono/metadata/debug-mono-symfile.c,v
retrieving revision 1.44
diff -u -r1.44 debug-mono-symfile.c
--- metadata/debug-mono-symfile.c       2 Feb 2003 21:13:33 -0000       1.44
+++ metadata/debug-mono-symfile.c       4 Feb 2003 17:39:29 -0000
@@ -461,7 +461,7 @@
        } else {
                g_assert ((header != NULL) || (mep->entry->num_locals == 0));
                for (i = 0; i < mep->entry->num_locals; i++) {
-                       MonoDebugVarInfo *var = &mep->minfo->jit->locals [i];
+                       /*MonoDebugVarInfo *var = &mep->minfo->jit->locals [i];*/
                        *var_table++ = mep->minfo->jit->locals [i];
                        *type_table++ = write_type (symfile->global, header->locals 
[i]);
                }
Index: metadata/icall.c
===================================================================
RCS file: /cvs/public/mono/mono/metadata/icall.c,v
retrieving revision 1.259
diff -u -r1.259 icall.c
--- metadata/icall.c    4 Feb 2003 12:05:34 -0000       1.259
+++ metadata/icall.c    4 Feb 2003 17:39:30 -0000
@@ -3016,10 +3016,10 @@
        return mono_compile_method (method);
 }
 
-char * mono_cfg_dir = "";
+char const * mono_cfg_dir = "";
 
 void    
-mono_install_get_config_dir()
+mono_install_get_config_dir(void)
 {       
   mono_cfg_dir = getenv ("MONO_CFG_DIR");
 
Index: metadata/loader.c
===================================================================
RCS file: /cvs/public/mono/mono/metadata/loader.c,v
retrieving revision 1.87
diff -u -r1.87 loader.c
--- metadata/loader.c   27 Jan 2003 13:31:59 -0000      1.87
+++ metadata/loader.c   4 Feb 2003 17:39:30 -0000
@@ -47,7 +47,7 @@
                icall_hash = g_hash_table_new (g_str_hash , g_str_equal);
        }
 
-       g_hash_table_insert (icall_hash, g_strdup (name), method);
+       g_hash_table_insert (icall_hash, g_strdup (name), (gpointer) method);
 }
 
 static void
Index: metadata/marshal.c
===================================================================
RCS file: /cvs/public/mono/mono/metadata/marshal.c,v
retrieving revision 1.79
diff -u -r1.79 marshal.c
--- metadata/marshal.c  4 Feb 2003 11:31:22 -0000       1.79
+++ metadata/marshal.c  4 Feb 2003 17:39:30 -0000
@@ -2057,8 +2057,6 @@
        /* internal calls: we simply push all arguments and call the method (no 
conversions) */
        if (method->iflags & (METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL | 
METHOD_IMPL_ATTRIBUTE_RUNTIME)) {
 
-               MonoMethodSignature *call_sig;
-
                /* hack - string constructors returns a value */
                if (method->string_ctor) {
                        csig = g_memdup (sig, sigsize);
@@ -2087,7 +2085,7 @@
 
        g_assert (pinvoke);
 
-       mspecs = g_new (MonoMarshalSpec, sig->param_count + 1);
+       mspecs = g_new (MonoMarshalSpec*, sig->param_count + 1);
        mono_method_get_marshal_info (method, mspecs);
 
        /* pinvoke: we need to convert the arguments if necessary */
Index: metadata/mono-config.c
===================================================================
RCS file: /cvs/public/mono/mono/metadata/mono-config.c,v
retrieving revision 1.4
diff -u -r1.4 mono-config.c
--- metadata/mono-config.c      2 Oct 2002 12:37:53 -0000       1.4
+++ metadata/mono-config.c      4 Feb 2003 17:39:30 -0000
@@ -208,7 +208,7 @@
 {
        inited = 1;
        config_handlers = g_hash_table_new (g_str_hash, g_str_equal);
-       g_hash_table_insert (config_handlers, dllmap_handler.element_name, 
&dllmap_handler);
+       g_hash_table_insert (config_handlers, (gpointer) dllmap_handler.element_name, 
+(gpointer) &dllmap_handler);
 }
 
 /* FIXME: error handling */
Index: metadata/monosn.c
===================================================================
RCS file: /cvs/public/mono/mono/metadata/monosn.c,v
retrieving revision 1.4
diff -u -r1.4 monosn.c
--- metadata/monosn.c   5 Dec 2002 11:58:24 -0000       1.4
+++ metadata/monosn.c   4 Feb 2003 17:39:30 -0000
@@ -408,7 +408,7 @@
        int binlen, ret, lenout;
        FILE *file;
        
-       if (!g_file_get_contents (from, &key, &len, NULL)) {
+       if (!g_file_get_contents (from, (gchar**) &key, &len, NULL)) {
                printf ("Cannot load file: %s\n", from);
                return 2;
        }
@@ -461,7 +461,7 @@
                snsize = 0;
        }
        
-       if (!g_file_get_contents (from, &ass, &len, NULL)) {
+       if (!g_file_get_contents (from, (gchar**) &ass, &len, NULL)) {
                printf ("Cannot load file: %s\n", from);
                mono_image_close (image);
                return 2;
Index: metadata/object.c
===================================================================
RCS file: /cvs/public/mono/mono/metadata/object.c,v
retrieving revision 1.137
diff -u -r1.137 object.c
--- metadata/object.c   27 Jan 2003 13:31:59 -0000      1.137
+++ metadata/object.c   4 Feb 2003 17:39:30 -0000
@@ -705,7 +705,6 @@
 {
        MonoDomain *domain;
        gpointer pa [1];
-       MonoObject *res;
        int rval;
 
        g_assert (args);
Index: metadata/reflection.c
===================================================================
RCS file: /cvs/public/mono/mono/metadata/reflection.c,v
retrieving revision 1.135
diff -u -r1.135 reflection.c
--- metadata/reflection.c       4 Feb 2003 10:39:43 -0000       1.135
+++ metadata/reflection.c       4 Feb 2003 17:39:30 -0000
@@ -1026,7 +1026,7 @@
                        g_free (swapped);
                }
 #else
-               idx = add_to_blob_cached (assembly, blob_size, b-blob_size, (const 
char*)mono_string_chars (str), len);
+               idx = add_to_blob_cached (assembly, blob_size, b-blob_size, 
+(char*)mono_string_chars (str), len);
 #endif
 
                g_free (buf);
@@ -2683,7 +2683,7 @@
 
        string_heap_init (&assembly->sheap);
        mono_image_add_stream_data (&assembly->us, "", 1);
-       add_to_blob_cached (assembly, "", 1, NULL, 0);
+       add_to_blob_cached (assembly, (char*) "", 1, NULL, 0);
        /* import tables... */
        mono_image_add_stream_data (&assembly->code, entrycode, sizeof (entrycode));
        assembly->iat_offset = mono_image_add_stream_zero (&assembly->code, 8); /* two 
IAT entries */
Index: metadata/socket-io.c
===================================================================
RCS file: /cvs/public/mono/mono/metadata/socket-io.c,v
retrieving revision 1.26
diff -u -r1.26 socket-io.c
--- metadata/socket-io.c        4 Feb 2003 15:20:14 -0000       1.26
+++ metadata/socket-io.c        4 Feb 2003 17:39:30 -0000
@@ -769,7 +769,7 @@
                sun->sun_path [len - 2] = '\0';
                *sa_size = sizeof (struct sockaddr_un);
 
-               return sun;
+               return (struct sockaddr *)sun;
 #endif
        } else {
                mono_raise_exception(get_socket_exception(WSAEAFNOSUPPORT));
Index: monograph/monograph.c
===================================================================
RCS file: /cvs/public/mono/mono/monograph/monograph.c,v
retrieving revision 1.11
diff -u -r1.11 monograph.c
--- monograph/monograph.c       28 Jan 2003 17:57:11 -0000      1.11
+++ monograph/monograph.c       4 Feb 2003 17:39:31 -0000
@@ -655,10 +655,10 @@
 }
 
 static int
-compare_bblock (void *a, void *b)
+compare_bblock (const void *a, const void *b)
 {
-       MonoBasicBlock **ab = a;
-       MonoBasicBlock **bb = b;
+       MonoBasicBlock * const *ab = a;
+       MonoBasicBlock * const *bb = b;
 
        return (*ab)->cil_code - (*bb)->cil_code;
 }
@@ -795,7 +795,7 @@
                                        target = g_new0 (MonoBasicBlock, 1);
                                        target->cil_code = itarget;
                                        g_ptr_array_add (result, target);
-                                       g_hash_table_insert (table, itarget, target);
+                                       g_hash_table_insert (table, (gpointer) 
+itarget, target);
                                }
                                link_bblock (bb, target);
                        }


Reply via email to