From e4c37cbf0ef75bfe7801d65dc3c764c7ddba090b Mon Sep 17 00:00:00 2001 From: Dave Beckett Date: Tue, 6 Oct 2020 20:12:37 -0700 Subject: (raptor_stringbuffer_append_turtle_string): Work around clang --analyze warning not understanding ownership model --- src/turtle_common.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/turtle_common.c b/src/turtle_common.c index adb68e63..c822b347 100644 --- a/src/turtle_common.c +++ b/src/turtle_common.c @@ -200,6 +200,10 @@ raptor_stringbuffer_append_turtle_string(raptor_stringbuffer* stringbuffer, /* calculate output string size */ len = d-string; +#ifdef __clang_analyzer__ + /* clang --analyze does not know about ownership of next call */ + free(string); string = NULL; +#endif /* string gets owned by the stringbuffer after this */ return raptor_stringbuffer_append_counted_string(stringbuffer, string, len, 0); -- cgit v1.2.1