From patchwork Mon Jul 17 08:41:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 121130 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp981991vqt; Mon, 17 Jul 2023 01:42:10 -0700 (PDT) X-Google-Smtp-Source: APBJJlEw3Dlo44FTOl65G8Q3bBLXc3fjDp9+OXgIm2NgdrRFyieDX/FWKrA/NFe/R1YcIunSax1N X-Received: by 2002:a19:e002:0:b0:4fb:7532:35aa with SMTP id x2-20020a19e002000000b004fb753235aamr6318753lfg.28.1689583330462; Mon, 17 Jul 2023 01:42:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689583330; cv=none; d=google.com; s=arc-20160816; b=faK4ZtFIGjfdyOMaU/TPqQLVuPJ/z/2GGqc8OMY5RaTX3kAOyvpRsI6HkiAlne7rHR Y7AzYujGBZH1vGXpbTD7lJZ9BU/6//ZNzQZaID0Tz/cEBKztmMVxBolR1y+z/bYKnOev VmYTeAE5Z7P0DhN4TIaxo4I8gsP8mfhLUG8UzODLh651Z4NB3thHHzcsIwL//WulL56N uHUz3I4yOrTnMJuXlcj9g4CyDSiCpiZ37ZWMHUs8Ps64SRUmLP9V4cDBoOSN2qdcuMg2 rOqvb5xOrLWp45N80w7g8ebH999GY2mBtPlK86nsT2DT6bo97EIca0xtM4Eldbr5Tyjm qhuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:to :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=9RWBLFmwJUaEhwiPzlHa+2PsizFFnppxSh3h/g221hY=; fh=h5IBC0WV/8GnE6X1jK4wAnIieiATRtXc9ZmwK2VOiCs=; b=mwyAJ3zM1J5PINlhvNNG4Oid2zYDrFhLxolmktt10JLnw5nQI7u7KtunALco+z2qo/ vmyI8I1wbvSsZI2wgeYJx8CoEb6i3tXbdfhml+NRzArO7f6ERlDh38ENRvJ5r8l9pdB1 Abv4ob1vVXzqNnIN82HheYQ5gy4xDkqSDpnbNBqjhIK4pWNUXeP4z3G0ymsmtSlc5x9q JApsLzbxqdrLrh5NmBkFOfdhbDAslJsqZAFK6vh/uFdFcjv/XlR9R1HDgPtuXOkZQqQA /h0HuHPkKP+M3OvPwfhtmFeMY3wlvJqp1uQVZ3cmr6+2hKSRb27glUFac41zM/zNw5uI KjJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=ZGhggGHQ; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id m9-20020aa7c2c9000000b0051e3cc20de5si13670530edp.592.2023.07.17.01.42.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jul 2023 01:42:10 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=ZGhggGHQ; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 511AB3858423 for ; Mon, 17 Jul 2023 08:42:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 511AB3858423 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1689583329; bh=9RWBLFmwJUaEhwiPzlHa+2PsizFFnppxSh3h/g221hY=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=ZGhggGHQsotmi5I7SZzKLWRD2dPP3znHT/QpMVkcgynuMTNTq7GIfk4lkV0tzorEC lowMsEwakViN10oP/zrcly1HdQrG8NIAIqpZz7UEVxBxBD2FZgk47rWzGt5k2kr/OP VYm4OmZVdyVxb+j+Qk9Y87T0fTzfysdnEEUXDc7o= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by sourceware.org (Postfix) with ESMTPS id 157BE3858D33 for ; Mon, 17 Jul 2023 08:41:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 157BE3858D33 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 2C360218B8 for ; Mon, 17 Jul 2023 08:41:58 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 18B1313276 for ; Mon, 17 Jul 2023 08:41:58 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id cVPsBNb+tGToLQAAMHmgww (envelope-from ) for ; Mon, 17 Jul 2023 08:41:58 +0000 To: binutils@sourceware.org Subject: [PATCH] [gdb/build] Fix Wlto-type-mismatch in opcodes/ft32-dis.c Date: Mon, 17 Jul 2023 10:41:46 +0200 Message-Id: <20230717084146.7978-1-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Tom de Vries via Binutils From: Tom de Vries Reply-To: Tom de Vries Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771656530376696530 X-GMAIL-MSGID: 1771656530376696530 Somebody on irc mentioned the following warning. When building gdb with -O2 -flto, we run into: ... opcodes/ft32-dis.c:30: warning: type of 'ft32_opc_info' does not match \ original declaration [-Wlto-type-mismatch] 30 | extern const ft32_opc_info_t ft32_opc_info[128]; | opcodes/ft32-opc.c:25: note: array types have different bounds 25 | const ft32_opc_info_t ft32_opc_info[] = | opcodes/ft32-opc.c:25: note: 'ft32_opc_info' was previously declared here ... Fix this by using ft32_opc_info[] in opcodes/ft32-dis.c. Tested on x86_64-linux. --- opcodes/ft32-dis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) base-commit: 8193fa9cbe1a6cdb2cb41cedb835de33a1c755e3 diff --git a/opcodes/ft32-dis.c b/opcodes/ft32-dis.c index 493297549bf..4c7cac5968d 100644 --- a/opcodes/ft32-dis.c +++ b/opcodes/ft32-dis.c @@ -27,7 +27,7 @@ #include "opcode/ft32.h" #include "disassemble.h" -extern const ft32_opc_info_t ft32_opc_info[128]; +extern const ft32_opc_info_t ft32_opc_info[]; static fprintf_ftype fpr; static void *stream;