From e76dfbfaa40d8e87116588dfa4c53e7fc552e953 Mon Sep 17 00:00:00 2001 From: Ekaterina Sokolova Date: Wed, 11 Oct 2023 22:33:06 +0300 Subject: [PATCH] [PGPRO-8962] Fix compilation errors via clang-15. 1) remove unused variable 2) suppress error about unused yynerr (bison variable) Tags: jsquery. --- jsonb_gin_ops.c | 2 -- jsquery_gram.y | 5 ++++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/jsonb_gin_ops.c b/jsonb_gin_ops.c index c63cad4..9a72c20 100644 --- a/jsonb_gin_ops.c +++ b/jsonb_gin_ops.c @@ -173,7 +173,6 @@ get_bloom_value(uint32 hash) static uint32 get_path_bloom(PathHashStack *stack) { - int i = 0; uint32 res = 0, val; while (stack) @@ -183,7 +182,6 @@ get_path_bloom(PathHashStack *stack) val = get_bloom_value(hash); res |= val; - i++; stack = stack->parent; } return res; diff --git a/jsquery_gram.y b/jsquery_gram.y index 84621e1..b6a4978 100644 --- a/jsquery_gram.y +++ b/jsquery_gram.y @@ -254,7 +254,10 @@ makeItemList(List *list) { %% result: - expr { *result = $1; } + expr { + *result = $1; + (void) yynerrs; /* suppress compiler warning */ + } | /* EMPTY */ { *result = NULL; } ;