aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-mt.c
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2003-05-17 02:52:14 +0800
committerJeremy Katz <katzj@src.gnome.org>2003-05-17 02:52:14 +0800
commita878c6c70b44dc2478acf379603c3c69034cfb7f (patch)
treee4f26e0790e437f6f13b5ac299b4ee273d64272f /mail/mail-mt.c
parent9c69964a524cf84e29f22e2394145028d70d06a2 (diff)
downloadgsoc2013-evolution-a878c6c70b44dc2478acf379603c3c69034cfb7f.tar.gz
gsoc2013-evolution-a878c6c70b44dc2478acf379603c3c69034cfb7f.tar.zst
gsoc2013-evolution-a878c6c70b44dc2478acf379603c3c69034cfb7f.zip
Add #include to fix warning.
2003-05-17 Jeremy Katz <katzj@redhat.com> * 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
Diffstat (limited to 'mail/mail-mt.c')
-rw-r--r--mail/mail-mt.c18
1 files changed, 9 insertions, 9 deletions
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;