Merge pull request #77 from philipturnbull/scan-build-fixes
Fix errors found by scan-build
This commit is contained in:
commit
513edec7c1
8 changed files with 53 additions and 10 deletions
|
|
@ -71,8 +71,8 @@ void *ts_record_calloc(size_t count, size_t size) {
|
|||
}
|
||||
|
||||
void ts_record_free(void *pointer) {
|
||||
free(pointer);
|
||||
record_deallocation(pointer);
|
||||
free(pointer);
|
||||
}
|
||||
|
||||
bool ts_record_allocations_toggle(bool value) {
|
||||
|
|
|
|||
|
|
@ -385,7 +385,7 @@ describe("Document", [&]() {
|
|||
ts_document_set_language(document, load_real_language("json"));
|
||||
ts_document_set_input_string(document, input_string.c_str());
|
||||
|
||||
TSParseOptions options;
|
||||
TSParseOptions options = {};
|
||||
options.changed_ranges = nullptr;
|
||||
|
||||
options.halt_on_error = false;
|
||||
|
|
@ -413,7 +413,7 @@ describe("Document", [&]() {
|
|||
ts_document_set_language(document, load_real_language("json"));
|
||||
ts_document_set_input_string(document, input_string.c_str());
|
||||
|
||||
TSParseOptions options;
|
||||
TSParseOptions options = {};
|
||||
options.changed_ranges = nullptr;
|
||||
options.halt_on_error = true;
|
||||
ts_document_parse_with_options(document, options);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue