Fix missing initializer warning in gcc
This commit is contained in:
parent
f1eb9a92a3
commit
048a479b5f
2 changed files with 8 additions and 5 deletions
|
|
@ -8,12 +8,15 @@ struct TSDocument {
|
|||
TSParser *parser;
|
||||
const TSTree *tree;
|
||||
TSInput input;
|
||||
size_t error_count;
|
||||
};
|
||||
|
||||
TSDocument *ts_document_make() {
|
||||
TSDocument *document = malloc(sizeof(TSDocument));
|
||||
*document = (TSDocument) { .input = (TSInput) {} };
|
||||
*document = (TSDocument) {
|
||||
.input = (TSInput) { .data = NULL, .read_fn = NULL, .seek_fn = NULL },
|
||||
.parser = NULL,
|
||||
.tree = NULL
|
||||
};
|
||||
return document;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue