From c8de5a00598fe7c49a76eb949aceeb7b05389978 Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Fri, 16 May 2003 18:47:59 +0000 Subject: Ensure cmdbuf is initialized to avoid compiler warning. 2003-05-16 Jeremy Katz * providers/smtp/camel-smtp-transport.c (smtp_helo): Ensure cmdbuf is initialized to avoid compiler warning. * providers/local/camel-mbox-summary.c (summary_header_load): Cast folder_size to uint32 to fix warning. (camel_mbox_summary_sync_mbox): Update for new API. * providers/imap/camel-imap-utils.c (parse_params): imap_parse_nstring expects size_t, not int (imap_body_decode): Likewise. * camel-stream-filter.c (do_read): presize needs to be size_t instead of int. (do_write): Likewise. * camel-seekable-substream.c (stream_read): Return ssize_t instead of int to match prototypes. (stream_write): Likewise. * camel-mime-part.c (construct_from_parser): len needs to be size_t instead of int. * camel-mime-parser.c (folder_scan_step): datalength needs to be a size_t* instead of an int* to make dependent APIs safe. (camel_mime_parser_step): Likewise. (folder_scan_content): Likewise. * camel-mime-parser.h: Likewise. * camel-mime-message.c (camel_mime_message_class_init): Use glib macro for pointer/int conversions. (construct_from_parser): Update for new API. * camel-folder-summary.c (camel_folder_summary_info_new_from_parser): Update len to be size_t for new API. (summary_build_content_info): Likewise. * camel-http-stream.c (http_get_headers): Likewise. * camel-mime-part-utils.c (simple_data_wrapper_construct_from_parser): Likewise. * camel-multipart-signed.c (signed_construct_from_parser): Likewise. * camel-multipart.c (construct_from_parser): Likewise. * camel-folder-search.c (match_words_index): Use glib macros for pointer/int conversions. * camel-html-parser.c (tokenise_setup): Likewise. (convert_entity): Likewise. * camel-block-file.c (block_hash_func): Likewise. (camel_block_file_get_block): Likewise. (camel_block_file_get_block): Likewise. (camel_block_file_detach_block): Likewise. * camel-session.c (session_thread_msg_new): Likewise. (session_thread_msg_free): Likewise. (session_thread_wait): Likewise. * camel-text-index.c (text_index_compress_nosync): Likewise. (text_index_compress_nosync): Likewise. (camel_text_index_validate): Likewise. * camel-vee-folder.c (vee_folder_remove_folder): Likewise. (unmatched_check_uid): Likewise. (folder_added_uid): Likewise. (vee_folder_build_folder): Likewise. (folder_changed_add_uid): Likewise. (folder_changed_remove_uid): Likewise. * providers/imap/camel-imap-search.c (imap_body_contains): Likewise. * providers/pop3/camel-pop3-folder.c (cmd_list): Likewise. (cmd_uidl): Likewise. * camel-data-cache.c (data_cache_init): Cast to CamelCopyFunc. Fixes a warning. svn path=/trunk/; revision=21220 --- camel/camel-vee-folder.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'camel/camel-vee-folder.c') diff --git a/camel/camel-vee-folder.c b/camel/camel-vee-folder.c index 9422f77e19..a20565f56c 100644 --- a/camel/camel-vee-folder.c +++ b/camel/camel-vee-folder.c @@ -955,7 +955,7 @@ vee_folder_remove_folder(CamelVeeFolder *vf, CamelFolder *source, int killun) camel_folder_change_info_add_uid(folder_unmatched->changes, oldkey); g_free(oldkey); } else { - g_hash_table_insert(unmatched_uids, oldkey, (void *)(n-1)); + g_hash_table_insert(unmatched_uids, oldkey, GINT_TO_POINTER(n-1)); } } } else { @@ -1009,7 +1009,7 @@ unmatched_check_uid(char *uidin, void *value, struct _update_data *u) uid = alloca(strlen(uidin)+9); memcpy(uid, u->hash, 8); strcpy(uid+8, uidin); - n = (int)g_hash_table_lookup(unmatched_uids, uid); + n = GPOINTER_TO_INT(g_hash_table_lookup(unmatched_uids, uid)); if (n == 0) { if (vee_folder_add_uid(folder_unmatched, u->source, uidin, u->hash)) camel_folder_change_info_add_uid(folder_unmatched->changes, uid); @@ -1035,9 +1035,9 @@ folder_added_uid(char *uidin, void *value, struct _update_data *u) if (!CAMEL_IS_VEE_FOLDER(u->source)) { if (g_hash_table_lookup_extended(unmatched_uids, camel_message_info_uid(mi), (void **)&oldkey, (void **)&n)) { - g_hash_table_insert(unmatched_uids, oldkey, (void *)(n+1)); + g_hash_table_insert(unmatched_uids, oldkey, GINT_TO_POINTER(n+1)); } else { - g_hash_table_insert(unmatched_uids, g_strdup(camel_message_info_uid(mi)), (void *)1); + g_hash_table_insert(unmatched_uids, g_strdup(camel_message_info_uid(mi)), GINT_TO_POINTER(1)); } } } @@ -1106,7 +1106,7 @@ vee_folder_build_folder(CamelVeeFolder *vf, CamelFolder *source, CamelException g_hash_table_remove(unmatched_uids, oldkey); g_free(oldkey); } else { - g_hash_table_insert(unmatched_uids, oldkey, (void *)(n-1)); + g_hash_table_insert(unmatched_uids, oldkey, GINT_TO_POINTER(n-1)); } } } else { @@ -1207,7 +1207,7 @@ folder_changed_add_uid(CamelFolder *sub, const char *uid, const char hash[8], Ca if ((vf->flags & CAMEL_STORE_FOLDER_PRIVATE) == 0 && !CAMEL_IS_VEE_FOLDER(sub)) { if (g_hash_table_lookup_extended(unmatched_uids, vuid, (void **)&oldkey, (void **)&n)) { - g_hash_table_insert(unmatched_uids, oldkey, (void *)(n+1)); + g_hash_table_insert(unmatched_uids, oldkey, GINT_TO_POINTER(n+1)); } else { g_hash_table_insert(unmatched_uids, g_strdup(vuid), (void *)1); } @@ -1248,7 +1248,7 @@ folder_changed_remove_uid(CamelFolder *sub, const char *uid, const char hash[8], camel_folder_change_info_add_uid(folder_unmatched->changes, oldkey); g_free(oldkey); } else { - g_hash_table_insert(unmatched_uids, oldkey, (void *)(n-1)); + g_hash_table_insert(unmatched_uids, oldkey, GINT_TO_POINTER(n-1)); } } else { if (vee_folder_add_uid(folder_unmatched, sub, uid, hash)) -- cgit v1.2.3