]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
sim: mcore: fix build time warnings
authorMike Frysinger <vapier@gentoo.org>
Tue, 4 May 2021 12:35:40 +0000 (08:35 -0400)
committerMike Frysinger <vapier@gentoo.org>
Wed, 5 May 2021 01:57:49 +0000 (21:57 -0400)
Once we fix a minor const warning we can enable -Werror in here.

sim/mcore/ChangeLog
sim/mcore/configure
sim/mcore/configure.ac
sim/mcore/interp.c

index 83b788a179ba2843e738a44e3a112165cd837d87..7a0039309847a480e4924494d14eaa585398c102 100644 (file)
@@ -1,3 +1,9 @@
+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.
index 94c4f26d65b05303070d3d3410cb29ed7ddb52e3..2d1e87ffead4477cd2e1bac3aaf7e5ffaa641e8f 100755 (executable)
@@ -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"
index 4417ba4e561edc6fff82c6621cbcb276cba8d79f..811452094557dd9c23dc89ed712d572542f0e4f9 100644 (file)
@@ -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
index 6eadf04d0491c4e3c77487b911ca1e385b48c935..f726c1e7db772747c270be4eb24f0b38326d742f 100644 (file)
@@ -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;