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
|
|
@ -662,7 +662,7 @@ static StackIterateAction parser__repair_error_callback(
|
|||
StackIterateAction result = StackIterateNone;
|
||||
|
||||
uint32_t last_repair_count = -1;
|
||||
uint32_t repair_reduction_count = -1;
|
||||
uint32_t repair_reduction_count = 0;
|
||||
const TSParseAction *repair_reductions = NULL;
|
||||
|
||||
for (uint32_t i = 0; i < repairs->size; i++) {
|
||||
|
|
@ -845,7 +845,7 @@ static void parser__accept(Parser *self, StackVersion version,
|
|||
|
||||
if (parser__select_tree(self, self->finished_tree, root)) {
|
||||
ts_tree_release(self->finished_tree);
|
||||
assert(root->ref_count > 0);
|
||||
assert(root && root->ref_count > 0);
|
||||
self->finished_tree = root;
|
||||
} else {
|
||||
ts_tree_release(root);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue