2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
authorJeffrey Stedfast <fejj@novell.com>
Thu, 14 Feb 2002 22:23:12 +0000 (22:23 -0000)
committerJeffrey Stedfast <fejj@novell.com>
Thu, 14 Feb 2002 22:23:12 +0000 (22:23 -0000)
* reflection.c (mono_param_get_objects): Cast second argument to
mono_method_get_param_names to a const char** to silence the
compiler warning.

* appdomain.c (mono_domain_assembly_open): Put parens around the
truth statement in the for-loop.

* unicode.c (iconv_convert): Got rid of a compiler warning about
int i being unused when the system has a new iconv.
(iconv_get_length): Same.

svn path=/trunk/mono/; revision=2417

mono/metadata/ChangeLog
mono/metadata/appdomain.c
mono/metadata/reflection.c
mono/metadata/unicode.c

index 4a0db90f815600a99bc699d1623cac4e377974b4..a7251e47569215c29788f3a6ce955b4efc433a43 100644 (file)
@@ -1,5 +1,16 @@
 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
 
+       * reflection.c (mono_param_get_objects): Cast second argument to
+       mono_method_get_param_names to a const char** to silence the
+       compiler warning.
+
+       * appdomain.c (mono_domain_assembly_open): Put parens around the
+       truth statement in the for-loop.
+
+       * unicode.c (iconv_convert): Got rid of a compiler warning about
+       int i being unused when the system has a new iconv.
+       (iconv_get_length): Same.
+
        * image.c (load_class_names): Cast the second argument to
        g_hash_table_insert() to char* to hush compiler warnings about the
        arg being a const.
index 11ad591c111cd932f414e24300b4c436fb40359e..96c8636164a57a9e5b745b3a70f2b1663a168a2c 100644 (file)
@@ -463,7 +463,7 @@ mono_domain_assembly_open (MonoDomain *domain, char *name)
        g_hash_table_insert (domain->assemblies, ass->name, ass);
 
        // fixme: maybe this must be recursive ?
-       for (i = 0; tmp = ass->image->references [i]; i++) {
+       for (i = 0; (tmp = ass->image->references [i]) != NULL; i++) {
                if (!g_hash_table_lookup (domain->assemblies, tmp->name))
                        g_hash_table_insert (domain->assemblies, tmp->name, tmp);
        }
index c17a6ec72a033215076096113ed39eb191da128f..e9a0d3ad9b9aab1ef8e2662e62b172a6d6e77ff1 100644 (file)
@@ -1718,8 +1718,8 @@ mono_param_get_objects (MonoDomain *domain, MonoMethod *method)
                return NULL;
 
        member = mono_method_get_object (domain, method);
-       names = g_new (char*, method->signature->param_count);
-       mono_method_get_param_names (method, names);
+       names = g_new (char *, method->signature->param_count);
+       mono_method_get_param_names (method, (const char **) names);
        
        /* Note: the cache is based on the address of the signature into the method
         * since we already cache MethodInfos with the method as keys.
index 15d63eb2fe68db26910e3fda309e56226fef4e1a..20d0227420c30db1f3f8b2cab244e3eeb0741aba 100644 (file)
@@ -206,7 +206,7 @@ static int
 iconv_get_length (iconv_t cd, guchar *src, int len, gboolean encode)
 {
        guchar buf [512];
-       int i, res;
+       int res;
        guchar *outp;
        guchar *p;
        guint inbytes_remaining;
@@ -214,12 +214,14 @@ iconv_get_length (iconv_t cd, guchar *src, int len, gboolean encode)
        guint outbuf_size;
        gboolean have_error = FALSE;
        size_t err;
-
+       
        g_assert (cd);
        g_assert (src);
 
 #ifndef HAVE_NEW_ICONV
        if (G_BYTE_ORDER == G_LITTLE_ENDIAN && encode) {
+               int i;
+               
                src = g_memdup (src, len);
                for (i = 0; i < len; i += 2) {
                        char t = src [i];
@@ -303,7 +305,6 @@ ves_icall_iconv_get_byte_count (gpointer converter, MonoArray *chars, gint32 ind
 static int
 iconv_convert (iconv_t cd, guchar *src, int len, guchar *dest, int max_len, gboolean encode)
 {
-       int i;
        guchar *p, *outp;
        guint inbytes_remaining;
        guint outbytes_remaining;
@@ -317,6 +318,8 @@ iconv_convert (iconv_t cd, guchar *src, int len, guchar *dest, int max_len, gboo
 
 #ifndef HAVE_NEW_ICONV
        if (G_BYTE_ORDER == G_LITTLE_ENDIAN && encode) {
+               int i;
+               
                src = g_memdup (src, len);
                for (i = 0; i < len; i += 2) {
                        char t = src [i];