From: Fletcher T. Penney Date: Mon, 6 Nov 2017 02:10:28 +0000 (-0500) Subject: UPDATED: Silence Xcode static analyzer false positives X-Git-Tag: 6.2.3^2~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a3d092a3122abbd214e171679c33314f9bdce542;p=multimarkdown UPDATED: Silence Xcode static analyzer false positives --- diff --git a/Sources/libMultiMarkdown/aho-corasick.c b/Sources/libMultiMarkdown/aho-corasick.c index 6ad2daf..90cd8bc 100644 --- a/Sources/libMultiMarkdown/aho-corasick.c +++ b/Sources/libMultiMarkdown/aho-corasick.c @@ -478,7 +478,9 @@ void match_set_filter_leftmost_longest(match * header) { m->next->start > m->start && m->next->start < m->start + m->len) { // This match is "lefter" than next +#ifndef __clang_analyzer__ match_excise(m->next); +#endif } while (m->next && @@ -495,7 +497,9 @@ void match_set_filter_leftmost_longest(match * header) { m->prev->start >= m->start) { // We are "lefter" than previous n = m->prev; +#ifndef __clang_analyzer__ match_excise(n); +#endif } m = m->next; diff --git a/Sources/libMultiMarkdown/writer.c b/Sources/libMultiMarkdown/writer.c index 536c97f..f1e90aa 100644 --- a/Sources/libMultiMarkdown/writer.c +++ b/Sources/libMultiMarkdown/writer.c @@ -598,8 +598,10 @@ attr * parse_attributes(char * source) { a->next = attr_new(key, value); a = a->next; } else { +#ifndef __clang_analyzer__ a = attr_new(key, value); attributes = a; +#endif } free(value); // We stored a modified copy