+2021-04-18 Mike Frysinger <vapier@gentoo.org>
+
+ * interp.c (xfer_mem): Use PRIxTA for printf format.
+ (sim_write): Cast buffer to (void *).
+ (sim_open): Add const to p.
+ * configure.ac (SIM_AC_OPTION_WARNINGS): Delete call.
+ * configure: Regenerate.
+
2021-04-12 Mike Frysinger <vapier@gentoo.org>
* interp.c (sim_open): Delete 3rd arg to sim_cpu_alloc_all.
fi
+
# Check whether --enable-werror was given.
if test "${enable_werror+set}" = set; then :
enableval=$enable_werror; case "${enableval}" in
fi
WERROR_CFLAGS=""
+ if test "${ERROR_ON_WARNING}" = yes ; then
+ WERROR_CFLAGS="-Werror"
+ fi
build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
-Wpointer-sign \
fi
-
cgen_breaks=""
if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
cgen_breaks="break cgen_rtx_error";
{
sim_io_printf
(sd,
- "sim_%s %d bytes: 0x%08lx (%s) -> 0x%08lx (%s) -> 0x%08lx (%s)\n",
+ "sim_%s %d bytes: 0x%08" PRIxTA " (%s) -> 0x%08lx (%s) -> 0x%08lx (%s)\n",
write_p ? "write" : "read",
phys_size, virt, last_from,
phys, last_to,
sim_write (SIM_DESC sd, SIM_ADDR addr, const unsigned char *buffer, int size)
{
/* FIXME: this should be performing a virtual transfer */
- return xfer_mem (sd, addr, buffer, size, 1);
+ /* FIXME: We cast the const away, but it's safe because xfer_mem only reads
+ when write_p==1. This is still ugly. */
+ return xfer_mem (sd, addr, (void *) buffer, size, 1);
}
int
struct simops *s;
struct hash_entry *h;
static int init_p = 0;
- char **p;
+ char * const *p;
int i;
SIM_DESC sd = sim_state_alloc (kind, cb);
SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER);