From 2b709727a9654eee3f36399b5fc6b0f83396e7a7 Mon Sep 17 00:00:00 2001 From: Emanuele Torre Date: Thu, 28 Sep 2023 03:19:53 +0200 Subject: [PATCH] Remove unused nref accumulator in block_bind_library detected as a warning compiling jq with clang. --- src/compile.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/compile.c b/src/compile.c index 76d4bcbc..467ea2b0 100644 --- a/src/compile.c +++ b/src/compile.c @@ -372,7 +372,6 @@ static block block_bind(block binder, block body, int bindflags) { block block_bind_library(block binder, block body, int bindflags, const char *libname) { bindflags |= OP_HAS_BINDING; - int nrefs = 0; int matchlen = (libname == NULL) ? 0 : strlen(libname); char *matchname = jv_mem_alloc(matchlen+2+1); matchname[0] = '\0'; @@ -395,7 +394,7 @@ block block_bind_library(block binder, block body, int bindflags, const char *li // This mutation is ugly, even if we undo it curr->symbol = tname; - nrefs += block_bind_subblock(inst_block(curr), body, bindflags2, 0); + block_bind_subblock(inst_block(curr), body, bindflags2, 0); curr->symbol = cname; free(tname); }