From a3d092a3122abbd214e171679c33314f9bdce542 Mon Sep 17 00:00:00 2001 From: "Fletcher T. Penney" Date: Sun, 5 Nov 2017 21:10:28 -0500 Subject: [PATCH] UPDATED: Silence Xcode static analyzer false positives --- Sources/libMultiMarkdown/aho-corasick.c | 4 ++++ Sources/libMultiMarkdown/writer.c | 2 ++ 2 files changed, 6 insertions(+) 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 -- 2.50.1