From 26d49c2869cd934810c864b1de2a5150f1075122 Mon Sep 17 00:00:00 2001 From: NotZed Date: Wed, 9 Aug 2000 20:34:49 +0000 Subject: Fixed some warnings. 2000-05-11 NotZed * file.c, find.c: Fixed some warnings. svn path=/trunk/; revision=4667 --- libibex/ChangeLog | 4 ++++ libibex/file.c | 4 ++-- libibex/find.c | 10 +++++----- 3 files changed, 11 insertions(+), 7 deletions(-) (limited to 'libibex') diff --git a/libibex/ChangeLog b/libibex/ChangeLog index 6a79d0f2bf..d0a864226e 100644 --- a/libibex/ChangeLog +++ b/libibex/ChangeLog @@ -1,3 +1,7 @@ +2000-05-11 NotZed + + * file.c, find.c: Fixed some warnings. + 2000-05-11 NotZed * index.c (ibex_unindex): Make sure we mark the ibex as dirty. diff --git a/libibex/file.c b/libibex/file.c index c419360e26..70b7ed96cb 100644 --- a/libibex/file.c +++ b/libibex/file.c @@ -121,7 +121,7 @@ ibex_open (char *file, int flags, int mode) ib = g_malloc (sizeof (ibex)); ib->dirty = FALSE; ib->path = g_strdup (file); - ib->files = g_tree_new (strcmp); + ib->files = g_tree_new ((GCompareFunc) strcmp); ib->words = g_hash_table_new (g_str_hash, g_str_equal); ib->oldfiles = g_ptr_array_new (); @@ -324,7 +324,7 @@ ibex_write (ibex *ib) goto lose; iwd.lastname = NULL; - wtree = g_tree_new (strcmp); + wtree = g_tree_new ((GCompareFunc) strcmp); g_hash_table_foreach (ib->words, store_word, wtree); write_number (iwd.f, g_tree_nnodes(wtree)); if (ferror (iwd.f)) diff --git a/libibex/find.c b/libibex/find.c index 1bb58917ac..6b9815f0c0 100644 --- a/libibex/find.c +++ b/libibex/find.c @@ -135,7 +135,7 @@ ibex_find_all (ibex *ib, GPtrArray *words) else if (words->len == 1) return ibex_find (ib, g_ptr_array_index (words, 0)); - work = g_tree_new (strcmp); + work = g_tree_new ((GCompareFunc) strcmp); for (i = 0; i < words->len; i++) { word = g_ptr_array_index (words, i); wrefs = g_hash_table_lookup (ib->words, word); @@ -182,17 +182,17 @@ ibex_dump_foo(char *key, GPtrArray *refs, void *data) { int i; - printf("%s: ", key); + g_print("%s: ", key); for (i=0;ilen;i++) { ibex_file *ibf = g_ptr_array_index (refs, i); - printf("%c%s", ibf->index==-1?'-':' ', ibf->name); + g_print("%c%s", ibf->index==-1?'-':' ', ibf->name); } - printf("\n"); + g_print("\n"); } /* debug function to dump the tree, in key order */ void ibex_dump_all (ibex *ib) { - g_hash_table_foreach(ib->words, ibex_dump_foo, 0); + g_hash_table_foreach(ib->words, (GHFunc) ibex_dump_foo, 0); } -- cgit