From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-sender-0.a4lg.com (mail-sender.a4lg.com [153.120.152.154]) by sourceware.org (Postfix) with ESMTPS id 0793B396E468 for ; Sat, 8 Oct 2022 04:35:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0793B396E468 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=irq.a4lg.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=irq.a4lg.com Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id 542BE300089; Sat, 8 Oct 2022 04:35:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=irq.a4lg.com; s=2017s01; t=1665203711; bh=oESbv2Vgx+RhAkCUSqeHSWlQzDYjFd3JMJlJ0Y87N5U=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Mime-Version:Content-Transfer-Encoding; b=kh/+0Md1KPzzQtUagcFbs4yKy18Bwxx9eFf28PcLGjpPFcRJZJQEaF+WJin7OyGmP 5eZ0QM+HLge/eNdy2Fx/ae1RssKJh0X8YWUbSarZrYvcr3y0MoywauxpCNDddmuxqf iMzQEZr7R4IWJ91Iepa0mRRnc+iQ1eFVY+YhpCy0= From: Tsukasa OI To: Tsukasa OI , Nelson Chu , Kito Cheng , Palmer Dabbelt Cc: binutils@sourceware.org Subject: [PATCH 4/5] opcodes/riscv-dis.c: Make XLEN variable static Date: Sat, 8 Oct 2022 04:34:26 +0000 Message-Id: <6e3a9c235e317f441b4383b3daa68f2051bdc149.1665203660.git.research_trasio@irq.a4lg.com> In-Reply-To: References: Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,GIT_PATCH_0,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opcodes/riscv-dis.c b/opcodes/riscv-dis.c index 608670bed7f..27e1978d428 100644 --- a/opcodes/riscv-dis.c +++ b/opcodes/riscv-dis.c @@ -33,7 +33,7 @@ #include /* 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; -- 2.34.1