From: Víctor Manuel Jáquez Leal Date: Sun, 26 Feb 2012 14:41:29 +0000 (+0100) Subject: fix compilation error at get_nm_message() X-Git-Tag: neomutt-20160404~13^2~82 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8e280cd36bf62c4c650553a474dc59e25a23a10b;p=neomutt fix compilation error at get_nm_message() 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 --- diff --git a/mutt_notmuch.c b/mutt_notmuch.c index 2f2140774..e77f54704 100644 --- a/mutt_notmuch.c +++ b/mutt_notmuch.c @@ -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;