binutils-gdb/sim/cr16
Mike Frysinger 3912a8db68 sim: cr16: fix build warnings
The printf fix is obvious enough, but the hash one is a real bug:
cr16/interp.c: In function 'sim_open':
cr16/interp.c:560:17: error: 'h' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  560 |               h = h->next;
      |               ~~^~~~~~~~~

It happens to not cause a problem currently because the first entry in
the generated table that this loop operates matches a codepath where h
is initialized.  Then when later entries don't match, the previous value
is pointing at the end of a valid hash table already, and the rest of
the code does nothing.

With this tidied up, we can delete the SIM_AC_OPTION_WARNINGS(no) call
to get the default common behavior where -Werror is enabled.
2021-04-18 21:07:25 -04:00
..
aclocal.m4 sim: unify toolchain settings 2021-04-02 23:31:14 -04:00
ChangeLog sim: cr16: fix build warnings 2021-04-18 21:07:25 -04:00
config.in
configure sim: cr16: fix build warnings 2021-04-18 21:07:25 -04:00
configure.ac sim: cr16: fix build warnings 2021-04-18 21:07:25 -04:00
cr16_sim.h
gencode.c
interp.c sim: cr16: fix build warnings 2021-04-18 21:07:25 -04:00
Makefile.in sim: introduce {COMPILE,LINK}_FOR_BUILD 2021-03-13 11:15:46 -05:00
sim-main.h
simops.c