diff --git a/src/runtime/alloc.h b/src/runtime/alloc.h index b6ff0902..9561fa1f 100644 --- a/src/runtime/alloc.h +++ b/src/runtime/alloc.h @@ -30,7 +30,7 @@ static inline void *ts_realloc(void *buffer, size_t size) { } static inline void ts_free(void *buffer) { - return ts_record_free(buffer); + ts_record_free(buffer); } static inline bool ts_toggle_allocation_recording(bool value) { diff --git a/src/runtime/document.c b/src/runtime/document.c index d7154a78..c013e8cf 100644 --- a/src/runtime/document.c +++ b/src/runtime/document.c @@ -104,7 +104,7 @@ void ts_document_edit(TSDocument *self, TSInputEdit edit) { } void ts_document_parse(TSDocument *self) { - return ts_document_parse_with_options(self, (TSParseOptions){ + ts_document_parse_with_options(self, (TSParseOptions){ .halt_on_error = false, .changed_ranges = NULL, .changed_range_count = NULL, @@ -113,7 +113,7 @@ void ts_document_parse(TSDocument *self) { void ts_document_parse_and_get_changed_ranges(TSDocument *self, TSRange **ranges, uint32_t *range_count) { - return ts_document_parse_with_options(self, (TSParseOptions){ + ts_document_parse_with_options(self, (TSParseOptions){ .halt_on_error = false, .changed_ranges = ranges, .changed_range_count = range_count, diff --git a/src/runtime/length.h b/src/runtime/length.h index 352215d2..7d2c0b01 100644 --- a/src/runtime/length.h +++ b/src/runtime/length.h @@ -53,7 +53,8 @@ static inline Length length_sub(Length len1, Length len2) { } static inline Length length_zero() { - return (Length){ 0, 0, {0, 0} }; + Length result = {0, 0, {0, 0}}; + return result; } #endif diff --git a/src/runtime/reusable_node.h b/src/runtime/reusable_node.h index 2c7bc58f..510c984a 100644 --- a/src/runtime/reusable_node.h +++ b/src/runtime/reusable_node.h @@ -7,11 +7,8 @@ typedef struct { } ReusableNode; static inline ReusableNode reusable_node_new(Tree *tree) { - return (ReusableNode){ - .tree = tree, - .byte_index = 0, - .preceding_external_token = NULL, - }; + ReusableNode result = {tree, 0, NULL}; + return result; } static inline void reusable_node_pop(ReusableNode *self) {