]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
opcodes/riscv-dis.c: Make XLEN variable static
authorTsukasa OI <research_trasio@irq.a4lg.com>
Sat, 27 Aug 2022 13:33:51 +0000 (13:33 +0000)
committerTsukasa OI <research_trasio@irq.a4lg.com>
Fri, 14 Oct 2022 05:21:41 +0000 (05:21 +0000)
Before changing the core disassembler, we take care of minor code clarity
issues and improve readability.

Since xlen variable is not (and should not) used outside riscv-dis.c,
this commit makes this variable static.

opcodes/ChangeLog:

* riscv-dis.c (xlen): Make this variable static.

opcodes/riscv-dis.c

index 608670bed7f2870b1f6945f497c7059cb3b21da4..27e1978d42833cf13f09e3623c764fbc2c1ece29 100644 (file)
@@ -33,7 +33,7 @@
 #include <ctype.h>
 
 /* Current XLEN for the disassembler.  */
-unsigned xlen = 0;
+static unsigned xlen = 0;
 
 /* Default ISA specification version (constant as of now).  */
 static enum riscv_spec_class default_isa_spec = ISA_SPEC_CLASS_DRAFT - 1;