aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-05-04 08:35:40 -0400
committerMike Frysinger <vapier@gentoo.org>2021-05-04 21:57:49 -0400
commit91eea12156fa3d688f6bda1a82fce92241dac2ff (patch)
tree2c9e18808f3866a64c3bee50b5e7479d38b88f78 /sim
parenta147f3ff8c353a68d8525149f34d08bbe62bc6fa (diff)
downloadgdb-91eea12156fa3d688f6bda1a82fce92241dac2ff.zip
gdb-91eea12156fa3d688f6bda1a82fce92241dac2ff.tar.gz
gdb-91eea12156fa3d688f6bda1a82fce92241dac2ff.tar.bz2
sim: mcore: fix build time warnings
Once we fix a minor const warning we can enable -Werror in here.
Diffstat (limited to 'sim')
-rw-r--r--sim/mcore/ChangeLog6
-rwxr-xr-xsim/mcore/configure5
-rw-r--r--sim/mcore/configure.ac1
-rw-r--r--sim/mcore/interp.c2
4 files changed, 11 insertions, 3 deletions
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 <vapier@gentoo.org>
+ * configure.ac: Delete SIM_AC_OPTION_WARNINGS call.
+ * interp.c (sim_create_inferior): Add const to avp.
+ * configure: Regenerate.
+
+2021-05-04 Mike Frysinger <vapier@gentoo.org>
+
* interp.c: Delete sys/times.h include.
2021-05-04 Mike Frysinger <vapier@gentoo.org>
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;