From 8d1b9501abb846e635ea59623cfbb3ce8b5437f3 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Fri, 20 Nov 2015 11:47:39 -0800 Subject: [PATCH] Fix integer comparison warnings --- src/runtime/parser.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/runtime/parser.c b/src/runtime/parser.c index 1b9cf0f6..ef6dc466 100644 --- a/src/runtime/parser.c +++ b/src/runtime/parser.c @@ -1,6 +1,7 @@ #include "runtime/parser.h" #include #include +#include #include "tree_sitter/runtime.h" #include "tree_sitter/parser.h" #include "runtime/tree.h" @@ -8,8 +9,6 @@ #include "runtime/length.h" #include "runtime/vector.h" -#include - /* * Debugging */ @@ -144,7 +143,7 @@ static TSTree *ts_parser__get_next_lookahead(TSParser *self, int head) { static int ts_parser__split(TSParser *self, int head) { int result = ts_stack_split(self->stack, head); - assert(result == self->head_states.size); + assert(result == (int)self->head_states.size); HeadState head_state = *(HeadState *)vector_get(&self->head_states, head); vector_push(&self->head_states, &head_state); return result; @@ -179,7 +178,7 @@ static bool ts_parser__shift_extra(TSParser *self, int head, TSStateId state) { } static TSTree *ts_parser__reduce(TSParser *self, int head, TSSymbol symbol, - size_t child_count, bool extra, + int child_count, bool extra, bool count_extra) { vector_clear(&self->reduce_parents); TSNodeType node_type = self->language->node_types[symbol];