From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id nSnwNpd5oWXnxjkAWB0awg (envelope-from ) for ; Fri, 12 Jan 2024 12:40:39 -0500 Authentication-Results: simark.ca; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=dinux.eu header.i=@dinux.eu header.a=rsa-sha256 header.s=default header.b=U6WXwodx; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id D5E5B1E0C2; Fri, 12 Jan 2024 12:40:39 -0500 (EST) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (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 449291E098 for ; Fri, 12 Jan 2024 12:40:36 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 933573858414 for ; Fri, 12 Jan 2024 17:40:35 +0000 (GMT) Received: from server28.superhosting.bg (server28.superhosting.bg [217.174.156.11]) by sourceware.org (Postfix) with ESMTPS id A63C73858D20 for ; Fri, 12 Jan 2024 17:40:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A63C73858D20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=dinux.eu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=dinux.eu ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A63C73858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=217.174.156.11 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705081215; cv=none; b=lX1xr8ZazMey+Wto9DT7EkRJhMlizdiKt5oj2ghzXePGLFegSC3tOfHUvwKgFsTYfZ4ahPeLkWAdzfiErXAAbBaa8s7mYNiv6rGDv678buWH3kEqQXTunAQtcoAesVx20mbj6PRpynw81lVwMAQ2m7mC3FgTQ+P8h7pAD2tDUdc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705081215; c=relaxed/simple; bh=RbpPw3N31UsHFdQC2dOQVm1+sVqSANjV1VjRwE/nBHc=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=dd2v2Z5GduSegttdIaRTIkzOnsmMQ94WYz+5LBVn4aMANb1Vee8aw2FjeNmr6NvZE2dx/IpLh337oTrZmmR8oMPW3hfjsfU/65JRElVntjvnqWgGDLopz599rp/FJ8UB3r6l5k510pxSvNdXEgtbEPfWCA6yDnrCoW1lDz18RSg= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dinux.eu; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID: Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=MIo9TimkkYqflxa+QFzF/4J+O9R4i5/nAfhgfdJ6wrk=; b=U6WXwodxYMLxvPRWX41pZtVAgg XBfnmsXBDqoF4y6ObpjgDmDN3G5DeJGrLVBIoQ6SFMFQwYzvU9MvEb9j7NT1+dHGBypR5TfW6x/Vo gDtshFqbViB9wMOnEjU/uKxwEHpAhKsdFQ65ZhdonsMSVXChzPqpm8I/KotceEjov522PKMiGlUhi HpjPz0PBt7Idrvpt8FvB0iWYhgy294xNlbC3xLVs8YNaYiCr75SpV9MNkNMIqJoDdEfy8/LyzJCmO Hao3M9ud0r+a/4odL7F8a1AEhlA1JtizTwNxzgViZTesw0iuNyGW12ZjW44RZrx3y//mg8wvtKz+G h/mqrKhg==; Received: from [95.42.20.142] (port=43076 helo=kendros.lan) by server28.superhosting.bg with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1rOLVm-0004X2-1p; Fri, 12 Jan 2024 19:40:09 +0200 From: Dimitar Dimitrov To: gdb-patches@sourceware.org Cc: Dimitar Dimitrov Subject: [PATCH] sim: Fix compile errors Date: Fri, 12 Jan 2024 19:40:01 +0200 Message-ID: <20240112174001.403010-1-dimitar@dinux.eu> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server28.superhosting.bg X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - dinux.eu X-Get-Message-Sender-Via: server28.superhosting.bg: authenticated_id: dimitar@dinux.eu X-Authenticated-Sender: server28.superhosting.bg: dimitar@dinux.eu X-Source: X-Source-Args: X-Source-Dir: 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, KAM_SHORT, SPF_HELO_PASS, 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: 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 The following change broke simulator testsuite with host GCC 13: commit 435ad222b3de93fa647fba7221eece36b1b395eb sim: warnings: compile build tools with -Werror too Host GCC13 complains about missing function prototypes: binutils/sim/testsuite/common/bits-gen.c:26:1: error: no previous prototype for ‘gen_struct’ [-Werror=missing-prototypes] 26 | gen_struct (void) | ^~~~~~~~~~ Fix by making the functions static, which instructs the compiler that there is no need for a prototype. Signed-off-by: Dimitar Dimitrov --- sim/testsuite/common/alu-n-tst.h | 4 ++-- sim/testsuite/common/bits-gen.c | 10 +++++----- sim/testsuite/common/bits-tst.c | 10 +++++----- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/sim/testsuite/common/alu-n-tst.h b/sim/testsuite/common/alu-n-tst.h index 14abe86e8a7..ffd962cb0c2 100644 --- a/sim/testsuite/common/alu-n-tst.h +++ b/sim/testsuite/common/alu-n-tst.h @@ -27,7 +27,7 @@ #define do_op_N XCONCAT2(do_op_,N) -void +static void do_op_N (const alu_test *tst) { const alu_op *op; @@ -120,7 +120,7 @@ do_op_N (const alu_test *tst) } -const alu_test alu_N_tests[] = { +static const alu_test alu_N_tests[] = { /* 0 + 0; 0 + 1; 1 + 0; 1 + 1 */ { 0, { { "ADDC", 0 }, }, 0, 0, 0, }, diff --git a/sim/testsuite/common/bits-gen.c b/sim/testsuite/common/bits-gen.c index d8818754d46..fc1333be945 100644 --- a/sim/testsuite/common/bits-gen.c +++ b/sim/testsuite/common/bits-gen.c @@ -22,7 +22,7 @@ along with this program. If not, see . */ #include #include -void +static void gen_struct (void) { printf ("\n"); @@ -44,7 +44,7 @@ gen_struct (void) } -void +static void gen_bit (int bitsize, int msb, const char *macro, @@ -79,7 +79,7 @@ gen_bit (int bitsize, } -void +static void gen_enum (const char *macro, int nr_bits) { @@ -96,7 +96,7 @@ gen_enum (const char *macro, } -void +static void gen_mask (int bitsize, const char *msb, const char *macro, @@ -160,7 +160,7 @@ gen_mask (int bitsize, } -void +static void usage (int reason) { fprintf (stderr, "Usage:\n"); diff --git a/sim/testsuite/common/bits-tst.c b/sim/testsuite/common/bits-tst.c index bcdee1070b9..a30753e4b16 100644 --- a/sim/testsuite/common/bits-tst.c +++ b/sim/testsuite/common/bits-tst.c @@ -3,7 +3,7 @@ /* Drive the bit test routines */ -long long +static long long calc (const char *call, long long val, int row, @@ -161,7 +161,7 @@ calc (const char *call, } -int +static int check_sext (int nr_bits, int msb_nr, const char *sexted, @@ -214,7 +214,7 @@ check_sext (int nr_bits, } -int +static int check_rot (int nr_bits, const char *roted, const char *masked) @@ -248,7 +248,7 @@ check_rot (int nr_bits, } -int +static int check_extract (int nr_bits, const char *extracted, const char *inserted, @@ -277,7 +277,7 @@ check_extract (int nr_bits, } -int +static int check_bits (int call, test_spec **tests) { -- 2.43.0