X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=lib%2Fthread.cc;h=8f53e12231f2e3f6a93f70997bb188208a990c76;hp=bc07877847dc85aa1247feedb89c9e25df1885a4;hb=59823f964250be6d0ddbdfc45d4b07803bab267d;hpb=f0dfda5c7797f9db81ce35d270fe0ac406c7fca1 diff --git a/lib/thread.cc b/lib/thread.cc index bc078778..8f53e122 100644 --- a/lib/thread.cc +++ b/lib/thread.cc @@ -238,20 +238,22 @@ _thread_add_message (notmuch_thread_t *thread, char *clean_author; notmuch_bool_t message_excluded = FALSE; - for (tags = notmuch_message_get_tags (message); - notmuch_tags_valid (tags); - notmuch_tags_move_to_next (tags)) - { - tag = notmuch_tags_get (tags); - /* Is message excluded? */ - for (notmuch_string_node_t *term = exclude_terms->head; - term != NULL; - term = term->next) + if (omit_exclude != NOTMUCH_EXCLUDE_FALSE) { + for (tags = notmuch_message_get_tags (message); + notmuch_tags_valid (tags); + notmuch_tags_move_to_next (tags)) { - /* We ignore initial 'K'. */ - if (strcmp(tag, (term->string + 1)) == 0) { - message_excluded = TRUE; - break; + tag = notmuch_tags_get (tags); + /* Is message excluded? */ + for (notmuch_string_node_t *term = exclude_terms->head; + term != NULL; + term = term->next) + { + /* We ignore initial 'K'. */ + if (strcmp(tag, (term->string + 1)) == 0) { + message_excluded = TRUE; + break; + } } } } @@ -522,7 +524,7 @@ _notmuch_thread_create (void *ctx, _resolve_thread_relationships (thread); /* Commit to returning thread. */ - talloc_steal (ctx, thread); + (void) talloc_steal (ctx, thread); DONE: talloc_free (local);