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.
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);
}
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.
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;
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];
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;
#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];