]> granicus.if.org Git - neomutt/commitdiff
fix compilation error at get_nm_message()
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Sun, 26 Feb 2012 14:41:29 +0000 (15:41 +0100)
committerRichard Russon <rich@flatcap.org>
Mon, 4 Apr 2016 15:30:05 +0000 (16:30 +0100)
The shown error is:

mutt_notmuch.c: In function ‘get_nm_message’:
mutt_notmuch.c:643:2: error: too few arguments to function ‘notmuch_database_find_message’
/usr/include/notmuch.h:371:1: note: declared here
make[2]: *** [mutt_notmuch.o] Error 1

The mutt-ks is made for notmuch version 0.8, but in version 0.9 the API
changed, in particular with this commit:

http://git.notmuchmail.org/git/notmuch/commitdiff/02a30767116ad8abcbd0a3351f2e4d43bbbd655f

This patch updates the function notmuch_database_find_message() usage.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
mutt_notmuch.c

index 2f21407745f4b548289448fd0d0059939261ba57..e77f547044eb6554e8b42db2cd34c0d2fddab5df 100644 (file)
@@ -635,12 +635,13 @@ char *nm_uri_from_query(CONTEXT *ctx, char *buf, size_t bufsz)
  */
 static notmuch_message_t *get_nm_message(notmuch_database_t *db, HEADER *hdr)
 {
-       notmuch_message_t *msg;
+       notmuch_message_t *msg = NULL;
        char *id = nm_header_get_id(hdr);
 
        dprint(2, (debugfile, "nm: find message (%s)\n", id));
 
-       msg = id && db ? notmuch_database_find_message(db, id) : NULL;
+       if (id && db)
+               notmuch_database_find_message(db, id, &msg);
 
        FREE(&id);
        return msg;