From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id UaLLKDBWnGmXMQcAWB0awg (envelope-from ) for ; Mon, 23 Feb 2026 08:29:20 -0500 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=polymtl.ca header.i=@polymtl.ca header.a=rsa-sha256 header.s=oct2025 header.b=HUZ84yux; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id A17471E0BA; Mon, 23 Feb 2026 08:29:20 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id E32651E089 for ; Mon, 23 Feb 2026 08:29:19 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id D56F34BA23F2 for ; Mon, 23 Feb 2026 13:29:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D56F34BA23F2 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=polymtl.ca header.i=@polymtl.ca header.a=rsa-sha256 header.s=oct2025 header.b=HUZ84yux Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 80F204BA2E16; Mon, 23 Feb 2026 13:28:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 80F204BA2E16 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=polymtl.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=polymtl.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 80F204BA2E16 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=132.207.4.11 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1771853299; cv=none; b=TGprcQYaNVpsa/bHjqqR+QXB7m/tWQMKWPV1pB9eWxNztrJlL1YpKKkDdlrTPaGk9cZBu+ULrTkG3oDcD5B6KnqylCnKVE3fuOWVb8MkPoTFFqFnX1ale57YHUnLsH9vvxht0xCNaKKYheUPRSIOnC/3uI3XNCYfLaUJQc7skro= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1771853299; c=relaxed/simple; bh=NESdHiLYw96SV3LthD0eZfxtVxhUO11CP3xvraDOx7M=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=S/1YnVdbJDmPtXYti31iC4nlkC0Vns4vzRUsc4TK46pwVpvnvmFljMZBwpnURMJ8t+0ZfJv1eveu2m2OeKYwRHsHAHZ4HW8sQ9ICbcQAqaKDj+abM4MUr/1rtVDGDi75wNFn6lh3hz4dMARdl0yziQipzPBG804KRDT5cKBp5NM= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 80F204BA2E16 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 61NDSC71019323 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 23 Feb 2026 08:28:17 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 61NDSC71019323 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=oct2025; t=1771853297; bh=9H92wRuJ1nzq4fQM5FnrlDoYb0IVnUK/Ytpvu0YmUmk=; h=From:To:Cc:Subject:Date:In-Reply-To:From; b=HUZ84yux4siph2KbALbhE0lcGc/sKnek7NxEd6Mvz9TInXrmvwAhqGig5pT+Ly5Mh gx7OozcZi8KQhRCtTfLHBGoTKpFEbJAd/0XhizsVQCfOsEG5pTYjq4I/XwsrxWb5c6 EhyTBcqQfKlL/1ILx0yXtuY4Ka7Xb21gXnp/MI8T04n6QvujnWIIeGhVm/3lrx7e7C cilD6iEab6X7tENHJxIwvZqVZstvivYOp7/gE02C90ic9YcexqVvG3E5KprSVnS2GX FKJHPy9hg5DXvdMafes9KBtlrYAy/HpknaaZ6Uje7g5XJPuqEBE6g9l+tjPTEnK5d6 f/i1PEiuVEpHQ== Received: by simark.ca (Postfix) id 4FC751E0BA; Mon, 23 Feb 2026 08:28:12 -0500 (EST) From: simon.marchi@polymtl.ca To: gdb-patches@sourceware.org, binutils@sourceware.org Cc: Simon Marchi Subject: [PATCH 2/3] opcodes: fix a few -Wdiscarded-qualifiers errors Date: Mon, 23 Feb 2026 08:26:37 -0500 Message-ID: <20260223132805.3186869-3-simon.marchi@polymtl.ca> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260223132805.3186869-1-simon.marchi@polymtl.ca> References: <20260223132805.3186869-1-simon.marchi@polymtl.ca> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Mon, 23 Feb 2026 13:28:12 +0000 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org From: Simon Marchi Change-Id: Ifd43eb7ceee3bebc8be690a7fba94fc8651ffcd6 --- opcodes/aarch64-dis.c | 2 +- opcodes/ia64-opc.c | 2 +- opcodes/ip2k-asm.c | 2 +- opcodes/riscv-dis.c | 4 ++-- opcodes/tilegx-opc.c | 2 +- opcodes/tilepro-opc.c | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/opcodes/aarch64-dis.c b/opcodes/aarch64-dis.c index 8cc2eb3f3c20..f09307847e64 100644 --- a/opcodes/aarch64-dis.c +++ b/opcodes/aarch64-dis.c @@ -4087,7 +4087,7 @@ print_operands (bfd_vma pc, const aarch64_opcode *opcode, static void remove_dot_suffix (char *name, const aarch64_inst *inst) { - char *ptr; + const char *ptr; size_t len; ptr = strchr (inst->opcode->name, '.'); diff --git a/opcodes/ia64-opc.c b/opcodes/ia64-opc.c index 5d79cf3d041a..79c12a840a74 100644 --- a/opcodes/ia64-opc.c +++ b/opcodes/ia64-opc.c @@ -66,7 +66,7 @@ const struct ia64_templ_desc ia64_templ_desc[16] = static void get_opc_prefix (const char **ptr, char *dest) { - char *c = strchr (*ptr, '.'); + const char *c = strchr (*ptr, '.'); if (c != NULL) { memcpy (dest, *ptr, c - *ptr); diff --git a/opcodes/ip2k-asm.c b/opcodes/ip2k-asm.c index 18bd98a28463..3adbd1546a38 100644 --- a/opcodes/ip2k-asm.c +++ b/opcodes/ip2k-asm.c @@ -59,7 +59,7 @@ parse_fr (CGEN_CPU_DESC cd, { const char *errmsg; const char *old_strp; - char *afteroffset; + const char *afteroffset; enum cgen_parse_operand_result result_type; bfd_vma value; extern CGEN_KEYWORD ip2k_cgen_opval_register_names; diff --git a/opcodes/riscv-dis.c b/opcodes/riscv-dis.c index 03c8cf1e344c..eda802ff4202 100644 --- a/opcodes/riscv-dis.c +++ b/opcodes/riscv-dis.c @@ -110,7 +110,7 @@ parse_riscv_dis_option_without_args (const char *option, /* Parse RISC-V disassembler option (possibly with arguments). */ static void -parse_riscv_dis_option (const char *option, struct disassemble_info *info) +parse_riscv_dis_option (char *option, struct disassemble_info *info) { char *equal, *value; @@ -1140,7 +1140,7 @@ riscv_update_map_state (int n, /* ISA mapping string may be numbered, suffixed with '.n'. Do not consider this as part of the ISA string. */ - char *suffix = strchr (name, '.'); + const char *suffix = strchr (name, '.'); if (suffix) { int suffix_index = (int)(suffix - name); diff --git a/opcodes/tilegx-opc.c b/opcodes/tilegx-opc.c index db762e224932..a1d42d6e18d0 100644 --- a/opcodes/tilegx-opc.c +++ b/opcodes/tilegx-opc.c @@ -8003,7 +8003,7 @@ tilegx_spr_compare (const void *a_ptr, const void *b_ptr) const char * get_tilegx_spr_name (int num) { - void *result; + const void *result; struct tilegx_spr key; key.number = num; diff --git a/opcodes/tilepro-opc.c b/opcodes/tilepro-opc.c index 664122b05d51..a96388836953 100644 --- a/opcodes/tilepro-opc.c +++ b/opcodes/tilepro-opc.c @@ -10119,7 +10119,7 @@ tilepro_spr_compare (const void *a_ptr, const void *b_ptr) const char * get_tilepro_spr_name (int num) { - void *result; + const void *result; struct tilepro_spr key; key.number = num; -- 2.53.0