From c240368d5da8208c15e0263034384414d938afb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Thu, 22 Dec 2016 09:12:56 +0100 Subject: text: avoid undefined multiple accesses in expression Work around for a (bogus?) tis-interpreter warning. --- text.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'text.c') diff --git a/text.c b/text.c index b92258f..55edf0e 100644 --- a/text.c +++ b/text.c @@ -1341,13 +1341,14 @@ const char *text_newline_char(Text *txt) { } static bool text_iterator_init(Iterator *it, size_t pos, Piece *p, size_t off) { - *it = (Iterator){ + Iterator iter = (Iterator){ .pos = pos, .piece = p, .start = p ? p->data : NULL, .end = p ? p->data + p->len : NULL, .text = p ? p->data + off : NULL, }; + *it = iter; return text_iterator_valid(it); } -- cgit v1.2.3