From dd651787245d89237ae3d7c0eee0957de22437ae Mon Sep 17 00:00:00 2001 From: Rongsong Shen Date: Thu, 8 May 2025 09:13:06 +0800 Subject: [PATCH] fix issue of unused variable --- compiler/capnpc-c.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/capnpc-c.c b/compiler/capnpc-c.c index 6fae492..74e1efa 100644 --- a/compiler/capnpc-c.c +++ b/compiler/capnpc-c.c @@ -929,6 +929,8 @@ static void mk_simple_list_free(struct str *func, const char *tab, str_addf(func, "if (1) {\n"); str_add(func, tab, -1); str_addf(func, "\tint i_, nc_ = d->%s;\n", cvar); + str_add(func, tab, -1); + str_addf(func, "\tcapnp_use(i_);capnp_use(nc_);\n"); if (strcmp(list_type, "text") == 0) { str_add(func, tab, -1); str_addf(func, "\tfor(i_ = 0; i_ < nc_; i_ ++) {\n");