summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2025-11-14 09:44:55 +0000
committerAaron Merey <amerey@redhat.com>2025-11-14 10:04:01 -0500
commitd5987fcafa5dec3d900695afa6841cef98e1e0c4 (patch)
tree440b9bae031145835fb8533d5558cc741e50e67c
parentdcb6903191dab201efa5fc4881eddc2ae63ed8bf (diff)
libcpu/i386_parse.y: drop unused `cnt` variableupstream/main
Without the change the build fails on `gcc-16` as: i386_parse.y: In function 'instrtable_out': i386_parse.y:1245:10: error: variable 'cnt' set but not used [-Werror=unused-but-set-variable=] 1245 | size_t cnt = 0; | ^~~ Signed-off-by: Sergei Trofimovich <slyich@gmail.com>
-rw-r--r--libcpu/i386_parse.y3
1 files changed, 1 insertions, 2 deletions
diff --git a/libcpu/i386_parse.y b/libcpu/i386_parse.y
index 5c91e520..afe488fc 100644
--- a/libcpu/i386_parse.y
+++ b/libcpu/i386_parse.y
@@ -1242,8 +1242,7 @@ instrtable_out (void)
fputs ("};\n", outfile);
fputs ("static const uint8_t match_data[] =\n{\n", outfile);
- size_t cnt = 0;
- for (instr = instructions; instr != NULL; instr = instr->next, ++cnt)
+ for (instr = instructions; instr != NULL; instr = instr->next)
{
/* First count the number of bytes. */
size_t totalbits = 0;