Further compile warning cleanups.
authorJonathan McDowell <noodles@earth.li>
Wed, 16 Jun 2004 17:50:23 +0000 (17:50 +0000)
committerJonathan McDowell <noodles@earth.li>
Wed, 16 Jun 2004 17:50:23 +0000 (17:50 +0000)
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
wordlist.c

index 08aff83f4f2515024950d3388f587ab8f78ceca9..01101f0eaeca4683a077e71fbc7ed45c651ce8ca 100644 (file)
@@ -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,
index a9e20a62e69a682fce1c51d2d134d2d463c79832..71299e12c88fd3e811965bbd337ba8c9ad07fd5b 100644 (file)
@@ -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));
                        }
                }