From 599e4f0ec46ae5ca370977c578912ac3a036b2fc Mon Sep 17 00:00:00 2001 From: Damien Guard Date: Wed, 20 Nov 2019 10:21:10 -0800 Subject: [PATCH] Fix a few compiler warnings --- lib/src/query.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/src/query.c b/lib/src/query.c index 6bbf37c2..a933c7f0 100644 --- a/lib/src/query.c +++ b/lib/src/query.c @@ -998,7 +998,7 @@ static inline bool ts_query_cursor__advance(TSQueryCursor *self) { QueryState *state = &self->states.contents[i]; QueryStep *step = &self->query->steps.contents[state->step_index]; - if (state->start_depth + step->depth > self->depth) { + if ((uint32_t)state->start_depth + (uint32_t)step->depth > self->depth) { LOG( " failed to match. pattern:%u, step:%u\n", state->pattern_index, @@ -1130,7 +1130,7 @@ static inline bool ts_query_cursor__advance(TSQueryCursor *self) { // Check that the node matches all of the criteria for the next // step of the pattern.if ( - if (state->start_depth + step->depth != self->depth) continue; + if ((uint32_t)state->start_depth + (uint32_t)step->depth != self->depth) continue; // Determine if this node matches this step of the pattern, and also // if this node can have later siblings that match this step of the @@ -1225,7 +1225,7 @@ static inline bool ts_query_cursor__advance(TSQueryCursor *self) { i--; n--; } else { - array_pop(&self->states); + self->states.size--; } } }