diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-05-08 12:41:04 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-05-08 12:43:06 -0400 |
commit | bb608f811bcd013cf7f8b8038310f169639f29d5 (patch) | |
tree | 750f4b43e6f1d7068f811ca9f1c1a165f4dc5fb7 /sim/h8300 | |
parent | b50a658ac100edaef1d0a0f34e2586314f815f7b (diff) | |
download | gdb-bb608f811bcd013cf7f8b8038310f169639f29d5.zip gdb-bb608f811bcd013cf7f8b8038310f169639f29d5.tar.gz gdb-bb608f811bcd013cf7f8b8038310f169639f29d5.tar.bz2 |
sim: h8300: clean up various warnings
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.
Diffstat (limited to 'sim/h8300')
-rw-r--r-- | sim/h8300/ChangeLog | 8 | ||||
-rw-r--r-- | sim/h8300/compile.c | 7 | ||||
-rwxr-xr-x | sim/h8300/configure | 13 | ||||
-rw-r--r-- | sim/h8300/configure.ac | 1 |
4 files changed, 21 insertions, 8 deletions
diff --git a/sim/h8300/ChangeLog b/sim/h8300/ChangeLog index c922aaf..578836e 100644 --- a/sim/h8300/ChangeLog +++ b/sim/h8300/ChangeLog @@ -1,3 +1,11 @@ +2021-05-08 Mike Frysinger <vapier@gentoo.org> + + * 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 <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/h8300/compile.c b/sim/h8300/compile.c index fb0e51b..365f866 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 b/sim/h8300/configure index 2627483..4849a06 100755 --- a/sim/h8300/configure +++ b/sim/h8300/configure @@ -11944,6 +11944,11 @@ fi fi + + + + + # Check whether --enable-werror was given. if test "${enable_werror+set}" = set; then : enableval=$enable_werror; case "${enableval}" in @@ -11960,6 +11965,9 @@ if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then fi WERROR_CFLAGS="" + if test "${ERROR_ON_WARNING}" = yes ; then + WERROR_CFLAGS="-Werror" + fi build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \ -Wpointer-sign \ @@ -12041,11 +12049,6 @@ $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; } fi - - - - - hardware="cfi core pal glue " sim_hw_cflags="-DWITH_HW=1" sim_hw="$hardware" diff --git a/sim/h8300/configure.ac b/sim/h8300/configure.ac index 8dc33c4..dc24462 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) |