diff options
| author | Sergei Trofimovich <[email protected]> | 2025-11-14 09:44:55 +0000 |
|---|---|---|
| committer | Aaron Merey <[email protected]> | 2025-11-14 10:04:01 -0500 |
| commit | d5987fcafa5dec3d900695afa6841cef98e1e0c4 (patch) | |
| tree | 440b9bae031145835fb8533d5558cc741e50e67c | |
| parent | dcb6903191dab201efa5fc4881eddc2ae63ed8bf (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 <[email protected]>
| -rw-r--r-- | libcpu/i386_parse.y | 3 |
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; |
