opcodes/cr16: remove unused processing_argument_number and imm4flag variables
Remove unused variables `processing_argument_number` and `imm4flag` from cr16 disassembler.
Simon Marchi is removing two unused variables, processing_argument_number and imm4flag, from the CR16 disassembler code. These variables have been unused since the CR16 port was added in 2007 and are now flagged by the compiler’s unused variable warnings, causing build failures.
- proposer
Proposes removing the unused `processing_argument_number` and `imm4flag` variables from `cr16-dis.c`, which cause build errors.
“Building opcodes with a recent clang fails with: /home/smarchi/src/binutils-gdb/opcodes/cr16-dis.c:83:12: error: variable 'processing_argument_number' set but not used [-Werror,-Wunused-but-set-global] /home/smarchi/src/binutils-gdb/opcodes/cr16-dis.c:85:12: error: variable 'imm4flag' set but not used [-Werror,-Wunused-but-set-global] These variables have been unused since the cr16 port…”
In Details
This patch removes two unused global variables, processing_argument_number and imm4flag, from opcodes/cr16-dis.c. The processing_argument_number variable was intended to track the current argument being processed in an instruction, and imm4flag indicated if an instruction used a 4-bit immediate value. Both have been obsolete since the CR16 port's introduction in 2007, as they are never set or used, leading to compiler warnings.