From 2eed640f944a24204fa4ed0dbbc80004a800b1eb Mon Sep 17 00:00:00 2001 From: Jonathan McDowell Date: Wed, 16 Jun 2004 17:50:23 +0000 Subject: [PATCH] Further compile warning cleanups. Remove a couple of further compiler warnings about passing strcmp to llfind. Now seems to compile cleanly with gcc -std=c99 and tcc. --- keydb_fs.c | 4 +++- wordlist.c | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/keydb_fs.c b/keydb_fs.c index 08aff83..01101f0 100644 --- a/keydb_fs.c +++ b/keydb_fs.c @@ -347,7 +347,9 @@ static struct ll *internal_get_key_by_word(char *word, struct ll *mct) de = readdir(d); if (de && de->d_name[0] != '.') { if ((!mct) - || (llfind(mct, de->d_name, strcmp) != + || (llfind(mct, de->d_name, + (int (*)(const void *, const void *)) + strcmp) != NULL)) { logthing(LOGTHING_CRITICAL, "Found %s // %s", word, diff --git a/wordlist.c b/wordlist.c index a9e20a6..71299e1 100644 --- a/wordlist.c +++ b/wordlist.c @@ -54,7 +54,9 @@ struct ll *makewordlist(struct ll *wordlist, char *word) end++; } - if (llfind(wordlist, start, strcmp) == NULL) { + if (llfind(wordlist, start, + (int (*)(const void *, const void *)) strcmp + ) == NULL) { wordlist = lladd(wordlist, start); } } @@ -87,7 +89,9 @@ struct ll *makewordlistfromkey(struct ll *wordlist, for (i = 0; uids[i] != NULL; ++i) { words = makewordlist(NULL, uids[i]); for (wl = words; wl != NULL; wl = wl->next) { - if (llfind(wordlist, wl->object, strcmp) == NULL) { + if (llfind(wordlist, wl->object, + (int (*)(const void *, const void *)) strcmp + ) == NULL) { wordlist = lladd(wordlist, strdup(wl->object)); } } -- 2.30.2