From 91eea12156fa3d688f6bda1a82fce92241dac2ff Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 4 May 2021 08:35:40 -0400 Subject: sim: mcore: fix build time warnings Once we fix a minor const warning we can enable -Werror in here. --- sim/mcore/ChangeLog | 6 ++++++ sim/mcore/configure | 5 ++++- sim/mcore/configure.ac | 1 - sim/mcore/interp.c | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) (limited to 'sim') diff --git a/sim/mcore/ChangeLog b/sim/mcore/ChangeLog index 83b788a..7a00393 100644 --- a/sim/mcore/ChangeLog +++ b/sim/mcore/ChangeLog @@ -1,5 +1,11 @@ 2021-05-04 Mike Frysinger + * configure.ac: Delete SIM_AC_OPTION_WARNINGS call. + * interp.c (sim_create_inferior): Add const to avp. + * configure: Regenerate. + +2021-05-04 Mike Frysinger + * interp.c: Delete sys/times.h include. 2021-05-04 Mike Frysinger diff --git a/sim/mcore/configure b/sim/mcore/configure index 94c4f26..2d1e87f 100755 --- a/sim/mcore/configure +++ b/sim/mcore/configure @@ -11943,6 +11943,7 @@ fi fi + # Check whether --enable-werror was given. if test "${enable_werror+set}" = set; then : enableval=$enable_werror; case "${enableval}" in @@ -11959,6 +11960,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 \ @@ -12040,7 +12044,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/mcore/configure.ac b/sim/mcore/configure.ac index 4417ba4..8114520 100644 --- a/sim/mcore/configure.ac +++ b/sim/mcore/configure.ac @@ -6,6 +6,5 @@ SIM_AC_COMMON SIM_AC_OPTION_ENDIAN SIM_AC_OPTION_ALIGNMENT(STRICT_ALIGNMENT,STRICT_ALIGNMENT) -SIM_AC_OPTION_WARNINGS(no) SIM_AC_OUTPUT diff --git a/sim/mcore/interp.c b/sim/mcore/interp.c index 6eadf04..f726c1e 100644 --- a/sim/mcore/interp.c +++ b/sim/mcore/interp.c @@ -1417,7 +1417,7 @@ sim_create_inferior (SIM_DESC sd, struct bfd *prog_bfd, char * const *argv, char * const *env) { SIM_CPU *cpu = STATE_CPU (sd, 0); - char ** avp; + char * const *avp; int nargs = 0; int nenv = 0; int s_length; -- cgit v1.1