1
0
mirror of https://github.com/stedolan/jq.git synced 2024-05-11 05:55:39 +00:00

Remove unused nref accumulator in block_bind_library

detected as a warning compiling jq with clang.
This commit is contained in:
Emanuele Torre
2023-09-28 03:19:53 +02:00
committed by Nico Williams
parent 07149397d1
commit 2b709727a9

View File

@ -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);
}