From a878c6c70b44dc2478acf379603c3c69034cfb7f Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Fri, 16 May 2003 18:52:14 +0000 Subject: Add #include to fix warning. 2003-05-17 Jeremy Katz * mail-offline-handler.c: Add #include to fix warning. * mail-mt.c (mail_msg_new): Use glib macros for pointer/int conversions. (mail_msg_free): Likewise. (mail_msg_cancel): Likewise. (mail_msg_wait): Likewise. (mail_msg_active): Likewise. * mail-session.c (main_register_timeout): Likewise. (register_timeout): Likewise. (main_remove_timeout): Likewise. (remove_timeout): Likewise. * message-list.c (ml_value_to_string): Likewise. * mail-identify.c: Add #include to fix warning. * mail-config.c (config_write_fonts): Don't pass extra arguments to g_warning. * mail-callbacks.c: Add #include to fix warning. svn path=/trunk/; revision=21222 --- mail/mail-mt.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'mail/mail-mt.c') diff --git a/mail/mail-mt.c b/mail/mail-mt.c index ac67fc4485..0cef1f2b30 100644 --- a/mail/mail-mt.c +++ b/mail/mail-mt.c @@ -114,11 +114,11 @@ void *mail_msg_new(mail_msg_op_t *ops, EMsgPort *reply_port, size_t size) msg->ops = ops; msg->seq = mail_msg_seq++; msg->msg.reply_port = reply_port; - msg->cancel = camel_operation_new(mail_operation_status, (void *)msg->seq); + msg->cancel = camel_operation_new(mail_operation_status, GINT_TO_POINTER(msg->seq)); camel_exception_init(&msg->ex); msg->priv = g_malloc0(sizeof(*msg->priv)); - g_hash_table_insert(mail_msg_active_table, (void *)msg->seq, msg); + g_hash_table_insert(mail_msg_active_table, GINT_TO_POINTER(msg->seq), msg); d(printf("New message %p\n", msg)); @@ -184,7 +184,7 @@ void mail_msg_free(void *msg) fprintf(log, "%p: Free (exception `%s')\n", msg, camel_exception_get_description(&m->ex)?camel_exception_get_description(&m->ex):"None"); #endif - g_hash_table_remove(mail_msg_active_table, (void *)m->seq); + g_hash_table_remove(mail_msg_active_table, GINT_TO_POINTER(m->seq)); pthread_cond_broadcast(&mail_msg_cond); /* We need to make sure we dont lose a reference here YUCK YUCK */ @@ -281,7 +281,7 @@ void mail_msg_cancel(unsigned int msgid) struct _mail_msg *m; MAIL_MT_LOCK(mail_msg_lock); - m = g_hash_table_lookup(mail_msg_active_table, (void *)msgid); + m = g_hash_table_lookup(mail_msg_active_table, GINT_TO_POINTER(msgid)); if (m && m->cancel) camel_operation_cancel(m->cancel); @@ -299,20 +299,20 @@ void mail_msg_wait(unsigned int msgid) if (ismain) { MAIL_MT_LOCK(mail_msg_lock); - m = g_hash_table_lookup(mail_msg_active_table, (void *)msgid); + m = g_hash_table_lookup(mail_msg_active_table, GINT_TO_POINTER(msgid)); while (m) { MAIL_MT_UNLOCK(mail_msg_lock); gtk_main_iteration(); MAIL_MT_LOCK(mail_msg_lock); - m = g_hash_table_lookup(mail_msg_active_table, (void *)msgid); + m = g_hash_table_lookup(mail_msg_active_table, GINT_TO_POINTER(msgid)); } MAIL_MT_UNLOCK(mail_msg_lock); } else { MAIL_MT_LOCK(mail_msg_lock); - m = g_hash_table_lookup(mail_msg_active_table, (void *)msgid); + m = g_hash_table_lookup(mail_msg_active_table, GINT_TO_POINTER(msgid)); while (m) { pthread_cond_wait(&mail_msg_cond, &mail_msg_lock); - m = g_hash_table_lookup(mail_msg_active_table, (void *)msgid); + m = g_hash_table_lookup(mail_msg_active_table, GINT_TO_POINTER(msgid)); } MAIL_MT_UNLOCK(mail_msg_lock); } @@ -326,7 +326,7 @@ int mail_msg_active(unsigned int msgid) if (msgid == (unsigned int)-1) active = g_hash_table_size(mail_msg_active_table) > 0; else - active = g_hash_table_lookup(mail_msg_active_table, (void *)msgid) != NULL; + active = g_hash_table_lookup(mail_msg_active_table, GINT_TO_POINTER(msgid)) != NULL; MAIL_MT_UNLOCK(mail_msg_lock); return active; -- cgit