From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-sender-0.a4lg.com (mail-sender-0.a4lg.com [IPv6:2401:2500:203:30b:4000:6bfe:4757:0]) by sourceware.org (Postfix) with ESMTPS id 8284C39730DB for ; Sat, 8 Oct 2022 04:35:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8284C39730DB 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 D5C1C300089; Sat, 8 Oct 2022 04:35:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=irq.a4lg.com; s=2017s01; t=1665203722; bh=MUQGE3Wc9vh8DdGshamFB+89NN4CEoflsmMVyBjr0/E=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Mime-Version:Content-Transfer-Encoding; b=Xj5IxnBkO69ijm4Zd1Dvek8EjzrGeOzkt7iKF7oDguj4Anc9w1nitdqs9CjhkHsSU UGycPouQgsNreeDCCIP7Df94ZXcFPjNrrC1khsxiRgvoNUluQjK5u8eMux7hK/7PQ3 nypLN4Xt8N2byp0sRlknXCnSqPQVM0jkH5EovirI= From: Tsukasa OI To: Tsukasa OI , Nelson Chu , Kito Cheng , Palmer Dabbelt Cc: binutils@sourceware.org Subject: [PATCH 5/5] opcodes/riscv-dis.c: Remove last_map_state Date: Sat, 8 Oct 2022 04:34:27 +0000 Message-Id: In-Reply-To: References: Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.1 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. This commit removes unused variable last_map_state (set by the print_insn_riscv function but not read anywhere else). opcodes/ChangeLog: * riscv-dis.c (last_map_state): Remove. (print_insn_riscv): Remove setting last_map_state. --- opcodes/riscv-dis.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/opcodes/riscv-dis.c b/opcodes/riscv-dis.c index 27e1978d428..daeb1b5fd15 100644 --- a/opcodes/riscv-dis.c +++ b/opcodes/riscv-dis.c @@ -64,7 +64,6 @@ struct riscv_private_data /* Used for mapping symbols. */ static int last_map_symbol = -1; static bfd_vma last_stop_offset = 0; -enum riscv_seg_mstate last_map_state; /* Register names as used by the disassembler. */ static const char * const *riscv_gpr_names; @@ -1041,8 +1040,6 @@ print_insn_riscv (bfd_vma memaddr, struct disassemble_info *info) set_default_riscv_dis_options (); mstate = riscv_search_mapping_symbol (memaddr, info); - /* Save the last mapping state. */ - last_map_state = mstate; /* Set the size to dump. */ if (mstate == MAP_DATA -- 2.34.1