aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-text-index.c
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2003-05-17 02:47:59 +0800
committerJeremy Katz <katzj@src.gnome.org>2003-05-17 02:47:59 +0800
commitc8de5a00598fe7c49a76eb949aceeb7b05389978 (patch)
tree04840333ae0f72667caaafe6c65960d1a65270f2 /camel/camel-text-index.c
parent26793306879d948417f52f6cfbd1a8176459e783 (diff)
downloadgsoc2013-evolution-c8de5a00598fe7c49a76eb949aceeb7b05389978.tar.gz
gsoc2013-evolution-c8de5a00598fe7c49a76eb949aceeb7b05389978.tar.zst
gsoc2013-evolution-c8de5a00598fe7c49a76eb949aceeb7b05389978.zip
Ensure cmdbuf is initialized to avoid compiler warning.
2003-05-16 Jeremy Katz <katzj@redhat.com> * 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
Diffstat (limited to 'camel/camel-text-index.c')
-rw-r--r--camel/camel-text-index.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/camel/camel-text-index.c b/camel/camel-text-index.c
index dfc85a1f55..57c9bcaeef 100644
--- a/camel/camel-text-index.c
+++ b/camel/camel-text-index.c
@@ -427,7 +427,7 @@ text_index_compress_nosync(CamelIndex *idx)
goto fail;
rb->names++;
camel_partition_table_add(newp->name_hash, name, newkeyid);
- g_hash_table_insert(remap, (void *)oldkeyid, (void *)newkeyid);
+ g_hash_table_insert(remap, GINT_TO_POINTER(oldkeyid), GINT_TO_POINTER(newkeyid));
} else
io(printf("deleted name '%s'\n", name));
g_free(name);
@@ -453,7 +453,7 @@ text_index_compress_nosync(CamelIndex *idx)
goto fail;
}
for (i=0;i<count;i++) {
- newkeyid = (camel_key_t)g_hash_table_lookup(remap, (void *)records[i]);
+ newkeyid = (camel_key_t)GPOINTER_TO_INT(g_hash_table_lookup(remap, GINT_TO_POINTER(records[i])));
if (newkeyid) {
newrecords[newcount++] = newkeyid;
if (newcount == sizeof(newrecords)/sizeof(newrecords[0])) {
@@ -1275,16 +1275,16 @@ camel_text_index_validate(CamelTextIndex *idx)
keyid = 0;
while ( (keyid = camel_key_table_next(p->name_index, keyid, &word, &flags, &data)) ) {
- if ((oldword = g_hash_table_lookup(names, (void *)keyid)) != NULL
- || (oldword = g_hash_table_lookup(deleted, (void *)keyid)) != NULL) {
+ if ((oldword = g_hash_table_lookup(names, GINT_TO_POINTER(keyid))) != NULL
+ || (oldword = g_hash_table_lookup(deleted, GINT_TO_POINTER(keyid))) != NULL) {
printf("Warning, name '%s' duplicates key (%x) with name '%s'\n", word, keyid, oldword);
g_free(word);
} else {
g_hash_table_insert(name_word, word, (void *)1);
if ((flags & 1) == 0) {
- g_hash_table_insert(names, (void *)keyid, word);
+ g_hash_table_insert(names, GINT_TO_POINTER(keyid), word);
} else {
- g_hash_table_insert(deleted, (void *)keyid, word);
+ g_hash_table_insert(deleted, GINT_TO_POINTER(keyid), word);
}
}
}
@@ -1297,12 +1297,12 @@ camel_text_index_validate(CamelTextIndex *idx)
GHashTable *used;
/* first, check for duplicates of keyid, and data */
- if ((oldword = g_hash_table_lookup(words, (void *)keyid)) != NULL) {
+ if ((oldword = g_hash_table_lookup(words, GINT_TO_POINTER(keyid))) != NULL) {
printf("Warning, word '%s' duplicates key (%x) with name '%s'\n", word, keyid, oldword);
g_free(word);
word = oldword;
} else {
- g_hash_table_insert(words, (void *)keyid, word);
+ g_hash_table_insert(words, GINT_TO_POINTER(keyid), word);
}
if (data == 0) {
@@ -1310,10 +1310,10 @@ camel_text_index_validate(CamelTextIndex *idx)
though it is a problem if its a fresh index */
printf("Word '%s' has no data associated with it\n", word);
} else {
- if ((oldword = g_hash_table_lookup(keys, (void *)data)) != NULL) {
+ if ((oldword = g_hash_table_lookup(keys, GUINT_TO_POINTER(data))) != NULL) {
printf("Warning, word '%s' duplicates data (%x) with name '%s'\n", word, data, oldword);
} else {
- g_hash_table_insert(keys, (void *)data, word);
+ g_hash_table_insert(keys, GUINT_TO_POINTER(data), word);
}
}