From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id 6A78E3894C36 for ; Sat, 8 May 2021 16:43:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 6A78E3894C36 Received: from vapier.lan (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id ACBCF335D7B for ; Sat, 8 May 2021 16:43:50 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH/committed] sim: h8300: clean up various warnings Date: Sat, 8 May 2021 12:43:48 -0400 Message-Id: <20210508164348.4244-1-vapier@gentoo.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.7 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2021 16:43:55 -0000 A random grab bag of minor fixes to enable -Werror for this port. Disable h8_set_macS for now as it's unused. Initialize trace & intMask before using them. Mark local set_h8300h function static. --- sim/h8300/ChangeLog | 8 ++++++++ sim/h8300/compile.c | 7 +++++-- sim/h8300/configure | 13 ++++++++----- sim/h8300/configure.ac | 1 - 4 files changed, 21 insertions(+), 8 deletions(-) diff --git a/sim/h8300/ChangeLog b/sim/h8300/ChangeLog index c922aaf73ba9..578836eb2ee4 100644 --- a/sim/h8300/ChangeLog +++ b/sim/h8300/ChangeLog @@ -1,3 +1,11 @@ +2021-05-08 Mike Frysinger + + * compile.c (h8_set_macS): Disable with #if 0. + (step_once): Set trace & intMask to 0. + (set_h8300h): Mark static. + * configure.ac: Delete SIM_AC_OPTION_WARNINGS call. + * configure: Regenerate. + 2021-05-04 Mike Frysinger * configure: Regenerate. diff --git a/sim/h8300/compile.c b/sim/h8300/compile.c index fb0e51b2e58d..365f8667c6a5 100644 --- a/sim/h8300/compile.c +++ b/sim/h8300/compile.c @@ -307,11 +307,13 @@ h8_get_macS (SIM_DESC sd) return (STATE_CPU (sd, 0)) -> macS; } +#if 0 static void h8_set_macS (SIM_DESC sd, int val) { (STATE_CPU (sd, 0)) -> macS = (val != 0); } +#endif /* MAC Zero Flag */ static int @@ -1716,7 +1718,8 @@ step_once (SIM_DESC sd, SIM_CPU *cpu) int bit; int pc; int c, nz, v, n, u, h, ui, intMaskBit; - int trace, intMask; + int trace = 0; + int intMask = 0; int oldmask; host_callback *sim_callback = STATE_CALLBACK (sd); @@ -4552,7 +4555,7 @@ sim_info (SIM_DESC sd, int verbose) /* Indicate whether the cpu is an H8/300 or H8/300H. FLAG is non-zero for the H8/300H. */ -void +static void set_h8300h (unsigned long machine) { /* FIXME: Much of the code in sim_load can be moved to sim_open. diff --git a/sim/h8300/configure.ac b/sim/h8300/configure.ac index 8dc33c4cf3ab..dc24462742dc 100644 --- a/sim/h8300/configure.ac +++ b/sim/h8300/configure.ac @@ -6,7 +6,6 @@ SIM_AC_COMMON SIM_AC_OPTION_ENDIAN(BIG) SIM_AC_OPTION_ALIGNMENT(NONSTRICT_ALIGNMENT) -SIM_AC_OPTION_WARNINGS(no) AC_CHECK_HEADERS_ONCE(sys/param.h) -- 2.31.1